* [PATCH v1] ACPI: utils: acpi_evaluate_dsm_typed - fix redefinition error
@ 2023-03-16 7:17 Kiran K
2023-03-20 17:45 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Kiran K @ 2023-03-16 7:17 UTC (permalink / raw)
To: linux-acpi
Cc: ravishankar.srivatsa, chethan.tumkur.narayan, luiz.dentz, Kiran K
acpi_evaluate_dsm_typed function needs to be gaurded with CONFIG_ACPI to
avoid redefintion error when stub is also enabled.
In file included from ../drivers/bluetooth/btintel.c:13:
../include/acpi/acpi_bus.h:57:1: error: redefinition of 'acpi_evaluate_dsm_typed'
57 | acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid,..
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ../drivers/bluetooth/btintel.c:12:
../include/linux/acpi.h:967:34: note: previous definition of
'acpi_evaluate_dsm_typed' with type 'union acpi_object *(void *,
const guid_t *, u64, u64, union acpi_object *, acpi_object_type)'
{aka 'union acpi_object *(void *, const guid_t *, long long unsigned int,
long long unsigned int, union acpi_object *, unsigned int)'}
967 | static inline union acpi_object
*acpi_evaluate_dsm_typed(acpi_handle handle,
Fixes: 1b94ad7ccc21 ("ACPI: utils: Add acpi_evaluate_dsm_typed() and acpi_check_dsm() stubs")
Signed-off-by: Kiran K <kiran.k@intel.com>
---
Steps to reproduce:
1. Apply this bluetooth specific patch - https://patchwork.kernel.org/project/bluetooth/patch/20230313151549.15791-1-kiran.k@intel.com/
2. Follow the steps suggedted by lkp bot to compile bluetooth
include/acpi/acpi_bus.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index e44be31115a6..fc131b4aee4e 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -52,7 +52,7 @@ bool acpi_dock_match(acpi_handle handle);
bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
u64 rev, u64 func, union acpi_object *argv4);
-
+#ifdef CONFIG_ACPI
static inline union acpi_object *
acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
u64 func, union acpi_object *argv4,
@@ -68,6 +68,7 @@ acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
return obj;
}
+#endif
#define ACPI_INIT_DSM_ARGV4(cnt, eles) \
{ \
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] ACPI: utils: acpi_evaluate_dsm_typed - fix redefinition error
2023-03-16 7:17 [PATCH v1] ACPI: utils: acpi_evaluate_dsm_typed - fix redefinition error Kiran K
@ 2023-03-20 17:45 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2023-03-20 17:45 UTC (permalink / raw)
To: Kiran K
Cc: linux-acpi, ravishankar.srivatsa, chethan.tumkur.narayan, luiz.dentz
On Thu, Mar 16, 2023 at 8:06 AM Kiran K <kiran.k@intel.com> wrote:
>
> acpi_evaluate_dsm_typed function needs to be gaurded with CONFIG_ACPI to
> avoid redefintion error when stub is also enabled.
>
> In file included from ../drivers/bluetooth/btintel.c:13:
> ../include/acpi/acpi_bus.h:57:1: error: redefinition of 'acpi_evaluate_dsm_typed'
> 57 | acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid,..
> | ^~~~~~~~~~~~~~~~~~~~~~~
> In file included from ../drivers/bluetooth/btintel.c:12:
> ../include/linux/acpi.h:967:34: note: previous definition of
> 'acpi_evaluate_dsm_typed' with type 'union acpi_object *(void *,
> const guid_t *, u64, u64, union acpi_object *, acpi_object_type)'
> {aka 'union acpi_object *(void *, const guid_t *, long long unsigned int,
> long long unsigned int, union acpi_object *, unsigned int)'}
> 967 | static inline union acpi_object
> *acpi_evaluate_dsm_typed(acpi_handle handle,
>
> Fixes: 1b94ad7ccc21 ("ACPI: utils: Add acpi_evaluate_dsm_typed() and acpi_check_dsm() stubs")
> Signed-off-by: Kiran K <kiran.k@intel.com>
> ---
>
> Steps to reproduce:
> 1. Apply this bluetooth specific patch - https://patchwork.kernel.org/project/bluetooth/patch/20230313151549.15791-1-kiran.k@intel.com/
> 2. Follow the steps suggedted by lkp bot to compile bluetooth
>
> include/acpi/acpi_bus.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
> index e44be31115a6..fc131b4aee4e 100644
> --- a/include/acpi/acpi_bus.h
> +++ b/include/acpi/acpi_bus.h
> @@ -52,7 +52,7 @@ bool acpi_dock_match(acpi_handle handle);
> bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
> union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
> u64 rev, u64 func, union acpi_object *argv4);
> -
> +#ifdef CONFIG_ACPI
> static inline union acpi_object *
> acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
> u64 func, union acpi_object *argv4,
> @@ -68,6 +68,7 @@ acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
>
> return obj;
> }
> +#endif
>
> #define ACPI_INIT_DSM_ARGV4(cnt, eles) \
> { \
> --
Applied (with some edits in the subject and changelog) as 6.4 material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-20 17:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 7:17 [PATCH v1] ACPI: utils: acpi_evaluate_dsm_typed - fix redefinition error Kiran K
2023-03-20 17:45 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).