staging: greybus: loopback.c: remove unused gb_loopback::lbid
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Fri, 5 Oct 2018 14:28:24 +0000 (16:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Oct 2018 10:10:32 +0000 (12:10 +0200)
commitb4fc4e8340784e000030c5a59bf0791f9c3ce15e
treeb6712317ee04b5490d4e61b5240d3e6e333dea60
parentaa5a54a06b3e7c39348ac4a17aaeb36af9375353
staging: greybus: loopback.c: remove unused gb_loopback::lbid

It's not obvious how the code prevents adding more than 31 elements to
the list and thus invoking undefined behaviour in the 1 << new_lbid
expression, and in practice causing ->lbid values to repeat every 32
elements.

But the definition of struct gb_loopback is local to loopback.c, and the
lbid field is entirely unused outside of this function, so it seems we
can just drop it entirely.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/loopback.c