* ACPICA compilation error on x86_64_defconfig (W=1 build)
@ 2025-04-07 18:47 Andy Shevchenko
2025-04-07 18:49 ` Rafael J. Wysocki
0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2025-04-07 18:47 UTC (permalink / raw)
To: Robert Moore, Rafael J. Wysocki; +Cc: linux-acpi, acpica-devel
v6.15-rc1 (but seems older should also be problematic) fails to compile by
Clang 19 with `make W=1`.
CC drivers/acpi/acpica/nsaccess.o
drivers/acpi/acpica/nsaccess.c:295:6: error: variable 'num_carats' set but not used [-Werror,-Wunused-but-set-variable]
295 | u32 num_carats;
| ^
1 error generated.
I looked briefly in the code and I have no idea how to fix this, as probably
__maybe_unused not an option for ACPICA. Hence this report.
Note, the in-tree defconfig is in use:
git checkout v6.15-rc1
make x86_64_defconfig
make W=1
should trigger it.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
2025-04-07 18:47 ACPICA compilation error on x86_64_defconfig (W=1 build) Andy Shevchenko
@ 2025-04-07 18:49 ` Rafael J. Wysocki
2025-04-07 18:51 ` Andy Shevchenko
0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2025-04-07 18:49 UTC (permalink / raw)
To: Andy Shevchenko, Saket Dumbre
Cc: Robert Moore, Rafael J. Wysocki, linux-acpi, acpica-devel
+Saket
On Mon, Apr 7, 2025 at 8:47 PM Andy Shevchenko
<andriy.shevchenko@intel.com> wrote:
>
> v6.15-rc1 (but seems older should also be problematic) fails to compile by
> Clang 19 with `make W=1`.
>
> CC drivers/acpi/acpica/nsaccess.o
> drivers/acpi/acpica/nsaccess.c:295:6: error: variable 'num_carats' set but not used [-Werror,-Wunused-but-set-variable]
> 295 | u32 num_carats;
> | ^
> 1 error generated.
>
> I looked briefly in the code and I have no idea how to fix this, as probably
> __maybe_unused not an option for ACPICA. Hence this report.
>
> Note, the in-tree defconfig is in use:
>
> git checkout v6.15-rc1
> make x86_64_defconfig
> make W=1
>
> should trigger it.
>
> --
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
2025-04-07 18:49 ` Rafael J. Wysocki
@ 2025-04-07 18:51 ` Andy Shevchenko
[not found] ` <LV8PR11MB86980990221C597E01BAEB7980B52@LV8PR11MB8698.namprd11.prod.outlook.com>
0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2025-04-07 18:51 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Saket Dumbre, Robert Moore, Rafael J. Wysocki, linux-acpi,
acpica-devel
On Mon, Apr 07, 2025 at 08:49:41PM +0200, Rafael J. Wysocki wrote:
> On Mon, Apr 7, 2025 at 8:47 PM Andy Shevchenko
> <andriy.shevchenko@intel.com> wrote:
> >
> > v6.15-rc1 (but seems older should also be problematic) fails to compile by
> > Clang 19 with `make W=1`.
> >
> > CC drivers/acpi/acpica/nsaccess.o
> > drivers/acpi/acpica/nsaccess.c:295:6: error: variable 'num_carats' set but not used [-Werror,-Wunused-but-set-variable]
> > 295 | u32 num_carats;
> > | ^
> > 1 error generated.
> >
> > I looked briefly in the code and I have no idea how to fix this, as probably
> > __maybe_unused not an option for ACPICA. Hence this report.
> >
> > Note, the in-tree defconfig is in use:
> >
> > git checkout v6.15-rc1
> > make x86_64_defconfig
> > make W=1
Since it's a clang, this should have also something like LLVM=1.
> > should trigger it.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
[not found] ` <LV8PR11MB8698978FFF89ACBEF253667680B52@LV8PR11MB8698.namprd11.prod.outlook.com>
@ 2025-04-09 11:24 ` Shevchenko, Andriy
2025-04-09 14:00 ` Shevchenko, Andriy
0 siblings, 1 reply; 7+ messages in thread
From: Shevchenko, Andriy @ 2025-04-09 11:24 UTC (permalink / raw)
To: Dumbre, Saket
Cc: Rafael J. Wysocki, Moore, Robert, Wysocki, Rafael J,
linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev
GCC should ignore all clang specific pragmas as far as I know.
But this seems to me the not the best solution either. What code needs is to
have some refactoring to make sure the variable is used or not defined and used
at all. Unfortunately, I am not familiar with ACPICA to propose anything right
now, though.
On Tue, Apr 08, 2025 at 09:34:36PM +0300, Dumbre, Saket wrote:
> I am not sure about the Linux environment specifics like Andy described in the
> previous conversation, but if GCC or some other compiler throws an error in the
> code with #pragma for clang, then may I suggest using this instead:
>
> #pragma clang diagnostic push
> #if defined(__clang__) && __clang__ >= n (replace n with the least version
> number which introduces this new warning type)
> #pragma clang diagnostic ignored "-Wunused-but-set-variable"
> #endif
> u32 num_carats;
> #pragma clang diagnostic pop
>
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> From: Dumbre, Saket <saket.dumbre@intel.com>
> Sent: Tuesday, April 8, 2025 11:11 AM
> To: Shevchenko, Andriy <andriy.shevchenko@intel.com>; Rafael J. Wysocki
> <rafael@kernel.org>
> Cc: Moore, Robert <robert.moore@intel.com>; Wysocki, Rafael J
> <rafael.j.wysocki@intel.com>; linux-acpi@vger.kernel.org
> <linux-acpi@vger.kernel.org>; acpica-devel@lists.linux.dev
> <acpica-devel@lists.linux.dev>
> Subject: Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
>
> Hi Andy and Rafael,
>
> This issue is a duplication of an Apple ecosystem-based (ARM + M-series micro
> architecture) ACPICA GitHub Issue, which I was waiting on a response from the
> contributor/submitter to move ahead to resolve it:
> https://github.com/acpica/acpica/issues/973
>
> I don't see a platform specific file for Clang/LLVM in ACPICA (only for GCC and
> MSVC), so I think the worst-case untidy solution would be to locally patch this
> warning-turned-error by suppressing this warning type if the compiler is Clang/
> LLVM.
>
> It would look somewhat better to move that line all the way down after all the
> other definitions/declarations just before any execution line and wrap it with
> a #pragma something along the lines:
>
> #pragma clang diagnostic push
> #pragma clang diagnostic ignored "-Wunused-but-set-variable"
> u32 num_carats;
> #pragma clang diagnostic pop
>
> I am just not sure if this is the only place in the ACPICA code that generates
> this warning type and depending on the answer, this fix could be implemented at
> a wider/global scale, but please give this hacky fix a try and let me know if
> it resolves that. Thanks a lot!
>
>
> Kind regards,
>
> Saket Dumbre
>
>
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> From: Shevchenko, Andriy
> Sent: Monday, April 7, 2025 11:51 AM
> To: Rafael J. Wysocki
> Cc: Dumbre, Saket; Moore, Robert; Wysocki, Rafael J;
> linux-acpi@vger.kernel.org; acpica-devel@lists.linux.dev
> Subject: Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
>
> On Mon, Apr 07, 2025 at 08:49:41PM +0200, Rafael J. Wysocki wrote:
> > On Mon, Apr 7, 2025 at 8:47 PM Andy Shevchenko
> > <andriy.shevchenko@intel.com> wrote:
> > >
> > > v6.15-rc1 (but seems older should also be problematic) fails to compile by
> > > Clang 19 with `make W=1`.
> > >
> > > CC drivers/acpi/acpica/nsaccess.o
> > > drivers/acpi/acpica/nsaccess.c:295:6: error: variable 'num_carats' set
> but not used [-Werror,-Wunused-but-set-variable]
> > > 295 | u32 num_carats;
> > > | ^
> > > 1 error generated.
> > >
> > > I looked briefly in the code and I have no idea how to fix this, as
> probably
> > > __maybe_unused not an option for ACPICA. Hence this report.
> > >
> > > Note, the in-tree defconfig is in use:
> > >
> > > git checkout v6.15-rc1
> > > make x86_64_defconfig
>
> > > make W=1
>
> Since it's a clang, this should have also something like LLVM=1.
>
> > > should trigger it.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
2025-04-09 11:24 ` Shevchenko, Andriy
@ 2025-04-09 14:00 ` Shevchenko, Andriy
2025-04-09 14:07 ` Rafael J. Wysocki
0 siblings, 1 reply; 7+ messages in thread
From: Shevchenko, Andriy @ 2025-04-09 14:00 UTC (permalink / raw)
To: Dumbre, Saket
Cc: Rafael J. Wysocki, Moore, Robert, Wysocki, Rafael J,
linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev
Note, I have posted two much better solutions in that bug report thread.
Please, choose one and fix, it prevents kernel from building...
On Wed, Apr 09, 2025 at 02:24:45PM +0300, Shevchenko, Andriy wrote:
> GCC should ignore all clang specific pragmas as far as I know.
>
> But this seems to me the not the best solution either. What code needs is to
> have some refactoring to make sure the variable is used or not defined and used
> at all. Unfortunately, I am not familiar with ACPICA to propose anything right
> now, though.
>
> On Tue, Apr 08, 2025 at 09:34:36PM +0300, Dumbre, Saket wrote:
> > I am not sure about the Linux environment specifics like Andy described in the
> > previous conversation, but if GCC or some other compiler throws an error in the
> > code with #pragma for clang, then may I suggest using this instead:
> >
> > #pragma clang diagnostic push
> > #if defined(__clang__) && __clang__ >= n (replace n with the least version
> > number which introduces this new warning type)
> > #pragma clang diagnostic ignored "-Wunused-but-set-variable"
> > #endif
> > u32 num_carats;
> > #pragma clang diagnostic pop
> >
> > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> > From: Dumbre, Saket <saket.dumbre@intel.com>
> > Sent: Tuesday, April 8, 2025 11:11 AM
> > To: Shevchenko, Andriy <andriy.shevchenko@intel.com>; Rafael J. Wysocki
> > <rafael@kernel.org>
> > Cc: Moore, Robert <robert.moore@intel.com>; Wysocki, Rafael J
> > <rafael.j.wysocki@intel.com>; linux-acpi@vger.kernel.org
> > <linux-acpi@vger.kernel.org>; acpica-devel@lists.linux.dev
> > <acpica-devel@lists.linux.dev>
> > Subject: Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
> >
> > Hi Andy and Rafael,
> >
> > This issue is a duplication of an Apple ecosystem-based (ARM + M-series micro
> > architecture) ACPICA GitHub Issue, which I was waiting on a response from the
> > contributor/submitter to move ahead to resolve it:
> > https://github.com/acpica/acpica/issues/973
> >
> > I don't see a platform specific file for Clang/LLVM in ACPICA (only for GCC and
> > MSVC), so I think the worst-case untidy solution would be to locally patch this
> > warning-turned-error by suppressing this warning type if the compiler is Clang/
> > LLVM.
> >
> > It would look somewhat better to move that line all the way down after all the
> > other definitions/declarations just before any execution line and wrap it with
> > a #pragma something along the lines:
> >
> > #pragma clang diagnostic push
> > #pragma clang diagnostic ignored "-Wunused-but-set-variable"
> > u32 num_carats;
> > #pragma clang diagnostic pop
> >
> > I am just not sure if this is the only place in the ACPICA code that generates
> > this warning type and depending on the answer, this fix could be implemented at
> > a wider/global scale, but please give this hacky fix a try and let me know if
> > it resolves that. Thanks a lot!
> >
> >
> > Kind regards,
> >
> > Saket Dumbre
> >
> >
> > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> > From: Shevchenko, Andriy
> > Sent: Monday, April 7, 2025 11:51 AM
> > To: Rafael J. Wysocki
> > Cc: Dumbre, Saket; Moore, Robert; Wysocki, Rafael J;
> > linux-acpi@vger.kernel.org; acpica-devel@lists.linux.dev
> > Subject: Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
> >
> > On Mon, Apr 07, 2025 at 08:49:41PM +0200, Rafael J. Wysocki wrote:
> > > On Mon, Apr 7, 2025 at 8:47 PM Andy Shevchenko
> > > <andriy.shevchenko@intel.com> wrote:
> > > >
> > > > v6.15-rc1 (but seems older should also be problematic) fails to compile by
> > > > Clang 19 with `make W=1`.
> > > >
> > > > CC drivers/acpi/acpica/nsaccess.o
> > > > drivers/acpi/acpica/nsaccess.c:295:6: error: variable 'num_carats' set
> > but not used [-Werror,-Wunused-but-set-variable]
> > > > 295 | u32 num_carats;
> > > > | ^
> > > > 1 error generated.
> > > >
> > > > I looked briefly in the code and I have no idea how to fix this, as
> > probably
> > > > __maybe_unused not an option for ACPICA. Hence this report.
> > > >
> > > > Note, the in-tree defconfig is in use:
> > > >
> > > > git checkout v6.15-rc1
> > > > make x86_64_defconfig
> >
> > > > make W=1
> >
> > Since it's a clang, this should have also something like LLVM=1.
> >
> > > > should trigger it.
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
> >
> >
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
2025-04-09 14:00 ` Shevchenko, Andriy
@ 2025-04-09 14:07 ` Rafael J. Wysocki
2025-04-09 14:15 ` Shevchenko, Andriy
0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2025-04-09 14:07 UTC (permalink / raw)
To: Shevchenko, Andriy
Cc: Dumbre, Saket, Rafael J. Wysocki, Moore, Robert,
Wysocki, Rafael J, linux-acpi@vger.kernel.org,
acpica-devel@lists.linux.dev
On Wed, Apr 9, 2025 at 4:01 PM Shevchenko, Andriy
<andriy.shevchenko@intel.com> wrote:
>
> Note, I have posted two much better solutions in that bug report thread.
Which bug report thread do you mean?
> Please, choose one and fix, it prevents kernel from building...
With Clang-19 and 'make W=1' that is.
> On Wed, Apr 09, 2025 at 02:24:45PM +0300, Shevchenko, Andriy wrote:
> > GCC should ignore all clang specific pragmas as far as I know.
> >
> > But this seems to me the not the best solution either. What code needs is to
> > have some refactoring to make sure the variable is used or not defined and used
> > at all. Unfortunately, I am not familiar with ACPICA to propose anything right
> > now, though.
> >
> > On Tue, Apr 08, 2025 at 09:34:36PM +0300, Dumbre, Saket wrote:
> > > I am not sure about the Linux environment specifics like Andy described in the
> > > previous conversation, but if GCC or some other compiler throws an error in the
> > > code with #pragma for clang, then may I suggest using this instead:
> > >
> > > #pragma clang diagnostic push
> > > #if defined(__clang__) && __clang__ >= n (replace n with the least version
> > > number which introduces this new warning type)
> > > #pragma clang diagnostic ignored "-Wunused-but-set-variable"
> > > #endif
> > > u32 num_carats;
> > > #pragma clang diagnostic pop
> > >
> > > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> > > From: Dumbre, Saket <saket.dumbre@intel.com>
> > > Sent: Tuesday, April 8, 2025 11:11 AM
> > > To: Shevchenko, Andriy <andriy.shevchenko@intel.com>; Rafael J. Wysocki
> > > <rafael@kernel.org>
> > > Cc: Moore, Robert <robert.moore@intel.com>; Wysocki, Rafael J
> > > <rafael.j.wysocki@intel.com>; linux-acpi@vger.kernel.org
> > > <linux-acpi@vger.kernel.org>; acpica-devel@lists.linux.dev
> > > <acpica-devel@lists.linux.dev>
> > > Subject: Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
> > >
> > > Hi Andy and Rafael,
> > >
> > > This issue is a duplication of an Apple ecosystem-based (ARM + M-series micro
> > > architecture) ACPICA GitHub Issue, which I was waiting on a response from the
> > > contributor/submitter to move ahead to resolve it:
> > > https://github.com/acpica/acpica/issues/973
> > >
> > > I don't see a platform specific file for Clang/LLVM in ACPICA (only for GCC and
> > > MSVC), so I think the worst-case untidy solution would be to locally patch this
> > > warning-turned-error by suppressing this warning type if the compiler is Clang/
> > > LLVM.
> > >
> > > It would look somewhat better to move that line all the way down after all the
> > > other definitions/declarations just before any execution line and wrap it with
> > > a #pragma something along the lines:
> > >
> > > #pragma clang diagnostic push
> > > #pragma clang diagnostic ignored "-Wunused-but-set-variable"
> > > u32 num_carats;
> > > #pragma clang diagnostic pop
> > >
> > > I am just not sure if this is the only place in the ACPICA code that generates
> > > this warning type and depending on the answer, this fix could be implemented at
> > > a wider/global scale, but please give this hacky fix a try and let me know if
> > > it resolves that. Thanks a lot!
> > >
> > >
> > > Kind regards,
> > >
> > > Saket Dumbre
> > >
> > >
> > > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> > > From: Shevchenko, Andriy
> > > Sent: Monday, April 7, 2025 11:51 AM
> > > To: Rafael J. Wysocki
> > > Cc: Dumbre, Saket; Moore, Robert; Wysocki, Rafael J;
> > > linux-acpi@vger.kernel.org; acpica-devel@lists.linux.dev
> > > Subject: Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
> > >
> > > On Mon, Apr 07, 2025 at 08:49:41PM +0200, Rafael J. Wysocki wrote:
> > > > On Mon, Apr 7, 2025 at 8:47 PM Andy Shevchenko
> > > > <andriy.shevchenko@intel.com> wrote:
> > > > >
> > > > > v6.15-rc1 (but seems older should also be problematic) fails to compile by
> > > > > Clang 19 with `make W=1`.
> > > > >
> > > > > CC drivers/acpi/acpica/nsaccess.o
> > > > > drivers/acpi/acpica/nsaccess.c:295:6: error: variable 'num_carats' set
> > > but not used [-Werror,-Wunused-but-set-variable]
> > > > > 295 | u32 num_carats;
> > > > > | ^
> > > > > 1 error generated.
> > > > >
> > > > > I looked briefly in the code and I have no idea how to fix this, as
> > > probably
> > > > > __maybe_unused not an option for ACPICA. Hence this report.
> > > > >
> > > > > Note, the in-tree defconfig is in use:
> > > > >
> > > > > git checkout v6.15-rc1
> > > > > make x86_64_defconfig
> > >
> > > > > make W=1
> > >
> > > Since it's a clang, this should have also something like LLVM=1.
> > >
> > > > > should trigger it.
> > >
> > > --
> > > With Best Regards,
> > > Andy Shevchenko
> > >
> > >
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
> >
> >
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
2025-04-09 14:07 ` Rafael J. Wysocki
@ 2025-04-09 14:15 ` Shevchenko, Andriy
0 siblings, 0 replies; 7+ messages in thread
From: Shevchenko, Andriy @ 2025-04-09 14:15 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Dumbre, Saket, Moore, Robert, Wysocki, Rafael J,
linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev
On Wed, Apr 09, 2025 at 04:07:09PM +0200, Rafael J. Wysocki wrote:
> On Wed, Apr 9, 2025 at 4:01 PM Shevchenko, Andriy
> <andriy.shevchenko@intel.com> wrote:
> >
> > Note, I have posted two much better solutions in that bug report thread.
>
> Which bug report thread do you mean?
https://github.com/acpica/acpica/issues/973
> > Please, choose one and fix, it prevents kernel from building...
>
> With Clang-19 and 'make W=1' that is.
Yes. it is not *that* critical, sure.
> > On Wed, Apr 09, 2025 at 02:24:45PM +0300, Shevchenko, Andriy wrote:
> > > GCC should ignore all clang specific pragmas as far as I know.
> > >
> > > But this seems to me the not the best solution either. What code needs is to
> > > have some refactoring to make sure the variable is used or not defined and used
> > > at all. Unfortunately, I am not familiar with ACPICA to propose anything right
> > > now, though.
> > >
> > > On Tue, Apr 08, 2025 at 09:34:36PM +0300, Dumbre, Saket wrote:
> > > > I am not sure about the Linux environment specifics like Andy described in the
> > > > previous conversation, but if GCC or some other compiler throws an error in the
> > > > code with #pragma for clang, then may I suggest using this instead:
> > > >
> > > > #pragma clang diagnostic push
> > > > #if defined(__clang__) && __clang__ >= n (replace n with the least version
> > > > number which introduces this new warning type)
> > > > #pragma clang diagnostic ignored "-Wunused-but-set-variable"
> > > > #endif
> > > > u32 num_carats;
> > > > #pragma clang diagnostic pop
> > > >
> > > > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> > > > From: Dumbre, Saket <saket.dumbre@intel.com>
> > > > Sent: Tuesday, April 8, 2025 11:11 AM
> > > > To: Shevchenko, Andriy <andriy.shevchenko@intel.com>; Rafael J. Wysocki
> > > > <rafael@kernel.org>
> > > > Cc: Moore, Robert <robert.moore@intel.com>; Wysocki, Rafael J
> > > > <rafael.j.wysocki@intel.com>; linux-acpi@vger.kernel.org
> > > > <linux-acpi@vger.kernel.org>; acpica-devel@lists.linux.dev
> > > > <acpica-devel@lists.linux.dev>
> > > > Subject: Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
> > > >
> > > > Hi Andy and Rafael,
> > > >
> > > > This issue is a duplication of an Apple ecosystem-based (ARM + M-series micro
> > > > architecture) ACPICA GitHub Issue, which I was waiting on a response from the
> > > > contributor/submitter to move ahead to resolve it:
> > > > https://github.com/acpica/acpica/issues/973
> > > >
> > > > I don't see a platform specific file for Clang/LLVM in ACPICA (only for GCC and
> > > > MSVC), so I think the worst-case untidy solution would be to locally patch this
> > > > warning-turned-error by suppressing this warning type if the compiler is Clang/
> > > > LLVM.
> > > >
> > > > It would look somewhat better to move that line all the way down after all the
> > > > other definitions/declarations just before any execution line and wrap it with
> > > > a #pragma something along the lines:
> > > >
> > > > #pragma clang diagnostic push
> > > > #pragma clang diagnostic ignored "-Wunused-but-set-variable"
> > > > u32 num_carats;
> > > > #pragma clang diagnostic pop
> > > >
> > > > I am just not sure if this is the only place in the ACPICA code that generates
> > > > this warning type and depending on the answer, this fix could be implemented at
> > > > a wider/global scale, but please give this hacky fix a try and let me know if
> > > > it resolves that. Thanks a lot!
> > > >
> > > >
> > > > Kind regards,
> > > >
> > > > Saket Dumbre
> > > >
> > > >
> > > > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> > > > From: Shevchenko, Andriy
> > > > Sent: Monday, April 7, 2025 11:51 AM
> > > > To: Rafael J. Wysocki
> > > > Cc: Dumbre, Saket; Moore, Robert; Wysocki, Rafael J;
> > > > linux-acpi@vger.kernel.org; acpica-devel@lists.linux.dev
> > > > Subject: Re: ACPICA compilation error on x86_64_defconfig (W=1 build)
> > > >
> > > > On Mon, Apr 07, 2025 at 08:49:41PM +0200, Rafael J. Wysocki wrote:
> > > > > On Mon, Apr 7, 2025 at 8:47 PM Andy Shevchenko
> > > > > <andriy.shevchenko@intel.com> wrote:
> > > > > >
> > > > > > v6.15-rc1 (but seems older should also be problematic) fails to compile by
> > > > > > Clang 19 with `make W=1`.
> > > > > >
> > > > > > CC drivers/acpi/acpica/nsaccess.o
> > > > > > drivers/acpi/acpica/nsaccess.c:295:6: error: variable 'num_carats' set
> > > > but not used [-Werror,-Wunused-but-set-variable]
> > > > > > 295 | u32 num_carats;
> > > > > > | ^
> > > > > > 1 error generated.
> > > > > >
> > > > > > I looked briefly in the code and I have no idea how to fix this, as
> > > > probably
> > > > > > __maybe_unused not an option for ACPICA. Hence this report.
> > > > > >
> > > > > > Note, the in-tree defconfig is in use:
> > > > > >
> > > > > > git checkout v6.15-rc1
> > > > > > make x86_64_defconfig
> > > >
> > > > > > make W=1
> > > >
> > > > Since it's a clang, this should have also something like LLVM=1.
> > > >
> > > > > > should trigger it.
> > > >
> > > > --
> > > > With Best Regards,
> > > > Andy Shevchenko
> > > >
> > > >
> > >
> > > --
> > > With Best Regards,
> > > Andy Shevchenko
> > >
> > >
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
> >
> >
> >
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-04-09 14:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 18:47 ACPICA compilation error on x86_64_defconfig (W=1 build) Andy Shevchenko
2025-04-07 18:49 ` Rafael J. Wysocki
2025-04-07 18:51 ` Andy Shevchenko
[not found] ` <LV8PR11MB86980990221C597E01BAEB7980B52@LV8PR11MB8698.namprd11.prod.outlook.com>
[not found] ` <LV8PR11MB8698978FFF89ACBEF253667680B52@LV8PR11MB8698.namprd11.prod.outlook.com>
2025-04-09 11:24 ` Shevchenko, Andriy
2025-04-09 14:00 ` Shevchenko, Andriy
2025-04-09 14:07 ` Rafael J. Wysocki
2025-04-09 14:15 ` Shevchenko, Andriy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox