From f01916ee1381df247b9fdeb15abc0e3dc5cb5aba Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Wed, 19 Jan 2022 16:44:55 -0800 Subject: [PATCH] LU-14093 lnet: annotate LNET_WIRE_HANDLE_COOKIE_NONE as u64 Fix the following warning on new gcc with -Wextra when including lustre_idl.h on external project: .../include/linux/lnet/lnet-types.h: In function LNetMDHandleIsInvalid: .../include/linux/lnet/lnet-types.h:355:46: error: comparison of integer expressions of different signedness: int and __u64 {aka long long unsigned int} [-Werror=sign-compare] return (LNET_WIRE_HANDLE_COOKIE_NONE == h.cookie); ^~ Lustre-change: https://review.whamcloud.com/43713 Lustre-commit: 27214876fcdfbda016c920bce4ab1da800fcda4b Change-Id: I05f21dcca5fe9dd15d1e0b6cb9a29c3999bcd807 Signed-off-by: Dominique Martinet Reviewed-by: Andreas Dilger Reviewed-on: https://review.whamcloud.com/46215 Tested-by: jenkins Tested-by: Maloo --- lnet/include/uapi/linux/lnet/lnet-types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnet/include/uapi/linux/lnet/lnet-types.h b/lnet/include/uapi/linux/lnet/lnet-types.h index 38a80e0..a5fc1d1 100644 --- a/lnet/include/uapi/linux/lnet/lnet-types.h +++ b/lnet/include/uapi/linux/lnet/lnet-types.h @@ -331,7 +331,7 @@ struct lnet_ping_info { * 'me' for match entry). Each type of object is given a unique handle type * to enhance type checking. */ -#define LNET_WIRE_HANDLE_COOKIE_NONE (-1) +#define LNET_WIRE_HANDLE_COOKIE_NONE (~0ULL) struct lnet_handle_md { __u64 cookie; -- 1.8.3.1