Coccinelle (using scripts/coccinelle/tests/doublebitand.cocci) found this
assignment because 0 is or'd twice. Upon inspection, I found that the
variable "mode" is only assigned once and used once, and thus can be
cleanly removed. This patch plugs its value straight into writew() and
then removes the variable.
Signed-off-by: Chase Southwood <chase.southwood@xxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
---
It occurred to me while doing this that zero might be or'd twice to
indicate "no information" in order to maintain some three-part structure
used elsewhere. If this is the case, I think that the variable could
still be removed and the "| 0 | 0" could be added to the writew().
drivers/staging/comedi/drivers/dt3000.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)