From: Dominique Martinet Date: Sat, 15 May 2021 22:32:56 +0000 (+0900) Subject: LU-14093 lnet: annotate LNET_WIRE_HANDLE_COOKIE_NONE as u64 X-Git-Tag: 2.14.53~63 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F43713%2F6;p=fs%2Flustre-release.git 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); ^~ Change-Id: I05f21dcca5fe9dd15d1e0b6cb9a29c3999bcd807 Signed-off-by: Dominique Martinet Reviewed-on: https://review.whamcloud.com/43713 Reviewed-by: Neil Brown Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo --- diff --git a/lnet/include/uapi/linux/lnet/lnet-types.h b/lnet/include/uapi/linux/lnet/lnet-types.h index d40fb9e..69dc893 100644 --- a/lnet/include/uapi/linux/lnet/lnet-types.h +++ b/lnet/include/uapi/linux/lnet/lnet-types.h @@ -135,7 +135,7 @@ struct lnet_counters { * '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;