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: <CAHp75VdoaL-66vDFeDWXg5V0XnL45F_JQZ_BNeaaOcSwQz5gnQ@mail.gmail.com>
Date: Mon, 15 Apr 2024 17:00:31 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: "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-kernel@...r.kernel.org, 
	devicetree@...r.kernel.org, linux-gpio@...r.kernel.org, 
	Peng Fan <peng.fan@....com>, Oleksii Moisieiev <oleksii_moisieiev@...m.com>
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>

..

> +#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.

> +#include <linux/err.h>

+ errno.h as ENOTSUPP is defined there and surprisingly err.h doesn't
include that.

+ mod_devicetable.h (for the ID table type definition)

> +#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()

..

> +       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;

..

> +       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.

--
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ