[PATCH v2 -next] perf/marvell: cn10k Fix build error without CONFIG_OF

Arnd Bergmann arnd at arndb.de
Thu Mar 10 02:04:21 PST 2022


On Thu, Mar 10, 2022 at 10:58 AM Will Deacon <will at kernel.org> wrote:
> On Thu, Mar 10, 2022 at 02:50:45PM +0800, YueHaibing wrote:
>
> Ah, sorry, I already fixed this when the conflict was first reported:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?h=for-next/perf&id=6676a42f1e4f1b8ec166b723a3801b7113c25a0e
>
> However, I thought this driver could be compile-tested on architectures
> without OF and then we'd get some report from that? At least, I'm certain
> I've _added_ these ifdefs to other PMU drivers in the past.

The #ifdefs are never really needed, the only reason to have them is
to save a few bytes on architectures that don't normally use DT,
at the expense of making it slightly less readable.

For compile-testing purposes we don't care about the size of the module,
and compiling in the table unconditionally is easier.

          Arnd



More information about the linux-arm-kernel mailing list