lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7ddd0177-fdaa-0cf2-dd0d-90005ba3bf9f@ti.com>
Date:   Tue, 17 Nov 2020 08:01:52 -0600
From:   Dan Murphy <dmurphy@...com>
To:     Marc Kleine-Budde <mkl@...gutronix.de>, <netdev@...r.kernel.org>
CC:     <davem@...emloft.net>, <kuba@...nel.org>,
        <linux-can@...r.kernel.org>, <kernel@...gutronix.de>,
        Wu Bo <wubo.oduw@...il.com>
Subject: Re: [net 12/15] can: m_can: m_can_handle_state_change(): fix state
 change

Marc

On 11/15/20 11:41 AM, Marc Kleine-Budde wrote:
> From: Wu Bo <wubo.oduw@...il.com>
>
> m_can_handle_state_change() is called with the new_state as an argument.
>
> In the switch statements for CAN_STATE_ERROR_ACTIVE, the comment and the
> following code indicate that a CAN_STATE_ERROR_WARNING is handled.
>
> This patch fixes this problem by changing the case to CAN_STATE_ERROR_WARNING.
>
> Signed-off-by: Wu Bo <wubo.oduw@...il.com>
> Link: http://lore.kernel.org/r/20200129022330.21248-2-wubo.oduw@gmail.com
> Cc: Dan Murphy <dmurphy@...com>
> Fixes: e0d1f4816f2a ("can: m_can: add Bosch M_CAN controller support")
> Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
> ---
>   drivers/net/can/m_can/m_can.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> index 02c5795b7393..63887e23d89c 100644
> --- a/drivers/net/can/m_can/m_can.c
> +++ b/drivers/net/can/m_can/m_can.c
> @@ -665,7 +665,7 @@ static int m_can_handle_state_change(struct net_device *dev,
>   	unsigned int ecr;
>   
>   	switch (new_state) {
> -	case CAN_STATE_ERROR_ACTIVE:
> +	case CAN_STATE_ERROR_WARNING:
>   		/* error warning state */
>   		cdev->can.can_stats.error_warning++;
>   		cdev->can.state = CAN_STATE_ERROR_WARNING;
> @@ -694,7 +694,7 @@ static int m_can_handle_state_change(struct net_device *dev,
>   	__m_can_get_berr_counter(dev, &bec);
>   
>   	switch (new_state) {
> -	case CAN_STATE_ERROR_ACTIVE:
> +	case CAN_STATE_ERROR_WARNING:
>   		/* error warning state */
>   		cf->can_id |= CAN_ERR_CRTL;
>   		cf->data[1] = (bec.txerr > bec.rxerr) ?

Reviewed-by: Dan Murphy<dmurphy@...com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ