Re: [linux-safety] [PATCH] e1000: drop unneeded assignment in e1000_set_itr()
"Lukas Bulwahn" <[email protected]> Mon, 12 Oct 2020 15:49:48 +0200 (CEST)
| Newsgroups | tech.elisa.lists.linux-safety,org.kernel.vger.linux-kernel,org.kernel.vger.netdev,org.osuosl.intel-wired-lan |
|---|---|
| Message-ID | <alpine.DEB.2.21.2010121546470.6487@felia> |
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 <[email protected]> > --- > 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 <[email protected]> Lukas > -- > 2.11.0 > > > > > > >