Re: [PATCH v6 08/13] gpio: mxc: use local dev variable
From: Andy Shevchenko
Date: Mon Oct 12 2026 - 05:35:17 EST
On Sun, Oct 11, 2026 at 2:54 PM Peng Fan (OSS) <peng.fan@xxxxxxxxxxx> 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