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(a)gmail.com> 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.
--
Florian