Re: [linux-next:master 3824/6048] drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused variable 'xrs700x_i2c_dt_ids'

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

 



On Tue, Feb 9, 2021 at 10:55 PM Florian Fainelli <f.fainelli@xxxxxxxxx> wrote:
>
> On 2/9/21 9:23 AM, Vladimir Oltean wrote:
> > On Tue, Feb 09, 2021 at 11:18:12AM -0600, George McCollister wrote:
> >> On Tue, Feb 9, 2021 at 10:33 AM Souptick Joarder <jrdr.linux@xxxxxxxxx> wrote:
> >>> I think, this can defined under #ifdef CONFIG_OF.
> >>
> >> Was this robot reporting this warning for other DSA drivers? A lot of
> >> them appear to use of_device_id in the same manner (unless I'm missing
> >> something). Do we need to do something DSA wide to deal with this?
> >
> > Probably not DSA-wide since we still have drivers that probe on platform
> > data and not OF (dsa_loop), but individual drivers should have "depends
> > on OF" in Kconfig as far as I can tell.
>
> Not necessarily, there is a runtime dependency on OF being available for
> probing but as far as building goes there are stubs provided for when
> CONFIG_OF=n which allow the driver to continue to build.
>
> Adding either an #ifdef CONFIG_OF or __maybe_unused should silence those
> warnings.

Agree. Some of the similar warning in other drivers was fixed in the same way.
> --
> Florian




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux