Patch "crypto: nx - fix build warnings when DEBUG_FS is not enabled" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    crypto: nx - fix build warnings when DEBUG_FS is not enabled

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     crypto-nx-fix-build-warnings-when-debug_fs-is-not-en.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 4de77481db87f8be648b335b837549945ec03103
Author: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Date:   Fri May 19 15:33:34 2023 -0700

    crypto: nx - fix build warnings when DEBUG_FS is not enabled
    
    [ Upstream commit b04b076fb56560b39d695ac3744db457e12278fd ]
    
    Fix build warnings when DEBUG_FS is not enabled by using an empty
    do-while loop instead of a value:
    
    In file included from ../drivers/crypto/nx/nx.c:27:
    ../drivers/crypto/nx/nx.c: In function 'nx_register_algs':
    ../drivers/crypto/nx/nx.h:173:33: warning: statement with no effect [-Wunused-value]
      173 | #define NX_DEBUGFS_INIT(drv)    (0)
    ../drivers/crypto/nx/nx.c:573:9: note: in expansion of macro 'NX_DEBUGFS_INIT'
      573 |         NX_DEBUGFS_INIT(&nx_driver);
    ../drivers/crypto/nx/nx.c: In function 'nx_remove':
    ../drivers/crypto/nx/nx.h:174:33: warning: statement with no effect [-Wunused-value]
      174 | #define NX_DEBUGFS_FINI(drv)    (0)
    ../drivers/crypto/nx/nx.c:793:17: note: in expansion of macro 'NX_DEBUGFS_FINI'
      793 |                 NX_DEBUGFS_FINI(&nx_driver);
    
    Also, there is no need to build nx_debugfs.o when DEBUG_FS is not
    enabled, so change the Makefile to accommodate that.
    
    Fixes: ae0222b7289d ("powerpc/crypto: nx driver code supporting nx encryption")
    Fixes: aef7b31c8833 ("powerpc/crypto: Build files for the nx device driver")
    Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
    Cc: Breno Leitão <leitao@xxxxxxxxxx>
    Cc: Nayna Jain <nayna@xxxxxxxxxxxxx>
    Cc: Paulo Flabiano Smorigo <pfsmorigo@xxxxxxxxx>
    Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
    Cc: linux-crypto@xxxxxxxxxxxxxxx
    Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Cc: Nicholas Piggin <npiggin@xxxxxxxxx>
    Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
    Cc: linuxppc-dev@xxxxxxxxxxxxxxxx
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/crypto/nx/Makefile b/drivers/crypto/nx/Makefile
index d00181a26dd65..483cef62acee8 100644
--- a/drivers/crypto/nx/Makefile
+++ b/drivers/crypto/nx/Makefile
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CRYPTO_DEV_NX_ENCRYPT) += nx-crypto.o
 nx-crypto-objs := nx.o \
-		  nx_debugfs.o \
 		  nx-aes-cbc.o \
 		  nx-aes-ecb.o \
 		  nx-aes-gcm.o \
@@ -11,6 +10,7 @@ nx-crypto-objs := nx.o \
 		  nx-sha256.o \
 		  nx-sha512.o
 
+nx-crypto-$(CONFIG_DEBUG_FS) += nx_debugfs.o
 obj-$(CONFIG_CRYPTO_DEV_NX_COMPRESS_PSERIES) += nx-compress-pseries.o nx-compress.o
 obj-$(CONFIG_CRYPTO_DEV_NX_COMPRESS_POWERNV) += nx-compress-powernv.o nx-compress.o
 nx-compress-objs := nx-842.o
diff --git a/drivers/crypto/nx/nx.h b/drivers/crypto/nx/nx.h
index c6233173c612e..2697baebb6a35 100644
--- a/drivers/crypto/nx/nx.h
+++ b/drivers/crypto/nx/nx.h
@@ -170,8 +170,8 @@ struct nx_sg *nx_walk_and_build(struct nx_sg *, unsigned int,
 void nx_debugfs_init(struct nx_crypto_driver *);
 void nx_debugfs_fini(struct nx_crypto_driver *);
 #else
-#define NX_DEBUGFS_INIT(drv)	(0)
-#define NX_DEBUGFS_FINI(drv)	(0)
+#define NX_DEBUGFS_INIT(drv)	do {} while (0)
+#define NX_DEBUGFS_FINI(drv)	do {} while (0)
 #endif
 
 #define NX_PAGE_NUM(x)		((u64)(x) & 0xfffffffffffff000ULL)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux