Whamcloud - gitweb
LU-6142 lustre: Remove inappropriate uses of BIT() macro. 73/38373/2
authorMr NeilBrown <neilb@suse.de>
Mon, 27 Apr 2020 03:32:27 +0000 (13:32 +1000)
committerOleg Drokin <green@whamcloud.com>
Thu, 7 May 2020 05:43:05 +0000 (05:43 +0000)
commit423ad8144697363f270bee1c3a67cd80a6b20f9a
tree63639a1f043ce03d151cb396b4d47df217400471
parent62ad24cd92ef2f2333aa372902a7842580867467
LU-6142 lustre: Remove inappropriate uses of BIT() macro.

The BIT() macro exists for identifying a specific bit in a word when
it is being used as a bitmap (or mask for set of flags etc).
While it uses "1 << ...." it is not a general replacement for that
construct and should not be used to simply to raise '2' to some power.

Varous places in lustre and libcfs use BIT() when a size, rather than
a BIT, are required.  Convert these to explicitly use "1 << exponent".

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I41e1e188da4d2e5dff5b2c05cec607c1d104bcfa
Reviewed-on: https://review.whamcloud.com/38373
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/module.c
lustre/ldlm/ldlm_resource.c
lustre/llite/lproc_llite.c
lustre/obdclass/class_obd.c