Re: [PATCH] serial: pic32: Fix build warning when CONFIG_OF is disabled
From: Yu-Chun Lin
Date: Mon Jan 27 2025 - 05:07:26 EST
On Mon, Jan 27, 2025 at 10:12:47AM +0100, Greg KH wrote:
> > So I should remove of_match_ptr and add the CONFIG_OF as a dependency
> > for the configuration. Correct?
>
> I don't know, but putting #ifdef in .c files is not the correct solution
> at all.
I fixed the build warning this way because I saw it was done the same way
in these three files:
drivers/tty/serial/samsung_tty.c
drivers/tty/serial/mps2-uart.c
drivers/tty/serial/altera_jtaguart.c
Or maybe we can add __maybe_unused to avoid the warning?
Yu-Chun Lin