Re: [PATCH 2/3] ACPI: Use PTR_IF() for ACPI_PTR()
"Rafael J. Wysocki (Intel)" <[email protected]>
| Newsgroups | org.kernel.vger.linux-acpi,org.kernel.vger.linux-media |
|---|---|
| Message-ID | <CAJZ5v0jwmpqO+QhKjgc2ipU6GMFPt-+Uggi4U4oU2WH0_Yichg@mail.gmail.com> |
On Fri, Aug 28, 2026 at 10:43 AM Sakari Ailus <[email protected]> wrote: > > Make ACPI_PTR() use PTR_IF() so __maybe_unused can be dropped from what is > being referred to. > > Signed-off-by: Sakari Ailus <[email protected]> Acked-by: Rafael J. Wysocki (Intel) <[email protected]> > --- > include/linux/acpi.h | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/include/linux/acpi.h b/include/linux/acpi.h > index 10d6c6c11bdf..347763282f36 100644 > --- a/include/linux/acpi.h > +++ b/include/linux/acpi.h > @@ -755,7 +755,6 @@ int acpi_device_modalias(struct device *, char *, int); > > struct platform_device *acpi_create_platform_device(struct acpi_device *, > const struct property_entry *); > -#define ACPI_PTR(_ptr) (_ptr) > > static inline void acpi_device_set_enumerated(struct acpi_device *adev) > { > @@ -1073,8 +1072,6 @@ static inline int acpi_dma_configure_id(struct device *dev, > return 0; > } > > -#define ACPI_PTR(_ptr) (NULL) > - > static inline void acpi_device_set_enumerated(struct acpi_device *adev) > { > } > @@ -1152,6 +1149,8 @@ static inline int acpi_mrrm_max_mem_region(void) > > #endif /* !CONFIG_ACPI */ > > +#define ACPI_PTR(_ptr) PTR_IF(IS_BUILTIN(CONFIG_ACPI), _ptr) > + > #ifdef CONFIG_ACPI_HMAT > int hmat_get_extended_linear_cache_size(struct resource *backing_res, int nid, > resource_size_t *size); > -- > 2.47.3 >