[PATCH v3 03/16] can: m_can: Remove double interrupt enable

Markus Schneider-Pargmann posted 16 patches 2 years, 11 months ago
There is a newer version of this series
[PATCH v3 03/16] can: m_can: Remove double interrupt enable
Posted by Markus Schneider-Pargmann 2 years, 11 months ago
Interrupts are enabled a few lines further down as well. Remove this
second call to enable all interrupts.

Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
 drivers/net/can/m_can/m_can.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index 8eb327ae3bdf..5274d9642566 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1364,7 +1364,6 @@ static int m_can_chip_config(struct net_device *dev)
 	m_can_write(cdev, M_CAN_TEST, test);
 
 	/* Enable interrupts */
-	m_can_write(cdev, M_CAN_IR, IR_ALL_INT);
 	if (!(cdev->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING))
 		if (cdev->version == 30)
 			m_can_write(cdev, M_CAN_IE, IR_ALL_INT &
-- 
2.39.2
Re: [PATCH v3 03/16] can: m_can: Remove double interrupt enable
Posted by Simon Horman 2 years, 11 months ago
On Wed, Mar 15, 2023 at 12:05:33PM +0100, Markus Schneider-Pargmann wrote:
> Interrupts are enabled a few lines further down as well. Remove this
> second call to enable all interrupts.

nit: maybe 'duplicate' reads better than 'second', as this call comes first.

> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
> ---
>  drivers/net/can/m_can/m_can.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> index 8eb327ae3bdf..5274d9642566 100644
> --- a/drivers/net/can/m_can/m_can.c
> +++ b/drivers/net/can/m_can/m_can.c
> @@ -1364,7 +1364,6 @@ static int m_can_chip_config(struct net_device *dev)
>  	m_can_write(cdev, M_CAN_TEST, test);
>  
>  	/* Enable interrupts */
> -	m_can_write(cdev, M_CAN_IR, IR_ALL_INT);
>  	if (!(cdev->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING))
>  		if (cdev->version == 30)
>  			m_can_write(cdev, M_CAN_IE, IR_ALL_INT &
> -- 
> 2.39.2
>
Re: [PATCH v3 03/16] can: m_can: Remove double interrupt enable
Posted by Simon Horman 2 years, 11 months ago
On Thu, Mar 16, 2023 at 10:09:45AM +0100, Simon Horman wrote:
> On Wed, Mar 15, 2023 at 12:05:33PM +0100, Markus Schneider-Pargmann wrote:
> > Interrupts are enabled a few lines further down as well. Remove this
> > second call to enable all interrupts.
> 
> nit: maybe 'duplicate' reads better than 'second', as this call comes first.

I didn't mean to imply this should block progress.

Reviewed-by: Simon Horman <simon.horman@corigine.com>

> 
> > Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
> > ---
> >  drivers/net/can/m_can/m_can.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> > index 8eb327ae3bdf..5274d9642566 100644
> > --- a/drivers/net/can/m_can/m_can.c
> > +++ b/drivers/net/can/m_can/m_can.c
> > @@ -1364,7 +1364,6 @@ static int m_can_chip_config(struct net_device *dev)
> >  	m_can_write(cdev, M_CAN_TEST, test);
> >  
> >  	/* Enable interrupts */
> > -	m_can_write(cdev, M_CAN_IR, IR_ALL_INT);
> >  	if (!(cdev->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING))
> >  		if (cdev->version == 30)
> >  			m_can_write(cdev, M_CAN_IE, IR_ALL_INT &
> > -- 
> > 2.39.2
> >