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: <YgUP8O/HEKA1fOm/@vergenet.net>
Date:   Thu, 10 Feb 2022 14:15:28 +0100
From:   Simon Horman <horms@...ge.net.au>
To:     Ulrich Hecht <uli+renesas@...nd.eu>
Cc:     linux-renesas-soc@...r.kernel.org, netdev@...r.kernel.org,
        davem@...emloft.net, linux-can@...r.kernel.org,
        prabhakar.mahadev-lad.rj@...renesas.com,
        biju.das.jz@...renesas.com, wsa@...nel.org,
        yoshihiro.shimoda.uh@...esas.com, wg@...ndegger.com,
        mkl@...gutronix.de, kuba@...nel.org, mailhol.vincent@...adoo.fr,
        socketcan@...tkopp.net, geert@...ux-m68k.org,
        kieran.bingham@...asonboard.com
Subject: Re: [PATCH v3 1/4] can: rcar_canfd: Add support for r8a779a0 SoC

On Wed, Feb 09, 2022 at 05:38:03PM +0100, Ulrich Hecht wrote:
> Adds support for the CANFD IP variant in the V3U SoC.
> 
> Differences to controllers in other SoCs are limited to an increase in
> the number of channels from two to eight, an absence of dedicated
> registers for "classic" CAN mode, and a number of differences in magic
> numbers (register offsets and layouts).
> 
> Inspired by BSP patch by Kazuya Mizuguchi.
> 
> Signed-off-by: Ulrich Hecht <uli+renesas@...nd.eu>

Hi Ulrich,

for some reason this caught by eye.

> @@ -740,12 +784,16 @@ static void rcar_canfd_configure_afl_rules(struct rcar_canfd_global *gpriv,
>  			    RCANFD_GAFLECTR_AFLDAE));
>  
>  	/* Write number of rules for channel */
> -	rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLCFG0,
> +	rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLCFG(ch),
>  			   RCANFD_GAFLCFG_SETRNC(ch, num_rules));
> -	if (gpriv->fdmode)
> -		offset = RCANFD_F_GAFL_OFFSET;
> -	else
> -		offset = RCANFD_C_GAFL_OFFSET;
> +	if (is_v3u(gpriv)) {
> +		offset = RCANFD_V3U_GAFL_OFFSET;
> +	} else {
> +		if (gpriv->fdmode)
> +			offset = RCANFD_F_GAFL_OFFSET;
> +		else
> +			offset = RCANFD_C_GAFL_OFFSET;
> +	}

nit: this could be:

	if (is_v3u(gpriv))
		offset = RCANFD_V3U_GAFL_OFFSET;
	else if (gpriv->fdmode)
		offset = RCANFD_F_GAFL_OFFSET;
	else
		offset = RCANFD_C_GAFL_OFFSET;

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ