public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [REGRESSION] stable/linux-5.10.y: (build) passing 'const struct fwnode_handle *' to parameter of type 'struc...
@ 2026-04-18  9:59 KernelCI bot
  2026-04-18 23:07 ` [PATCH 5.10] ACPI: property: Constify stubs for CONFIG_ACPI=n case Nathan Chancellor
  0 siblings, 1 reply; 3+ messages in thread
From: KernelCI bot @ 2026-04-18  9:59 UTC (permalink / raw)
  To: kernelci-results; +Cc: gus, stable





Hello,

New build issue found on stable/linux-5.10.y:

---
 passing 'const struct fwnode_handle *' to parameter of type 'struct fwnode_handle *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] in drivers/base/property.o (drivers/base/property.c) [logspec:kbuild,kbuild.compiler.error]
---

- dashboard: https://d.kernelci.org/i/maestro:d1b6c3b17ff7c2164252525fdfd0d4e68224e5ad
- giturl: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
- commit HEAD:  49e5d20074c20b20773c6dc0f8dce0635591093b
- tags: v5.10.253

Please include the KernelCI tag when submitting a fix:

Reported-by: kernelci.org bot <bot@kernelci.org>


Log excerpt:
=====================================================
/tmp/kci/linux/drivers/base/property.c:896:48: error: passing 'const struct fwnode_handle *' to parameter of type 'struct fwnode_handle *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  896 |         return acpi_dma_supported(to_acpi_device_node(fwnode));
      |                                                       ^~~~~~
/tmp/kci/linux/include/linux/acpi.h:756:77: note: passing argument to parameter 'fwnode' here
  756 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
      |                                                                             ^
/tmp/kci/linux/drivers/base/property.c:911:48: error: passing 'const struct fwnode_handle *' to parameter of type 'struct fwnode_handle *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  911 |                 attr = acpi_get_dma_attr(to_acpi_device_node(fwnode));
      |                                                              ^~~~~~
/tmp/kci/linux/include/linux/acpi.h:756:77: note: passing argument to parameter 'fwnode' here
  756 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
      |                                                                             ^
2 errors generated.

=====================================================


# Builds where the incident occurred:

## multi_v7_defconfig on (arm):
- compiler: clang-21
- config: None
- dashboard: https://d.kernelci.org/build/maestro:69e3511d9b5a968309e62062


#kernelci issue maestro:d1b6c3b17ff7c2164252525fdfd0d4e68224e5ad

--
This is an experimental report format. Please send feedback in!
Talk to us at kernelci@lists.linux.dev

Made with love by the KernelCI team - https://kernelci.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 5.10] ACPI: property: Constify stubs for CONFIG_ACPI=n case
  2026-04-18  9:59 [REGRESSION] stable/linux-5.10.y: (build) passing 'const struct fwnode_handle *' to parameter of type 'struc KernelCI bot
@ 2026-04-18 23:07 ` Nathan Chancellor
  2026-04-20 13:21   ` Sasha Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2026-04-18 23:07 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sasha Levin
  Cc: stable, Nathan Chancellor, kernelci-results

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

commit 5c1a72a0fbe1b02c3ce0537f85f92ea935e0beec upstream.

There is a few stubs that left untouched during constification of
the fwnode related APIs. Constify three more stubs here.

Fixes: 8b9d6802583a ("ACPI: Constify acpi_bus helper functions, switch to macros")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
This resolves compiler warning/errors seen in 5.10.253.

GCC:

  drivers/base/property.c: In function 'device_dma_supported':
  drivers/base/property.c:896:55: warning: passing argument 1 of 'to_acpi_device_node' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    896 |         return acpi_dma_supported(to_acpi_device_node(fwnode));
        |                                                       ^~~~~~
  In file included from drivers/base/property.c:10:
  include/linux/acpi.h:756:77: note: expected 'struct fwnode_handle *' but argument is of type 'const struct fwnode_handle *'
    756 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
        |                                                       ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
  drivers/base/property.c: In function 'device_get_dma_attr':
  drivers/base/property.c:911:62: warning: passing argument 1 of 'to_acpi_device_node' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    911 |                 attr = acpi_get_dma_attr(to_acpi_device_node(fwnode));
        |                                                              ^~~~~~
  include/linux/acpi.h:756:77: note: expected 'struct fwnode_handle *' but argument is of type 'const struct fwnode_handle *'
    756 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
        |                                                       ~~~~~~~~~~~~~~~~~~~~~~^~~~~~

Clang:

  drivers/base/property.c:896:48: error: passing 'const struct fwnode_handle *' to parameter of type 'struct fwnode_handle *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
    896 |         return acpi_dma_supported(to_acpi_device_node(fwnode));
        |                                                       ^~~~~~
  include/linux/acpi.h:756:77: note: passing argument to parameter 'fwnode' here
    756 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
        |                                                                             ^
  drivers/base/property.c:911:48: error: passing 'const struct fwnode_handle *' to parameter of type 'struct fwnode_handle *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
    911 |                 attr = acpi_get_dma_attr(to_acpi_device_node(fwnode));
        |                                                              ^~~~~~
  include/linux/acpi.h:756:77: note: passing argument to parameter 'fwnode' here
    756 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
        |                                                                             ^
  2 errors generated.

  https://github.com/ClangBuiltLinux/continuous-integration2/actions/runs/24605516423
---
 include/linux/acpi.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 9c184dbceba4..c5b51d8dcbe1 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -753,7 +753,7 @@ static inline bool is_acpi_device_node(struct fwnode_handle *fwnode)
 	return false;
 }
 
-static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
+static inline struct acpi_device *to_acpi_device_node(const struct fwnode_handle *fwnode)
 {
 	return NULL;
 }
@@ -763,12 +763,12 @@ static inline bool is_acpi_data_node(struct fwnode_handle *fwnode)
 	return false;
 }
 
-static inline struct acpi_data_node *to_acpi_data_node(struct fwnode_handle *fwnode)
+static inline struct acpi_data_node *to_acpi_data_node(const struct fwnode_handle *fwnode)
 {
 	return NULL;
 }
 
-static inline bool acpi_data_node_match(struct fwnode_handle *fwnode,
+static inline bool acpi_data_node_match(const struct fwnode_handle *fwnode,
 					const char *name)
 {
 	return false;

base-commit: 49e5d20074c20b20773c6dc0f8dce0635591093b
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 5.10] ACPI: property: Constify stubs for CONFIG_ACPI=n case
  2026-04-18 23:07 ` [PATCH 5.10] ACPI: property: Constify stubs for CONFIG_ACPI=n case Nathan Chancellor
@ 2026-04-20 13:21   ` Sasha Levin
  0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2026-04-20 13:21 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: Sasha Levin, stable, linux-acpi, Rafael J. Wysocki

On Sat, Apr 18, 2026, Nathan Chancellor wrote:
> Backport of 5c1a72a0fbe1 ("ACPI: property: Constify stubs for
> CONFIG_ACPI=n case") to 5.10.y.

Queued for 5.10, thanks.

--
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-20 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-18  9:59 [REGRESSION] stable/linux-5.10.y: (build) passing 'const struct fwnode_handle *' to parameter of type 'struc KernelCI bot
2026-04-18 23:07 ` [PATCH 5.10] ACPI: property: Constify stubs for CONFIG_ACPI=n case Nathan Chancellor
2026-04-20 13:21   ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox