[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<DU0PR04MB941773C6DFD95237ED051E8A88082@DU0PR04MB9417.eurprd04.prod.outlook.com>
Date: Tue, 16 Apr 2024 06:47:02 +0000
From: Peng Fan <peng.fan@....com>
To: Andy Shevchenko <andy.shevchenko@...il.com>, "Peng Fan (OSS)"
<peng.fan@....nxp.com>
CC: Sudeep Holla <sudeep.holla@....com>, Cristian Marussi
<cristian.marussi@....com>, Rob Herring <robh@...nel.org>, Krzysztof
Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley
<conor+dt@...nel.org>, Linus Walleij <linus.walleij@...aro.org>, Dan
Carpenter <dan.carpenter@...aro.org>, Dhruva Gole <d-gole@...com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "linux-gpio@...r.kernel.org"
<linux-gpio@...r.kernel.org>, Oleksii Moisieiev <oleksii_moisieiev@...m.com>
Subject: RE: [PATCH v10 4/4] pinctrl: Implementation of the generic
scmi-pinctrl driver
> Subject: Re: [PATCH v10 4/4] pinctrl: Implementation of the generic scmi-
> pinctrl driver
>
> On Mon, Apr 15, 2024 at 11:43 AM Peng Fan (OSS) <peng.fan@....nxp.com>
> wrote:
> >
> > From: Peng Fan <peng.fan@....com>
> >
> > scmi-pinctrl driver implements pinctrl driver interface and using SCMI
> > protocol to redirect messages from pinctrl subsystem SDK to SCMI
> > platform firmware, which does the changes in HW.
>
> Below are some cosmetics, but in general LGTM, thanks!
> Reviewed-by: Andy Shevchenko <andy@...nel.org>
Thanks for help reviewing the patchset.
>
> ...
>
> > +#include <linux/device.h>
> > +#include <linux/dev_printk.h>
>
> The second one is guaranteed to be included by the first one, so dev_printk.h
> can be removed.
Fix in v11.
>
> > +#include <linux/err.h>
>
> + errno.h as ENOTSUPP is defined there and surprisingly err.h doesn't
> include that.
Ok, include errno.h in v11.
>
> + mod_devicetable.h (for the ID table type definition)
Fix in v11.
>
> > +#include <linux/module.h>
> > +#include <linux/scmi_protocol.h>
> > +#include <linux/slab.h>
> > +#include <linux/types.h>
>
> ...
>
> > +/* Define num configs, if not large than 4 use stack, else use
> > +kcalloc */
>
> kcalloc()
Fix in v11.
>
> ...
>
> > + ret = pinctrl_ops->settings_get_one(pmx->ph, pin, PIN_TYPE, type,
> > + &config_value);
> > + if (ret) {
> > + /* Convert SCMI error code to PINCTRL expected error code */
> > + if (ret == -EOPNOTSUPP)
> > + ret = -ENOTSUPP;
> > + return ret;
> > + }
>
> It can be split as
>
> ret = pinctrl_ops->settings_get_one(pmx->ph, pin, PIN_TYPE, type,
> &config_value);
> /* Convert SCMI error code to PINCTRL expected error code */
> if (ret == -EOPNOTSUPP)
> return -ENOTSUPP;
> if (ret)
> return ret;
Fix in v11.
>
> ...
>
> > + ret = pinctrl_ops->settings_get_one(pmx->ph, group, GROUP_TYPE,
> type,
> > + &config_value);
> > + if (ret) {
> > + /* Convert SCMI error code to PINCTRL expected error code */
> > + if (ret == -EOPNOTSUPP)
> > + ret = -ENOTSUPP;
> > + return ret;
> > + }
>
> As per above.
Ditto.
Thanks,
Peng.
>
> --
> With Best Regards,
> Andy Shevchenko
Powered by blists - more mailing lists