From: "Nguyen, Anthony L" <anthony.l.nguyen@intel.com>
To: "cgel.zte@gmail.com" <cgel.zte@gmail.com>,
"Brandeburg, Jesse" <jesse.brandeburg@intel.com>
Cc: "luo.penghao@zte.com.cn" <luo.penghao@zte.com.cn>,
"zealci@zte.com.cn" <zealci@zte.com.cn>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"kuba@kernel.org" <kuba@kernel.org>,
"intel-wired-lan@lists.osuosl.org"
<intel-wired-lan@lists.osuosl.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH linux-next] e1000e: Remove useless variables
Date: Thu, 18 Nov 2021 00:06:02 +0000 [thread overview]
Message-ID: <9278b8115aab6a1a01987ce62dcd390299477bc1.camel@intel.com> (raw)
In-Reply-To: <20211111090712.158901-1-luo.penghao@zte.com.cn>
On Thu, 2021-11-11 at 09:07 +0000, cgel.zte@gmail.com wrote:
> From: luo penghao <luo.penghao@zte.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");
| ^~~~~
prev parent reply other threads:[~2021-11-18 0:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 9:07 cgel.zte
2021-11-18 0:06 ` Nguyen, Anthony L [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9278b8115aab6a1a01987ce62dcd390299477bc1.camel@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=cgel.zte@gmail.com \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luo.penghao@zte.com.cn \
--cc=netdev@vger.kernel.org \
--cc=zealci@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®