2021-10-18 08:53:31

by CGEL

[permalink] [raw]
Subject: [PATCH linux-next] e1000e: Remove redundant statement

This assignment statement is meaningless, because the statement
will execute to the tag "set_itr_now".

The clang_analyzer complains as follows:

drivers/net/ethernet/intel/e1000e/netdev.c:2552:3 warning:

Value stored to 'current_itr' is never read.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: luo penghao <[email protected]>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index ff8672a..21ec716 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -2549,7 +2549,6 @@ static void e1000_set_itr(struct e1000_adapter *adapter)

/* for non-gigabit speeds, just fix the interrupt rate at 4000 */
if (adapter->link_speed != SPEED_1000) {
- current_itr = 0;
new_itr = 4000;
goto set_itr_now;
}
--
2.15.2



2021-10-18 16:28:51

by Jesse Brandeburg

[permalink] [raw]
Subject: Re: [PATCH linux-next] e1000e: Remove redundant statement

On 10/18/2021 1:51 AM, luo penghao wrote:
> This assignment statement is meaningless, because the statement
> will execute to the tag "set_itr_now".
>
> The clang_analyzer complains as follows:
>
> drivers/net/ethernet/intel/e1000e/netdev.c:2552:3 warning:
>
> Value stored to 'current_itr' is never read.
>
> Reported-by: Zeal Robot <[email protected]>
> Signed-off-by: luo penghao <[email protected]>

Reviewed-by: Jesse Brandeburg <[email protected]>

2021-10-19 11:51:55

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH linux-next] e1000e: Remove redundant statement

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <[email protected]>:

On Mon, 18 Oct 2021 08:51:54 +0000 you wrote:
> This assignment statement is meaningless, because the statement
> will execute to the tag "set_itr_now".
>
> The clang_analyzer complains as follows:
>
> drivers/net/ethernet/intel/e1000e/netdev.c:2552:3 warning:
>
> [...]

Here is the summary with links:
- [linux-next] e1000e: Remove redundant statement
https://git.kernel.org/netdev/net-next/c/1bd297988b75

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html