diff mbox series

[v2,2/2] ACPI: utils: acpi_evaluate_dsm_typed - fix redefinition error

Message ID 20230316002559.32562-2-kiran.k@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] Bluetooth: btintel: Add support to reset bluetooth via ACPI DSM | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint fail WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 7: B1 Line exceeds max length (81>80): "../include/acpi/acpi_bus.h:57:1: error: redefinition of 'acpi_evaluate_dsm_typed'" 25: B1 Line exceeds max length (94>80): "https://patchwork.kernel.org/project/bluetooth/patch/20230313151549.15791-1-kiran.k@intel.com/"
tedd_an/SubjectPrefix fail "Bluetooth: " prefix is not specified in the subject
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

K, Kiran March 16, 2023, 12:25 a.m. UTC
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>
---

changes:
Fix compilation error when compiled for ARCH=arc
Details here:
https://patchwork.kernel.org/project/bluetooth/patch/20230313151549.15791-1-kiran.k@intel.com/


 include/acpi/acpi_bus.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Luiz Augusto von Dentz March 16, 2023, 5:22 a.m. UTC | #1
Hi Kiran,

On Wed, Mar 15, 2023 at 5:32 PM 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")

This should probably be sent to the ACPI list/maintainer, but first
make sure there isn't already a fix which would mean we have to update
bluetooth-next to stop this kind of error.

> Signed-off-by: Kiran K <kiran.k@intel.com>
> ---
>
> changes:
> Fix compilation error when compiled for ARCH=arc
> Details here:
> https://patchwork.kernel.org/project/bluetooth/patch/20230313151549.15791-1-kiran.k@intel.com/
>
>
>  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
>
K, Kiran March 16, 2023, 7:29 a.m. UTC | #2
Hi Luiz,

> -----Original Message-----
> From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
> Sent: Thursday, March 16, 2023 10:52 AM
> To: K, Kiran <kiran.k@intel.com>
> Cc: linux-bluetooth@vger.kernel.org; Srivatsa, Ravishankar
> <ravishankar.srivatsa@intel.com>; Tumkur Narayan, Chethan
> <chethan.tumkur.narayan@intel.com>
> Subject: Re: [PATCH v2 2/2] ACPI: utils: acpi_evaluate_dsm_typed - fix
> redefinition error
> 
> Hi Kiran,
> 
> On Wed, Mar 15, 2023 at 5:32 PM 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")
> 
> This should probably be sent to the ACPI list/maintainer, but first make sure
> there isn't already a fix which would mean we have to update bluetooth-next
> to stop this kind of error.
> 
Ok. It looks this issue is present in linux-pm tree. I have pushed the patch over there. I will let you know once its merged so that you can rebase bluetooth-next. Thanks

Regards,
Kiran
diff mbox series

Patch

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)			\
 	{						\