Skip to content

Commit c31799b

Browse files
Sven Van Asbroeckkuba-moo
authored andcommitted
lan743x: clean up software_isr function
For no apparent reason, this function reads the INT_STS register, and checks if the software interrupt bit is set. These things have already been carried out by this function's only caller. Clean up by removing the redundant code. Tested-by: Sven Van Asbroeck <[email protected]> # lan7430 Signed-off-by: Sven Van Asbroeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent da43f0a commit c31799b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

drivers/net/ethernet/microchip/lan743x_main.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,13 @@ static int lan743x_csr_init(struct lan743x_adapter *adapter)
140140
return result;
141141
}
142142

143-
static void lan743x_intr_software_isr(void *context)
143+
static void lan743x_intr_software_isr(struct lan743x_adapter *adapter)
144144
{
145-
struct lan743x_adapter *adapter = context;
146145
struct lan743x_intr *intr = &adapter->intr;
147-
u32 int_sts;
148146

149-
int_sts = lan743x_csr_read(adapter, INT_STS);
150-
if (int_sts & INT_BIT_SW_GP_) {
151-
/* disable the interrupt to prevent repeated re-triggering */
152-
lan743x_csr_write(adapter, INT_EN_CLR, INT_BIT_SW_GP_);
153-
intr->software_isr_flag = 1;
154-
}
147+
/* disable the interrupt to prevent repeated re-triggering */
148+
lan743x_csr_write(adapter, INT_EN_CLR, INT_BIT_SW_GP_);
149+
intr->software_isr_flag = 1;
155150
}
156151

157152
static void lan743x_tx_isr(void *context, u32 int_sts, u32 flags)

0 commit comments

Comments
 (0)