[PATCH v6 08/13] gpio: mxc: use local dev variable
Peng Fan
peng.fan at oss.nxp.com
Mon Oct 12 03:05:42 PDT 2026
On Mon, Oct 12, 2026 at 12:30:07PM +0300, Andy Shevchenko wrote:
>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
of_alias_get_id() is used, there is no counterpart in fwnode api for it.
>
> 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.
ok. Let me fold the change in this patch, I would not introduce
another patch to just drop this line.
Thanks
Peng
>
>--
>With Best Regards,
>Andy Shevchenko
>
More information about the linux-arm-kernel
mailing list