]> git.baikalelectronics.ru Git - kernel.git/commit
staging: vme: Use BIT macro for bit definitions
authorRicardo Silva <rjpdasilva@gmail.com>
Mon, 15 May 2017 09:18:14 +0000 (10:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 May 2017 11:53:23 +0000 (13:53 +0200)
commit6861f61f097b33ef08557abdf23cacdd65edef38
tree18a561a63d9e5c5e4667e5a1c2c96b83af559a4c
parent045d037f8cc23c97c1053a633215f4a8f85eeeb0
staging: vme: Use BIT macro for bit definitions

Use the BIT(n) macro instead of '(1 << n)' in definitions where the bit
semantics clearly applies.

Fixes true positive "Prefer using the BIT macro" checks reported by
checkpatch.

Some of these checks are still triggering on definitions using
'(1 << n)', namely for PIO2_CNTR_SC_DEV1, PIO2_CNTR_RW_LSB and
PIO2_CNTR_MODE1. Leave them be, as the context there is more of a
"multi-bit field value" ((val << n), where for some cases 'val' happens
to be 1) rather than a "single bit" (1 << n), so keeping the value as is
in the code makes it more readable that using a combination of BIT
macros.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vme/devices/vme_pio2.h