lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 18 Nov 2021 00:06:02 +0000
From:   "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>
To:     "cgel.zte@...il.com" <cgel.zte@...il.com>,
        "Brandeburg, Jesse" <jesse.brandeburg@...el.com>
CC:     "luo.penghao@....com.cn" <luo.penghao@....com.cn>,
        "zealci@....com.cn" <zealci@....com.cn>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH linux-next] e1000e: Remove useless variables

On Thu, 2021-11-11 at 09:07 +0000, cgel.zte@...il.com wrote:
> From: luo penghao <luo.penghao@....com.cn>
> 
> This variable is not used in the function.
> 
> The clang_analyzer complains as follows:
> 
> drivers/net/ethernet/intel/e1000e/netdev.c:916:19 warning
> drivers/net/ethernet/intel/e1000e/netdev.c:1310:19 warning
> 
> Value stored to 'hw' during its initialization is never read

This patch also doesn't build:

In file included from ./include/linux/printk.h:555,
                 from ./include/linux/kernel.h:20,
                 from ./arch/x86/include/asm/percpu.h:27,
                 from ./arch/x86/include/asm/current.h:6,
                 from ./arch/x86/include/asm/processor.h:17,
                 from ./arch/x86/include/asm/timex.h:5,
                 from ./include/linux/timex.h:65,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from drivers/net/ethernet/intel/e1000e/netdev.c:6:
drivers/net/ethernet/intel/e1000e/netdev.c: In function
e1000_clean_rx_irq:
drivers/net/ethernet/intel/e1000e/e1000.h:31:20: error: hw undeclared
(first use in this function)
   31 |         netdev_dbg(hw->adapter->netdev, format, ## arg)
      |                    ^~
./include/linux/dynamic_debug.h:134:29: note: in definition of macro
__dynamic_func_call
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
./include/linux/dynamic_debug.h:170:9: note: in expansion of macro
_dynamic_func_call
  170 |         _dynamic_func_call(fmt, __dynamic_netdev_dbg,         
\
      |         ^~~~~~~~~~~~~~~~~~
./include/linux/netdevice.h:4950:9: note: in expansion of macro
dynamic_netdev_dbg
 4950 |         dynamic_netdev_dbg(__dev, format, ##args);            
\
      |         ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/e1000e/e1000.h:31:9: note: in expansion of
macro netdev_dbg
   31 |         netdev_dbg(hw->adapter->netdev, format, ## arg)
      |         ^~~~~~~~~~
drivers/net/ethernet/intel/e1000e/netdev.c:970:25: note: in expansion
of macro e_dbg
  970 |                         e_dbg("Receive packet consumed multiple
buffers\n");
      |                         ^~~~~
drivers/net/ethernet/intel/e1000e/e1000.h:31:20: note: each undeclared
identifier is reported only once for each function it appears in
   31 |         netdev_dbg(hw->adapter->netdev, format, ## arg)
      |                    ^~
./include/linux/dynamic_debug.h:134:29: note: in definition of macro
__dynamic_func_call
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
./include/linux/dynamic_debug.h:170:9: note: in expansion of macro
_dynamic_func_call
  170 |         _dynamic_func_call(fmt, __dynamic_netdev_dbg,         
\
      |         ^~~~~~~~~~~~~~~~~~
./include/linux/netdevice.h:4950:9: note: in expansion of macro
dynamic_netdev_dbg
 4950 |         dynamic_netdev_dbg(__dev, format, ##args);            
\
      |         ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/e1000e/e1000.h:31:9: note: in expansion of
macro netdev_dbg
   31 |         netdev_dbg(hw->adapter->netdev, format, ## arg)
      |         ^~~~~~~~~~
drivers/net/ethernet/intel/e1000e/netdev.c:970:25: note: in expansion
of macro e_dbg
  970 |                         e_dbg("Receive packet consumed multiple
buffers\n");
      |                         ^~~~~
drivers/net/ethernet/intel/e1000e/netdev.c: In function
e1000_clean_rx_irq_ps:
drivers/net/ethernet/intel/e1000e/e1000.h:31:20: error: hw undeclared
(first use in this function)
   31 |         netdev_dbg(hw->adapter->netdev, format, ## arg)
      |                    ^~
./include/linux/dynamic_debug.h:134:29: note: in definition of macro
__dynamic_func_call
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
./include/linux/dynamic_debug.h:170:9: note: in expansion of macro
_dynamic_func_call
  170 |         _dynamic_func_call(fmt, __dynamic_netdev_dbg,         
\
      |         ^~~~~~~~~~~~~~~~~~
./include/linux/netdevice.h:4950:9: note: in expansion of macro
dynamic_netdev_dbg
 4950 |         dynamic_netdev_dbg(__dev, format, ##args);            
\
      |         ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/e1000e/e1000.h:31:9: note: in expansion of
macro netdev_dbg
   31 |         netdev_dbg(hw->adapter->netdev, format, ## arg)
      |         ^~~~~~~~~~
drivers/net/ethernet/intel/e1000e/netdev.c:1356:25: note: in expansion
of macro e_dbg
 1356 |                         e_dbg("Packet Split buffers didn't pick
up the full packet\n");
      |                         ^~~~~


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ