staging: lustre: ptlrpc: silence a shift wrapping warning
authorDan Carpenter <dan.carpenter@oracle.com>
Sun, 15 Jan 2017 08:14:07 +0000 (11:14 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jan 2017 17:08:56 +0000 (18:08 +0100)
"svcpt->scp_hist_seq" is a u64 so static checkers complain that 1U
should be 1ULL.  I looked at REQS_SEQ_SHIFT() a little and it seems to
be capped by the number of CPUs online and the amount of memory, but I
think it could go above 32 possibly.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/events.c

index 49f3e63684156679e31455e6b432fc3a53cf698c..ae1650dda57359b8e39c07bdb6896da99b52d89e 100644 (file)
@@ -277,7 +277,7 @@ static void ptlrpc_req_add_history(struct ptlrpc_service_part *svcpt,
                 * then we hope there will be less RPCs per bucket at some
                 * point, and sequence will catch up again
                 */
-               svcpt->scp_hist_seq += (1U << REQS_SEQ_SHIFT(svcpt));
+               svcpt->scp_hist_seq += (1ULL << REQS_SEQ_SHIFT(svcpt));
                new_seq = svcpt->scp_hist_seq;
        }