public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/crypto/chelsio/chcr_ktls.c:391:15: warning: variable 'sk' set but not used
@ 2020-08-13 22:15 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-13 22:15 UTC (permalink / raw)
  To: Rohit Maheshwari; +Cc: kbuild-all, linux-kernel

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dddcbc139e96bd18d8c65ef7b7e440f0d32457c2
commit: 76d7728db724466490c2c3dd4f84c3357f550615 crypto/chcr: IPV6 code needs to be in CONFIG_IPV6
date:   2 months ago
config: ia64-randconfig-r033-20200814 (attached as .config)
compiler: ia64-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 checkout 76d7728db724466490c2c3dd4f84c3357f550615
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

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 >>):

   In file included from arch/ia64/include/asm/pgtable.h:154,
                    from arch/ia64/include/asm/uaccess.h:40,
                    from include/linux/uaccess.h:11,
                    from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs.h:34,
                    from include/linux/highmem.h:5,
                    from drivers/crypto/chelsio/chcr_ktls.c:5:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:137:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
     137 |  unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
         |                                         ^~~~~~~
   drivers/crypto/chelsio/chcr_ktls.c: In function 'chcr_ktls_dev_del':
>> drivers/crypto/chelsio/chcr_ktls.c:391:15: warning: variable 'sk' set but not used [-Wunused-but-set-variable]
     391 |  struct sock *sk;
         |               ^~

vim +/sk +391 drivers/crypto/chelsio/chcr_ktls.c

34aba2c45024a08 Rohit Maheshwari 2020-03-07  375  
34aba2c45024a08 Rohit Maheshwari 2020-03-07  376  /*
34aba2c45024a08 Rohit Maheshwari 2020-03-07  377   * chcr_ktls_dev_del:  call back for tls_dev_del.
34aba2c45024a08 Rohit Maheshwari 2020-03-07  378   * Remove the tid and l2t entry and close the connection.
34aba2c45024a08 Rohit Maheshwari 2020-03-07  379   * it per connection basis.
34aba2c45024a08 Rohit Maheshwari 2020-03-07  380   * @netdev - net device.
34aba2c45024a08 Rohit Maheshwari 2020-03-07  381   * @tls_cts - tls context.
34aba2c45024a08 Rohit Maheshwari 2020-03-07  382   * @direction - TX/RX crypto direction
34aba2c45024a08 Rohit Maheshwari 2020-03-07  383   */
a3ac249a1ab5755 Rohit Maheshwari 2020-06-01  384  void chcr_ktls_dev_del(struct net_device *netdev,
34aba2c45024a08 Rohit Maheshwari 2020-03-07  385  		       struct tls_context *tls_ctx,
34aba2c45024a08 Rohit Maheshwari 2020-03-07  386  		       enum tls_offload_ctx_dir direction)
34aba2c45024a08 Rohit Maheshwari 2020-03-07  387  {
34aba2c45024a08 Rohit Maheshwari 2020-03-07  388  	struct chcr_ktls_ofld_ctx_tx *tx_ctx =
34aba2c45024a08 Rohit Maheshwari 2020-03-07  389  				chcr_get_ktls_tx_context(tls_ctx);
34aba2c45024a08 Rohit Maheshwari 2020-03-07  390  	struct chcr_ktls_info *tx_info = tx_ctx->chcr_info;
62370a4f346dda9 Rohit Maheshwari 2020-03-07 @391  	struct sock *sk;
34aba2c45024a08 Rohit Maheshwari 2020-03-07  392  
34aba2c45024a08 Rohit Maheshwari 2020-03-07  393  	if (!tx_info)
34aba2c45024a08 Rohit Maheshwari 2020-03-07  394  		return;
62370a4f346dda9 Rohit Maheshwari 2020-03-07  395  	sk = tx_info->sk;
34aba2c45024a08 Rohit Maheshwari 2020-03-07  396  
34aba2c45024a08 Rohit Maheshwari 2020-03-07  397  	spin_lock(&tx_info->lock);
34aba2c45024a08 Rohit Maheshwari 2020-03-07  398  	tx_info->connection_state = KTLS_CONN_CLOSED;
34aba2c45024a08 Rohit Maheshwari 2020-03-07  399  	spin_unlock(&tx_info->lock);
34aba2c45024a08 Rohit Maheshwari 2020-03-07  400  
62370a4f346dda9 Rohit Maheshwari 2020-03-07  401  	/* clear l2t entry */
34aba2c45024a08 Rohit Maheshwari 2020-03-07  402  	if (tx_info->l2te)
34aba2c45024a08 Rohit Maheshwari 2020-03-07  403  		cxgb4_l2t_release(tx_info->l2te);
34aba2c45024a08 Rohit Maheshwari 2020-03-07  404  

:::::: The code at line 391 was first introduced by commit
:::::: 62370a4f346dda9a7026445016db5f8eddd533a5 cxgb4/chcr: Add ipv6 support and statistics

:::::: TO: Rohit Maheshwari <rohitm@chelsio.com>
:::::: CC: David S. Miller <davem@davemloft.net>

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/crypto/chelsio/chcr_ktls.c:391:15: warning: variable 'sk' set but not used
@ 2020-09-06 23:43 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-09-06 23:43 UTC (permalink / raw)
  To: Rohit Maheshwari; +Cc: kbuild-all, linux-kernel

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

Hi Rohit,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a8205e310011f09cc73cd577d7b0074c57b9bb54
commit: 76d7728db724466490c2c3dd4f84c3357f550615 crypto/chcr: IPV6 code needs to be in CONFIG_IPV6
date:   3 months ago
config: alpha-randconfig-r013-20200907 (attached as .config)
compiler: alpha-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 checkout 76d7728db724466490c2c3dd4f84c3357f550615
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha 

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/chelsio/chcr_ktls.c: In function 'chcr_ktls_dev_del':
>> drivers/crypto/chelsio/chcr_ktls.c:391:15: warning: variable 'sk' set but not used [-Wunused-but-set-variable]
     391 |  struct sock *sk;
         |               ^~

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76d7728db724466490c2c3dd4f84c3357f550615
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 76d7728db724466490c2c3dd4f84c3357f550615
vim +/sk +391 drivers/crypto/chelsio/chcr_ktls.c

34aba2c45024a0 Rohit Maheshwari 2020-03-07  375  
34aba2c45024a0 Rohit Maheshwari 2020-03-07  376  /*
34aba2c45024a0 Rohit Maheshwari 2020-03-07  377   * chcr_ktls_dev_del:  call back for tls_dev_del.
34aba2c45024a0 Rohit Maheshwari 2020-03-07  378   * Remove the tid and l2t entry and close the connection.
34aba2c45024a0 Rohit Maheshwari 2020-03-07  379   * it per connection basis.
34aba2c45024a0 Rohit Maheshwari 2020-03-07  380   * @netdev - net device.
34aba2c45024a0 Rohit Maheshwari 2020-03-07  381   * @tls_cts - tls context.
34aba2c45024a0 Rohit Maheshwari 2020-03-07  382   * @direction - TX/RX crypto direction
34aba2c45024a0 Rohit Maheshwari 2020-03-07  383   */
a3ac249a1ab575 Rohit Maheshwari 2020-06-01  384  void chcr_ktls_dev_del(struct net_device *netdev,
34aba2c45024a0 Rohit Maheshwari 2020-03-07  385  		       struct tls_context *tls_ctx,
34aba2c45024a0 Rohit Maheshwari 2020-03-07  386  		       enum tls_offload_ctx_dir direction)
34aba2c45024a0 Rohit Maheshwari 2020-03-07  387  {
34aba2c45024a0 Rohit Maheshwari 2020-03-07  388  	struct chcr_ktls_ofld_ctx_tx *tx_ctx =
34aba2c45024a0 Rohit Maheshwari 2020-03-07  389  				chcr_get_ktls_tx_context(tls_ctx);
34aba2c45024a0 Rohit Maheshwari 2020-03-07  390  	struct chcr_ktls_info *tx_info = tx_ctx->chcr_info;
62370a4f346dda Rohit Maheshwari 2020-03-07 @391  	struct sock *sk;
34aba2c45024a0 Rohit Maheshwari 2020-03-07  392  
34aba2c45024a0 Rohit Maheshwari 2020-03-07  393  	if (!tx_info)
34aba2c45024a0 Rohit Maheshwari 2020-03-07  394  		return;
62370a4f346dda Rohit Maheshwari 2020-03-07  395  	sk = tx_info->sk;
34aba2c45024a0 Rohit Maheshwari 2020-03-07  396  
34aba2c45024a0 Rohit Maheshwari 2020-03-07  397  	spin_lock(&tx_info->lock);
34aba2c45024a0 Rohit Maheshwari 2020-03-07  398  	tx_info->connection_state = KTLS_CONN_CLOSED;
34aba2c45024a0 Rohit Maheshwari 2020-03-07  399  	spin_unlock(&tx_info->lock);
34aba2c45024a0 Rohit Maheshwari 2020-03-07  400  
62370a4f346dda Rohit Maheshwari 2020-03-07  401  	/* clear l2t entry */
34aba2c45024a0 Rohit Maheshwari 2020-03-07  402  	if (tx_info->l2te)
34aba2c45024a0 Rohit Maheshwari 2020-03-07  403  		cxgb4_l2t_release(tx_info->l2te);
34aba2c45024a0 Rohit Maheshwari 2020-03-07  404  

:::::: The code at line 391 was first introduced by commit
:::::: 62370a4f346dda9a7026445016db5f8eddd533a5 cxgb4/chcr: Add ipv6 support and statistics

:::::: TO: Rohit Maheshwari <rohitm@chelsio.com>
:::::: CC: David S. Miller <davem@davemloft.net>

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-06 23:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-06 23:43 drivers/crypto/chelsio/chcr_ktls.c:391:15: warning: variable 'sk' set but not used kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-08-13 22:15 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox