From 08ccf5e4ec6fa5461435d8cc89369f6fa81ecacd Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Mon, 24 Feb 2025 01:18:11 -0500 Subject: [PATCH] LU-16518 osc: fix unused-but-set-variable warnings When CONFIG_CRC_T10DIF=n and osc_checksum_bulk_t10pi() is a macro, Clang generates compiler warnings for some of the arguments - since they are not used elsewhere. Silence this by creating a proper function. Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I502dcf1764602711fcf2cf3553ad6d2f4fed3f14 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58182 Reviewed-by: Andreas Dilger Reviewed-by: Max Wang Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/osc/osc_request.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 726bd4d..5c64f94 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1287,8 +1287,15 @@ out: #else /* !CONFIG_CRC_T10DIF */ #define obd_dif_ip_fn NULL #define obd_dif_crc_fn NULL -#define osc_checksum_bulk_t10pi(name, nob, pgc, pga, opc, fn, ssize, csum, re) \ - -EOPNOTSUPP + +static int osc_checksum_bulk_t10pi(const char *obd_name, int nob, + size_t pg_count, struct brw_page **pga, + int opc, obd_dif_csum_fn *fn, + int sector_size, + u32 *check_sum, bool resend) +{ + return -EOPNOTSUPP; +} #endif /* CONFIG_CRC_T10DIF */ static int osc_checksum_bulk(int nob, size_t pg_count, -- 1.8.3.1