OSDN Git Service

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)
commit9d156621751094293e9739debd77cc4751ba2dcf
tree18a561a63d9e5c5e4667e5a1c2c96b83af559a4c
parentd7206352fc327eb833e137739269022a1e6c0a7f
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