[PATCH v6 08/13] gpio: mxc: use local dev variable

Andy Shevchenko andy.shevchenko at gmail.com
Mon Oct 12 02:30:07 PDT 2026


On Sun, Oct 11, 2026 at 2:54 PM Peng Fan (OSS) <peng.fan at oss.nxp.com> wrote:
>
> Introduce a local 'struct device *dev' variable to replace repeated
> '&pdev->dev' dereferences throughout mxc_gpio_probe(), improving
> readability.

...

>  {
>         struct gpio_generic_chip_config config = { };
>         struct device_node *np = pdev->dev.of_node;

Why not this one? Is it even used? Perhaps you want to have

  struct fwnode_handle *fwnode = dev_fwnode(dev);

here?

> +       struct device *dev = &pdev->dev;
>         struct mxc_gpio_port *port;
>         int irq_count;
>         int irq_base;
>         int err;

...

> -       dev_info(&pdev->dev, "%s failed with errno %d\n", __func__, err);
> +       dev_info(dev, "%s failed with errno %d\n", __func__, err);

This message simply needs to be killed, with initcall_debug in the
kernel command line you will get something similar from driver core.

-- 
With Best Regards,
Andy Shevchenko



More information about the linux-arm-kernel mailing list