netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e1000: drop unneeded assignment in e1000_set_itr()
@ 2020-10-11 21:23 Sudip Mukherjee
  2020-10-12 13:49 ` [linux-safety] " Lukas Bulwahn
  0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2020-10-11 21:23 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S . Miller, Jakub Kicinski
  Cc: linux-kernel, linux-safety, intel-wired-lan, netdev, Sudip Mukherjee

The variable 'current_itr' is assigned to 0 before jumping to
'set_itr_now' but it has not been used after the jump. So, remove the
unneeded assignement.

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
 drivers/net/ethernet/intel/e1000/e1000_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 5e28cf4fa2cd..042de276e632 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -2632,7 +2632,6 @@ static void e1000_set_itr(struct e1000_adapter *adapter)
 
 	/* for non-gigabit speeds, just fix the interrupt rate at 4000 */
 	if (unlikely(adapter->link_speed != SPEED_1000)) {
-		current_itr = 0;
 		new_itr = 4000;
 		goto set_itr_now;
 	}
-- 
2.11.0


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

* Re: [linux-safety] [PATCH] e1000: drop unneeded assignment in e1000_set_itr()
  2020-10-11 21:23 [PATCH] e1000: drop unneeded assignment in e1000_set_itr() Sudip Mukherjee
@ 2020-10-12 13:49 ` Lukas Bulwahn
  0 siblings, 0 replies; 2+ messages in thread
From: Lukas Bulwahn @ 2020-10-12 13:49 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: Jesse Brandeburg, Tony Nguyen, David S . Miller, Jakub Kicinski,
	linux-kernel, linux-safety, intel-wired-lan, netdev



On Sun, 11 Oct 2020, Sudip Mukherjee wrote:

> The variable 'current_itr' is assigned to 0 before jumping to
> 'set_itr_now' but it has not been used after the jump. So, remove the
> unneeded assignement.
> 
> Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> ---
>  drivers/net/ethernet/intel/e1000/e1000_main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index 5e28cf4fa2cd..042de276e632 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -2632,7 +2632,6 @@ static void e1000_set_itr(struct e1000_adapter *adapter)
>  
>  	/* for non-gigabit speeds, just fix the interrupt rate at 4000 */
>  	if (unlikely(adapter->link_speed != SPEED_1000)) {
> -		current_itr = 0;
>  		new_itr = 4000;
>  		goto set_itr_now;
>  	}

Alternatively, you could just inline the max(...) into the switch and 
completely drop the current_itr definition.

But your solution probably does the job: it is a "No functional change" 
commit.

Reviewed-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>


Lukas

> -- 
> 2.11.0
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#77): https://lists.elisa.tech/g/linux-safety/message/77
> Mute This Topic: https://lists.elisa.tech/mt/77448709/1714638
> Group Owner: linux-safety+owner@lists.elisa.tech
> Unsubscribe: https://lists.elisa.tech/g/linux-safety/unsub [lukas.bulwahn@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 
> 
> 

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

end of thread, other threads:[~2020-10-12 13:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-11 21:23 [PATCH] e1000: drop unneeded assignment in e1000_set_itr() Sudip Mukherjee
2020-10-12 13:49 ` [linux-safety] " Lukas Bulwahn

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