lkml.org 
[lkml]   [2019]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpio: omap: avoid clang warning
On Mon, Mar 11, 2019 at 10:40 AM Bartosz Golaszewski
<bgolaszewski@baylibre.com> wrote:
> czw., 7 mar 2019 o 11:39 Arnd Bergmann <arnd@arndb.de> 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

\
 
 \ /
  Last update: 2019-03-11 13:10    [W:0.039 / U:5.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site