Re: [PATCH v2] hwclock: define cmos_interface only if necessary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 23, 2019 at 07:30:52PM -0300, unixmania@xxxxxxxxx wrote:
> Make the static declaration of the cmos_interface struct and related
> functions conditional to i386/x86_64, preventing several "defined but
> not used" compiler warnings.

I think we have to be more aggressive :-) It would be better to:

./configure.ac:
 * add --disable-hwclock-cmos
 * add USE_HWCLOCK_CMOS (enabled by default for i386/x86_64)
 * add define(USE_HWCLOCK_CMOS) 

sys-utils/Makemodule.am:
 * compile hwclock-cmos.c only "if USE_HWCLOCK_CMOS"

hwclock:
 * remove all unnecessary #ifdefs from hwclock-cmos.c
 * add #ifdef USE_HWCLOCK_CMOS to hwclock.c:determine_clock_access_method()


Note that we already use the same for RTC (which is linux only).

The result will be more readable hwclock-cmos.c and only optional cmos
code compilation.

    Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux