[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCICZxMT6Y7k7Kz1@smile.fi.intel.com>
Date: Mon, 12 May 2025 17:15:03 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Rahul Pathak <rpathak@...tanamicro.com>
Cc: Anup Patel <apatel@...tanamicro.com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Jassi Brar <jassisinghbrar@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Uwe Kleine-König <ukleinek@...nel.org>,
Palmer Dabbelt <palmer@...belt.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Len Brown <lenb@...nel.org>, Sunil V L <sunilvl@...tanamicro.com>,
Leyfoon Tan <leyfoon.tan@...rfivetech.com>,
Atish Patra <atish.patra@...ux.dev>,
Andrew Jones <ajones@...tanamicro.com>,
Samuel Holland <samuel.holland@...ive.com>,
Anup Patel <anup@...infault.org>, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org, rahul@...mations.net
Subject: Re: [PATCH v3 10/23] clk: Add clock driver for the RISC-V RPMI clock
service group
On Mon, May 12, 2025 at 03:28:37PM +0530, Rahul Pathak wrote:
> On Mon, May 12, 2025 at 12:38 PM Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:
> > On Sun, May 11, 2025 at 07:09:26PM +0530, Anup Patel wrote:
...
> > > +struct rpmi_get_supp_rates_rx {
> > > + u32 status;
> > > + u32 flags;
> > > + u32 remaining;
> > > + u32 returned;
> > > + u32 rates[];
> > > +};
> >
> > Is it ABI? (I mean if this is interface with some kind of FW)
> > If so, Use proper endianess aware types. Same Q for all data
> > types defined in this driver.
>
> Sure.
>
> It's the message format defined by the RISC-V RPMI spec.
So, use the endianess as provided. Or is it always native endianess?
...
> > > + devm_kfree(context->dev, rx);
> >
> > Why?! This is a red flag to point that here is misunderstanding or abuse of
> > managed resources approach. Either use __Free() from cleanup.h or don't call
> > devm_kfree(). The latter must have a very good justification to explain why.
>
> Yeah, I think it's better to use kzalloc for this case and then free it.
Instead of freeing it explicitly consider using cleanup.h, i.e. __free().
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists