[PATCH 3/9] crypto: sun8i-ce - remove unnecessary __maybe_unused annotations

Ovidiu Panait posted 9 patches 2 months, 1 week ago
There is a newer version of this series
[PATCH 3/9] crypto: sun8i-ce - remove unnecessary __maybe_unused annotations
Posted by Ovidiu Panait 2 months, 1 week ago
There are 4 instances of '__maybe_unused' annotations that are not needed,
as the variables are always used, so remove them.

Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
---
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +-
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c   | 4 ++--
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
index 113a1100f2ae..c57c64a1a388 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
@@ -111,7 +111,7 @@ static int sun8i_ce_cipher_fallback(struct skcipher_request *areq)
 
 	if (IS_ENABLED(CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG)) {
 		struct skcipher_alg *alg = crypto_skcipher_alg(tfm);
-		struct sun8i_ce_alg_template *algt __maybe_unused;
+		struct sun8i_ce_alg_template *algt;
 
 		algt = container_of(alg, struct sun8i_ce_alg_template,
 				    alg.skcipher.base);
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
index 79ec172e5c99..326d9c988bb1 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
@@ -1062,8 +1062,8 @@ static int sun8i_ce_probe(struct platform_device *pdev)
 	pm_runtime_put_sync(ce->dev);
 
 	if (IS_ENABLED(CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG)) {
-		struct dentry *dbgfs_dir __maybe_unused;
-		struct dentry *dbgfs_stats __maybe_unused;
+		struct dentry *dbgfs_dir;
+		struct dentry *dbgfs_stats;
 
 		/* Ignore error of debugfs */
 		dbgfs_dir = debugfs_create_dir("sun8i-ce", NULL);
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
index 61e8d968fdcc..df2acef9c679 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
@@ -26,7 +26,7 @@
 static void sun8i_ce_hash_stat_fb_inc(struct crypto_ahash *tfm)
 {
 	if (IS_ENABLED(CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG)) {
-		struct sun8i_ce_alg_template *algt __maybe_unused;
+		struct sun8i_ce_alg_template *algt;
 		struct ahash_alg *alg = crypto_ahash_alg(tfm);
 
 		algt = container_of(alg, struct sun8i_ce_alg_template,
-- 
2.50.0
Re: [PATCH 3/9] crypto: sun8i-ce - remove unnecessary __maybe_unused annotations
Posted by kernel test robot 2 months, 1 week ago
Hi Ovidiu,

kernel test robot noticed the following build warnings:

[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on next-20250728]
[cannot apply to sunxi/sunxi/for-next herbert-crypto-2.6/master linus/master v6.16]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ovidiu-Panait/crypto-sun8i-ce-remove-channel-timeout-field/20250728-141133
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link:    https://lore.kernel.org/r/20250728060701.1787607-4-ovidiu.panait.oss%40gmail.com
patch subject: [PATCH 3/9] crypto: sun8i-ce - remove unnecessary __maybe_unused annotations
config: arm-randconfig-002-20250728 (https://download.01.org/0day-ci/archive/20250728/202507281638.lcdB5LRY-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 1b4db78d2eaa070b3f364a2d2b2b826a5439b892)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250728/202507281638.lcdB5LRY-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507281638.lcdB5LRY-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c:1066:18: warning: variable 'dbgfs_stats' set but not used [-Wunused-but-set-variable]
    1066 |                 struct dentry *dbgfs_stats;
         |                                ^
   1 warning generated.


vim +/dbgfs_stats +1066 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c

  1056	
  1057		v = readl(ce->base + CE_CTR);
  1058		v >>= CE_DIE_ID_SHIFT;
  1059		v &= CE_DIE_ID_MASK;
  1060		dev_info(&pdev->dev, "CryptoEngine Die ID %x\n", v);
  1061	
  1062		pm_runtime_put_sync(ce->dev);
  1063	
  1064		if (IS_ENABLED(CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG)) {
  1065			struct dentry *dbgfs_dir;
> 1066			struct dentry *dbgfs_stats;
  1067	
  1068			/* Ignore error of debugfs */
  1069			dbgfs_dir = debugfs_create_dir("sun8i-ce", NULL);
  1070			dbgfs_stats = debugfs_create_file("stats", 0444,
  1071							  dbgfs_dir, ce,
  1072							  &sun8i_ce_debugfs_fops);
  1073	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki