All of lore.kernel.org
 help / color / mirror / Atom feed
* [ti:ti-linux-5.4.y 7094/12984] drivers/crypto/sa2ul.c:1296:25: warning: variable 'rctx' set but not used
@ 2021-01-14  2:58 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-14  2:58 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5501 bytes --]

Hi Tero,

FYI, the error/warning still remains.

tree:   git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head:   c02b2da68c63deb35dc5a7c1b0bbc68e4ee38632
commit: 2e7c47e07621e99da76060d7e85b2ea050ad97b0 [7094/12984] crypto: sa2ul: convert hash fallback mechanism to use local buffer
config: mips-randconfig-r014-20210113 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
        git fetch --no-tags ti ti-linux-5.4.y
        git checkout 2e7c47e07621e99da76060d7e85b2ea050ad97b0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/crypto/sa2ul.c: In function 'sa_cipher_setkey':
   drivers/crypto/sa2ul.c:856:14: warning: variable 'cra_name' set but not used [-Wunused-but-set-variable]
     856 |  const char *cra_name;
         |              ^~~~~~~~
   drivers/crypto/sa2ul.c: In function 'sa_sha_dma_in_callback':
>> drivers/crypto/sa2ul.c:1296:25: warning: variable 'rctx' set but not used [-Wunused-but-set-variable]
    1296 |  struct sa_sha_req_ctx *rctx;
         |                         ^~~~
   In file included from include/linux/dmaengine.h:8,
                    from drivers/crypto/sa2ul.c:13:
   drivers/crypto/sa2ul.c: In function 'sa_sha_init':
   drivers/crypto/sa2ul.c:1525:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1525 |   crypto_ahash_digestsize(tfm), (u64)rctx);
         |                                 ^
   include/linux/device.h:1759:47: note: in definition of macro 'dev_dbg'
    1759 |   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
         |                                               ^~~~~~~~~~~
   drivers/crypto/sa2ul.c: At top level:
   drivers/crypto/sa2ul.c:2211:6: warning: no previous prototype for 'sa_register_algos' [-Wmissing-prototypes]
    2211 | void sa_register_algos(const struct device *dev)
         |      ^~~~~~~~~~~~~~~~~
   drivers/crypto/sa2ul.c:2243:6: warning: no previous prototype for 'sa_unregister_algos' [-Wmissing-prototypes]
    2243 | void sa_unregister_algos(const struct device *dev)
         |      ^~~~~~~~~~~~~~~~~~~


vim +/rctx +1296 drivers/crypto/sa2ul.c

491c6a44ee1ed98e Keerthy     2020-01-17  1289  
b30be50bf38eb796 Tero Kristo 2020-05-26  1290  static void sa_sha_dma_in_callback(void *data)
dfcac7a6a1f9e04a Keerthy     2020-01-17  1291  {
dfcac7a6a1f9e04a Keerthy     2020-01-17  1292  	struct sa_rx_data *rxd = (struct sa_rx_data *)data;
b30be50bf38eb796 Tero Kristo 2020-05-26  1293  	struct ahash_request *req;
b30be50bf38eb796 Tero Kristo 2020-05-26  1294  	struct crypto_ahash *tfm;
b30be50bf38eb796 Tero Kristo 2020-05-26  1295  	unsigned int authsize;
b30be50bf38eb796 Tero Kristo 2020-05-26 @1296  	struct sa_sha_req_ctx *rctx;
dfcac7a6a1f9e04a Keerthy     2020-01-17  1297  	int i, sg_nents;
dfcac7a6a1f9e04a Keerthy     2020-01-17  1298  	size_t ml, pl;
dfcac7a6a1f9e04a Keerthy     2020-01-17  1299  	u32 *mdptr, *result;
dfcac7a6a1f9e04a Keerthy     2020-01-17  1300  
b30be50bf38eb796 Tero Kristo 2020-05-26  1301  	req = container_of(rxd->req, struct ahash_request, base);
b30be50bf38eb796 Tero Kristo 2020-05-26  1302  	tfm = crypto_ahash_reqtfm(req);
b30be50bf38eb796 Tero Kristo 2020-05-26  1303  	authsize = crypto_ahash_digestsize(tfm);
b30be50bf38eb796 Tero Kristo 2020-05-26  1304  	rctx = ahash_request_ctx(req);
b30be50bf38eb796 Tero Kristo 2020-05-26  1305  
dfcac7a6a1f9e04a Keerthy     2020-01-17  1306  	mdptr = (u32 *)dmaengine_desc_get_metadata_ptr(rxd->tx_in, &pl, &ml);
dfcac7a6a1f9e04a Keerthy     2020-01-17  1307  	result = (u32 *)req->result;
dfcac7a6a1f9e04a Keerthy     2020-01-17  1308  
2e7c47e07621e99d Tero Kristo 2020-05-26  1309  	if (result)
dfcac7a6a1f9e04a Keerthy     2020-01-17  1310  		for (i = 0; i < (authsize / 4); i++)
dfcac7a6a1f9e04a Keerthy     2020-01-17  1311  			result[i] = htonl(mdptr[i + 4]);
dfcac7a6a1f9e04a Keerthy     2020-01-17  1312  
b30be50bf38eb796 Tero Kristo 2020-05-26  1313  	sg_nents = sg_nents_for_len(req->src, req->nbytes);
b30be50bf38eb796 Tero Kristo 2020-05-26  1314  	dma_unmap_sg(rxd->ddev, req->src, sg_nents, DMA_FROM_DEVICE);
b30be50bf38eb796 Tero Kristo 2020-05-26  1315  
b30be50bf38eb796 Tero Kristo 2020-05-26  1316  	kfree(rxd->split_src_sg);
dfcac7a6a1f9e04a Keerthy     2020-01-17  1317  
dfcac7a6a1f9e04a Keerthy     2020-01-17  1318  	kfree(rxd);
dfcac7a6a1f9e04a Keerthy     2020-01-17  1319  
dfcac7a6a1f9e04a Keerthy     2020-01-17  1320  	ahash_request_complete(req, 0);
dfcac7a6a1f9e04a Keerthy     2020-01-17  1321  }
dfcac7a6a1f9e04a Keerthy     2020-01-17  1322  

:::::: The code at line 1296 was first introduced by commit
:::::: b30be50bf38eb7964bc59dbfefd120939b357b37 crypto: sa2ul: sync codebase with latest upstream

:::::: TO: Tero Kristo <t-kristo@ti.com>
:::::: CC: Tero Kristo <t-kristo@ti.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32122 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-14  2:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14  2:58 [ti:ti-linux-5.4.y 7094/12984] drivers/crypto/sa2ul.c:1296:25: warning: variable 'rctx' set but not used kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.