linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: tulip: de4x5: remove unused variable
@ 2022-06-01  7:24 Haowen Bai
  2022-06-01 14:38 ` kernel test robot
  2022-06-02  1:06 ` baihaowen
  0 siblings, 2 replies; 3+ messages in thread
From: Haowen Bai @ 2022-06-01  7:24 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Haowen Bai, netdev, linux-parisc, linux-kernel

The variable imr is initialized but never used otherwise.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 drivers/net/ethernet/dec/tulip/de4x5.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index 71730ef4cd57..40a54827d599 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -3817,10 +3817,9 @@ de4x5_setup_intr(struct net_device *dev)
 {
     struct de4x5_private *lp = netdev_priv(dev);
     u_long iobase = dev->base_addr;
-    s32 imr, sts;
+    s32 sts;
 
     if (inl(DE4X5_OMR) & OMR_SR) {   /* Only unmask if TX/RX is enabled */
-	imr = 0;
 	UNMASK_IRQs;
 	sts = inl(DE4X5_STS);        /* Reset any pending (stale) interrupts */
 	outl(sts, DE4X5_STS);
-- 
2.7.4


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

* Re: [PATCH] net: tulip: de4x5: remove unused variable
  2022-06-01  7:24 [PATCH] net: tulip: de4x5: remove unused variable Haowen Bai
@ 2022-06-01 14:38 ` kernel test robot
  2022-06-02  1:06 ` baihaowen
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-06-01 14:38 UTC (permalink / raw)
  To: Haowen Bai, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: llvm, kbuild-all, netdev, Haowen Bai, linux-parisc, linux-kernel

Hi Haowen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on horms-ipvs/master]
[also build test ERROR on v5.18]
[cannot apply to net-next/master net/master linus/master next-20220601]
[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]

url:    https://github.com/intel-lab-lkp/linux/commits/Haowen-Bai/net-tulip-de4x5-remove-unused-variable/20220601-152922
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220601/202206012206.rmnA2Zg6-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c825abd6b0198fb088d9752f556a70705bc99dfd)
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
        # https://github.com/intel-lab-lkp/linux/commit/98c118e28527e7ff29469521c68414943a7cfc3a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Haowen-Bai/net-tulip-de4x5-remove-unused-variable/20220601-152922
        git checkout 98c118e28527e7ff29469521c68414943a7cfc3a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> drivers/net/ethernet/dec/tulip/de4x5.c:3823:2: error: use of undeclared identifier 'imr'
           UNMASK_IRQs;
           ^
   drivers/net/ethernet/dec/tulip/de4x5.c:694:5: note: expanded from macro 'UNMASK_IRQs'
       imr |= lp->irq_mask;\
       ^
>> drivers/net/ethernet/dec/tulip/de4x5.c:3823:2: error: use of undeclared identifier 'imr'
   drivers/net/ethernet/dec/tulip/de4x5.c:695:10: note: expanded from macro 'UNMASK_IRQs'
       outl(imr, DE4X5_IMR);               /* Unmask the IRQs */\
            ^
   drivers/net/ethernet/dec/tulip/de4x5.c:3826:2: error: use of undeclared identifier 'imr'
           ENABLE_IRQs;
           ^
   drivers/net/ethernet/dec/tulip/de4x5.c:683:5: note: expanded from macro 'ENABLE_IRQs'
       imr |= lp->irq_en;\
       ^
   drivers/net/ethernet/dec/tulip/de4x5.c:3826:2: error: use of undeclared identifier 'imr'
   drivers/net/ethernet/dec/tulip/de4x5.c:684:10: note: expanded from macro 'ENABLE_IRQs'
       outl(imr, DE4X5_IMR);               /* Enable the IRQs */\
            ^
   4 errors generated.


vim +/imr +3823 drivers/net/ethernet/dec/tulip/de4x5.c

^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3814  
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3815  static void
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3816  de4x5_setup_intr(struct net_device *dev)
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3817  {
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3818      struct de4x5_private *lp = netdev_priv(dev);
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3819      u_long iobase = dev->base_addr;
98c118e28527e7 drivers/net/ethernet/dec/tulip/de4x5.c Haowen Bai     2022-06-01  3820      s32 sts;
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3821  
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3822      if (inl(DE4X5_OMR) & OMR_SR) {   /* Only unmask if TX/RX is enabled */
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16 @3823  	UNMASK_IRQs;
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3824  	sts = inl(DE4X5_STS);        /* Reset any pending (stale) interrupts */
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3825  	outl(sts, DE4X5_STS);
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3826  	ENABLE_IRQs;
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3827      }
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3828  }
^1da177e4c3f41 drivers/net/tulip/de4x5.c              Linus Torvalds 2005-04-16  3829  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* Re: [PATCH] net: tulip: de4x5: remove unused variable
  2022-06-01  7:24 [PATCH] net: tulip: de4x5: remove unused variable Haowen Bai
  2022-06-01 14:38 ` kernel test robot
@ 2022-06-02  1:06 ` baihaowen
  1 sibling, 0 replies; 3+ messages in thread
From: baihaowen @ 2022-06-02  1:06 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-parisc, linux-kernel

在 2022/6/1 下午3:24, Haowen Bai 写道:
> The variable imr is initialized but never used otherwise.
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
>  drivers/net/ethernet/dec/tulip/de4x5.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
> index 71730ef4cd57..40a54827d599 100644
> --- a/drivers/net/ethernet/dec/tulip/de4x5.c
> +++ b/drivers/net/ethernet/dec/tulip/de4x5.c
> @@ -3817,10 +3817,9 @@ de4x5_setup_intr(struct net_device *dev)
>  {
>      struct de4x5_private *lp = netdev_priv(dev);
>      u_long iobase = dev->base_addr;
> -    s32 imr, sts;
> +    s32 sts;
>  
>      if (inl(DE4X5_OMR) & OMR_SR) {   /* Only unmask if TX/RX is enabled */
> -	imr = 0;
>  	UNMASK_IRQs;
>  	sts = inl(DE4X5_STS);        /* Reset any pending (stale) interrupts */
>  	outl(sts, DE4X5_STS);
Sorry, ignore this patch.

-- 
Haowen Bai


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

end of thread, other threads:[~2022-06-02  1:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01  7:24 [PATCH] net: tulip: de4x5: remove unused variable Haowen Bai
2022-06-01 14:38 ` kernel test robot
2022-06-02  1:06 ` baihaowen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).