Re: [PATCH] gpio: omap: avoid clang warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 11, 2019 at 10:40 AM Bartosz Golaszewski
<bgolaszewski@xxxxxxxxxxxx> wrote:
> czw., 7 mar 2019 o 11:39 Arnd Bergmann <arnd@xxxxxxxx> napisał(a):
> > clang warns about a tentative array definition in the gpio-omap driver:
> >
> > drivers/gpio/gpio-omap.c:1282:34: error: tentative array definition assumed to have one element [-Werror]
> > static const struct of_device_id omap_gpio_match[];
> >
> > It's best to just reorder the entire file to avoid forward declarations,
> > which lets us use the regular declaration. To do this, the unnecessary
> > CONFIG_OF check must also be removed.
> >

> > +static const struct dev_pm_ops gpio_pm_ops = {
> > +       SET_RUNTIME_PM_OPS(omap_gpio_runtime_suspend, omap_gpio_runtime_resume,
> > +                                                                       NULL)
> > +};
> > +
> >  static struct platform_driver omap_gpio_driver = {
> >         .probe          = omap_gpio_probe,
> >         .remove         = omap_gpio_remove,
> >         .driver         = {
> >                 .name   = "omap_gpio",
> >                 .pm     = &gpio_pm_ops,
> > -               .of_match_table = of_match_ptr(omap_gpio_match),
> > +               .of_match_table = omap_gpio_match,
>
> This doesn't seem like a logical part of this commit. Can you send a
> separate patch?
>
> Other than that, looks good to me.

This change has to be kept together the with removal of the #ifdef,
otherwise I'd introduce a new warning about an unused variable.

I could try to split out the reordering of the file though.

      Arnd



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux