Re: [PATCH v2] rtc: Add some dummy static inline functions

From: Thomas Gleixner
Date: Fri Sep 09 2016 - 11:17:11 EST


On Thu, 8 Sep 2016, Baolin Wang wrote:

> The patch (commit id: a0a6e06d545a753740c9d8d5ce2c4fdd3ab1c021) adding
> tracepoints for alarmtimers will build failed on S390 platform, due to
> S390 defconfig did not define CONFIG_RTC_LIB macro to define the
> rtc_ktime_to_tm() function which is used in this patch. Thus we should
> add dummy static inline functions in case CONFIG_RTC_LIB is not defined.

I doubt this is a good idea. It will paper over usage of rtc lib functions
in generic code which will then lead to weird results on builds with
RTC_LIB=n.

Johns variant of making it conditional in the tracepoint is way safer.

Thanks

tglx