[lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment
Lidza Louina
Lidza.Louina at oracle.com
Thu Jun 23 11:56:36 PDT 2016
The code attempted to add an unsigned int to a an unsigned 64-bit
integer. This patch makes the code use the correct type of int to
suppress a smatch warning.
Signed-off-by: Lidza Louina <lidza.louina at oracle.com>
---
drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c
index 346db89..fc5b763 100644
--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
@@ -513,7 +513,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh)
unsigned int hash;
lh->lh_cookie = rec->rec_lh_cookie;
- rec->rec_lh_cookie += 1 << ibits;
+ rec->rec_lh_cookie += (1ULL << ibits);
hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK;
--
1.9.1
More information about the lustre-devel
mailing list