staging: lustre: Replace a bit shift by a use of BIT.
This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5c14312332
commit
08d6ccf39b
@ -1906,14 +1906,14 @@ ksocknal_connect(struct ksock_route *route)
|
|||||||
if (retry_later) /* needs reschedule */
|
if (retry_later) /* needs reschedule */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (wanted & (1 << SOCKLND_CONN_ANY)) {
|
if (wanted & BIT(SOCKLND_CONN_ANY)) {
|
||||||
type = SOCKLND_CONN_ANY;
|
type = SOCKLND_CONN_ANY;
|
||||||
} else if (wanted & (1 << SOCKLND_CONN_CONTROL)) {
|
} else if (wanted & BIT(SOCKLND_CONN_CONTROL)) {
|
||||||
type = SOCKLND_CONN_CONTROL;
|
type = SOCKLND_CONN_CONTROL;
|
||||||
} else if (wanted & (1 << SOCKLND_CONN_BULK_IN)) {
|
} else if (wanted & BIT(SOCKLND_CONN_BULK_IN)) {
|
||||||
type = SOCKLND_CONN_BULK_IN;
|
type = SOCKLND_CONN_BULK_IN;
|
||||||
} else {
|
} else {
|
||||||
LASSERT(wanted & (1 << SOCKLND_CONN_BULK_OUT));
|
LASSERT(wanted & BIT(SOCKLND_CONN_BULK_OUT));
|
||||||
type = SOCKLND_CONN_BULK_OUT;
|
type = SOCKLND_CONN_BULK_OUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ lnet_mt_test_exhausted(struct lnet_match_table *mtable, int pos)
|
|||||||
bmap = &mtable->mt_exhausted[pos >> LNET_MT_BITS_U64];
|
bmap = &mtable->mt_exhausted[pos >> LNET_MT_BITS_U64];
|
||||||
pos &= (1 << LNET_MT_BITS_U64) - 1;
|
pos &= (1 << LNET_MT_BITS_U64) - 1;
|
||||||
|
|
||||||
return (*bmap & (1ULL << pos));
|
return (*bmap & BIT(pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1308,7 +1308,7 @@ static void ll_display_extents_info(struct ll_rw_extents_info *io_extents,
|
|||||||
r, pct(r, read_tot), pct(read_cum, read_tot),
|
r, pct(r, read_tot), pct(read_cum, read_tot),
|
||||||
w, pct(w, write_tot), pct(write_cum, write_tot));
|
w, pct(w, write_tot), pct(write_cum, write_tot));
|
||||||
start = end;
|
start = end;
|
||||||
if (start == 1 << 10) {
|
if (start == 1024) {
|
||||||
start = 1;
|
start = 1;
|
||||||
units += 10;
|
units += 10;
|
||||||
unitp++;
|
unitp++;
|
||||||
|
Loading…
Reference in New Issue
Block a user