Re: [PATCH 2/9] can: rcar_canfd: Use ndev parameter in rcar_canfd_set_bittiming()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/06/2025 at 20:54, Geert Uytterhoeven wrote:
> There is no need to do a back-and-forth "priv = netdev_priv(ndev)" and
> "priv->ndev" where the "ndev" parameter is available.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Are these still useful anyhow? You can get all the bittiming values through the
netlink interface.

Well, if you tell me these are still useful, then I trust you and OK to keep. If
not, consider removing.

> ---
>  drivers/net/can/rcar/rcar_canfd.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
> index 2174c9667cabce54..dbf17b16c18aa5cc 100644
> --- a/drivers/net/can/rcar/rcar_canfd.c
> +++ b/drivers/net/can/rcar/rcar_canfd.c
> @@ -1458,7 +1458,7 @@ static void rcar_canfd_set_bittiming(struct net_device *ndev)
>  		       RCANFD_NCFG_NSJW(gpriv, sjw) | RCANFD_NCFG_NTSEG2(gpriv, tseg2));
>  
>  		rcar_canfd_write(priv->base, RCANFD_CCFG(ch), cfg);
> -		netdev_dbg(priv->ndev, "nrate: brp %u, sjw %u, tseg1 %u, tseg2 %u\n",
> +		netdev_dbg(ndev, "nrate: brp %u, sjw %u, tseg1 %u, tseg2 %u\n",
>  			   brp, sjw, tseg1, tseg2);
>  
>  		/* Data bit timing settings */
> @@ -1471,7 +1471,7 @@ static void rcar_canfd_set_bittiming(struct net_device *ndev)
>  		       RCANFD_DCFG_DSJW(gpriv, sjw) | RCANFD_DCFG_DTSEG2(gpriv, tseg2));
>  
>  		rcar_canfd_write(priv->base, RCANFD_F_DCFG(gpriv, ch), cfg);
> -		netdev_dbg(priv->ndev, "drate: brp %u, sjw %u, tseg1 %u, tseg2 %u\n",
> +		netdev_dbg(ndev, "drate: brp %u, sjw %u, tseg1 %u, tseg2 %u\n",
>  			   brp, sjw, tseg1, tseg2);
>  	} else {
>  		/* Classical CAN only mode */
> @@ -1488,8 +1488,7 @@ static void rcar_canfd_set_bittiming(struct net_device *ndev)
>  		}
>  
>  		rcar_canfd_write(priv->base, RCANFD_CCFG(ch), cfg);
> -		netdev_dbg(priv->ndev,
> -			   "rate: brp %u, sjw %u, tseg1 %u, tseg2 %u\n",
> +		netdev_dbg(ndev, "rate: brp %u, sjw %u, tseg1 %u, tseg2 %u\n",
>  			   brp, sjw, tseg1, tseg2);
>  	}
>  }

Yours sincerely,
Vincent Mailhol





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux