Re: [PATCH 03/12] timer: Protect lockdep functions with #ifdef

From: Thomas Gleixner
Date: Sun Apr 10 2022 - 18:46:53 EST


On Tue, Feb 08 2022 at 11:43, Namhyung Kim wrote:
> With upcoming lock tracepoints config, it'd define some of lockdep
> functions without enabling CONFIG_LOCKDEP actually. The existing code
> assumes those functions will be removed by the preprocessor but it's
> not the case anymore. Let's protect the code with #ifdef's
> explicitly.

This is lame. It's certainly possible to come up with replacement macros
which are compiled out when LOCKDEP is off for these use cases which are
not involved in lock tracepoint magic. Then just change these places
over to the new macros and keep the code free from this #ifdef ugliness.

Thanks,

tglx