[ceph-client:wip-krb5-only 8/8] net/ceph/crypto.c:20:12: warning: 'set_aes_tfm' defined but not used

kernel test robot
2026-01-04T05:15:06Z

tree: https://github.com/ceph/ceph-client.git wip-krb5-only
head: 252215f12e8c715bfa0a1d6237edf74bc5fdb1eb
commit: 252215f12e8c715bfa0a1d6237edf74bc5fdb1eb [8/8] krb5 only
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20260104/202601041325.MiYfspoS-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260104/202601041325.MiYfspoS-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/202601041325.MiYfspoS-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/ceph/crypto.c:20:12: warning: 'set_aes_tfm' defined but not used [-Wunused-function]
20 | static int set_aes_tfm(struct ceph_crypto_key *key)
| ^~~~~~~~~~~

vim +/set_aes_tfm +20 net/ceph/crypto.c

8b6e4f2d8b21c2 fs/ceph/crypto.c Sage Weil 2010-02-02 19
e58c5c85457182 net/ceph/crypto.c Ilya Dryomov 2025-12-22 @20 static int set_aes_tfm(struct ceph_crypto_key *key)
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 21 {
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 22 unsigned int noio_flag;
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 23 int ret;
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 24
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 25 noio_flag = memalloc_noio_save();
4f18d0d9525b0a net/ceph/crypto.c Ilya Dryomov 2025-12-22 26 key->aes_tfm = crypto_alloc_sync_skcipher("cbc(aes)", 0, 0);
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 27 memalloc_noio_restore(noio_flag);
4f18d0d9525b0a net/ceph/crypto.c Ilya Dryomov 2025-12-22 28 if (IS_ERR(key->aes_tfm)) {
4f18d0d9525b0a net/ceph/crypto.c Ilya Dryomov 2025-12-22 29 ret = PTR_ERR(key->aes_tfm);
4f18d0d9525b0a net/ceph/crypto.c Ilya Dryomov 2025-12-22 30 key->aes_tfm = NULL;
e58c5c85457182 net/ceph/crypto.c Ilya Dryomov 2025-12-22 31 return ret;
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 32 }
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 33
4f18d0d9525b0a net/ceph/crypto.c Ilya Dryomov 2025-12-22 34 ret = crypto_sync_skcipher_setkey(key->aes_tfm, key->key, key->len);
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 35 if (ret)
e58c5c85457182 net/ceph/crypto.c Ilya Dryomov 2025-12-22 36 return ret;
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 37
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 38 return 0;
e58c5c85457182 net/ceph/crypto.c Ilya Dryomov 2025-12-22 39 }
7af3ea189a9a13 net/ceph/crypto.c Ilya Dryomov 2016-12-02 40

:::::: The code at line 20 was first introduced by commit
:::::: e58c5c85457182987abb3d7f97de88192e97947d introduce ceph_crypto_key_prepare()

:::::: TO: Ilya Dryomov <idryomov@gmail.com>
:::::: CC: Ilya Dryomov <idryomov@gmail.com>

--
0-DAY CI Kernel Test Service