Whamcloud - gitweb
LU-16518 target: fix unused-but-set-variable warnings 83/58183/2
authorTimothy Day <timday@amazon.com>
Mon, 24 Feb 2025 06:21:23 +0000 (01:21 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 6 Mar 2025 08:09:03 +0000 (08:09 +0000)
In tgt_checksum_niobuf(), remove the unused err return code
of cfs_crypto_hash_final() to silence a Clang compiler
warning.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I6dfe664479d4430c4386d2ff50644e41d91a4c28
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58183
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Max Wang <wamax@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/target/tgt_handler.c

index 27e33a1..f864d46 100644 (file)
@@ -1823,10 +1823,10 @@ static int tgt_checksum_niobuf(struct lu_target *tgt,
                                 int opc, enum cksum_types cksum_type,
                                 __u32 *cksum)
 {
-       struct ahash_request           *req;
-       unsigned int                    bufsize;
-       int                             i, err;
-       unsigned char                   cfs_alg = cksum_obd2cfs(cksum_type);
+       unsigned char cfs_alg = cksum_obd2cfs(cksum_type);
+       struct ahash_request *req;
+       unsigned int bufsize;
+       int i;
 
        req = cfs_crypto_hash_init(cfs_alg, NULL, 0);
        if (IS_ERR(req)) {
@@ -1900,7 +1900,7 @@ static int tgt_checksum_niobuf(struct lu_target *tgt,
        }
 
        bufsize = sizeof(*cksum);
-       err = cfs_crypto_hash_final(req, (unsigned char *)cksum, &bufsize);
+       cfs_crypto_hash_final(req, (unsigned char *)cksum, &bufsize);
 
        return 0;
 }