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]
Date:   Mon, 24 Oct 2022 16:40:24 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     biju.das.jz@...renesas.com
Cc:     Wolfgang Grandegger <wg@...ndegger.com>,
        Marc Kleine-Budde <mkl@...gutronix.de>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Vincent Mailhol <mailhol.vincent@...adoo.fr>,
        Stefan Mätje <stefan.maetje@....eu>,
        Ulrich Hecht <uli+renesas@...nd.eu>,
        Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        linux-can@...r.kernel.org, netdev@...r.kernel.org,
        Chris Paterson <Chris.Paterson2@...esas.com>,
        Biju Das <biju.das@...renesas.com>,
        linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH 1/6] can: rcar_canfd: rcar_canfd_probe: Add struct
 rcar_canfd_hw_info to driver data

Hi Biju,

On Sat, Oct 22, 2022 at 1:02 PM Biju Das <biju.das.jz@...renesas.com> wrote:
> The CAN FD IP found on RZ/G2L SoC has some HW features different to that
> of R-Car. For example, it has multiple resets and multiple IRQs for global
> and channel interrupts. Also, it does not have ECC error flag registers
> and clk post divider present on R-Car. Similarly, R-Car V3U has 8 channels
> whereas other SoCs has only 2 channels.
>
> This patch adds the struct rcar_canfd_hw_info to take care of the
> HW feature differences and driver data present on both IPs. It also
> replaces the driver data chip type with struct rcar_canfd_hw_info by
> moving chip type to it.
>
> Signed-off-by: Biju Das <biju.das.jz@...renesas.com>

Thanks for your patch!

> --- a/drivers/net/can/rcar/rcar_canfd.c
> +++ b/drivers/net/can/rcar/rcar_canfd.c

> @@ -591,10 +595,22 @@ static const struct can_bittiming_const rcar_canfd_bittiming_const = {
>         .brp_inc = 1,
>  };
>
> +static const struct rcar_canfd_hw_info rcar_gen3_hw_info = {
> +       .chip_id = RENESAS_RCAR_GEN3,
> +};
> +
> +static const struct rcar_canfd_hw_info rzg2l_hw_info = {
> +       .chip_id = RENESAS_RZG2L,
> +};
> +
> +static const struct rcar_canfd_hw_info r8a779a0_hw_info = {
> +       .chip_id = RENESAS_R8A779A0,
> +};
> +
>  /* Helper functions */
>  static inline bool is_v3u(struct rcar_canfd_global *gpriv)
>  {
> -       return gpriv->chip_id == RENESAS_R8A779A0;
> +       return gpriv->info == &r8a779a0_hw_info;

"return gpriv->info->chip_id == RENESAS_R8A779A0;" would match all
the other changes you make. But I see why you did it this way...
((most) users of is_v3u() are not converted to feature flags (yet) ;-)

Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ