[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z6tAKThLxVc3fxTd@smile.fi.intel.com>
Date: Tue, 11 Feb 2025 14:18:49 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Cc: Anna-Maria Behnsen <anna-maria@...utronix.de>,
Frederic Weisbecker <frederic@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>
Subject: Re: [rfc, PATCH v1 1/1] hrtimers: Refactor
hrtimer_clock_to_base_table initialisation
On Mon, Feb 10, 2025 at 10:26:02AM +0200, Andy Shevchenko wrote:
> Clang complains about overlapped initialisers in the
> hrtimer_clock_to_base_table definition. With `make W=1` and
> CONFIG_WERROR=y (which is default nowadays) this breaks
> the build:
>
> CC kernel/time/hrtimer.o
> kernel/time/hrtimer.c:124:21: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides]
> 124 | [CLOCK_REALTIME] = HRTIMER_BASE_REALTIME,
>
> kernel/time/hrtimer.c:122:27: note: previous initialization is here
> 122 | [0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
>
> (and similar for CLOCK_MONOTONIC, CLOCK_BOOTTIME, and CLOCK_TAI).
>
> Refactor hrtimer_clock_to_base_table initialisation to make
> the compiler happy.
For the record, GCC also fails here.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists