Re: [PATCH] ASoC: codecs: rk3308: fix building without CONFIG_OF

Arnd Bergmann
2024-04-04T13:46:37Z

On Thu, Apr 4, 2024, at 15:30, Luca Ceresoli wrote:
> On Thu, 4 Apr 2024 11:57:34 +0200
>
> Thanks for your report!
>
> The warning has already been reported by the kernel test robot
> <lkp@intel.com> and I have sent a patch to fix it:
> https://lore.kernel.org/linux-sound/20240403-rk3308-audio-codec-fix-warning-v2-1-816bae4c1dc5@bootlin.com/
>
> The approach I took is different though: I have added __maybe_unused
> instead, which has the advantage of not adding a struct of_device_id
> array to kernel built without CONFIG_OF.
>
> My patch has already been taken by Mark. I hope this is fine as well for
> you.

We can clean it up later. Adding __maybe_unused is completely
pointless here, as the purpose of the of_match_ptr() macro
is just to deal with ID tables that were hidden behind an
#ifdef, which yours is not.

Arnd