* [PATCH 1/3] acpi: nfit: add declaration in a local header
@ 2023-05-16 20:14 Arnd Bergmann
2023-05-22 15:22 ` Dave Jiang
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2023-05-16 20:14 UTC (permalink / raw
To: Dan Williams, Vishal Verma, Dave Jiang, Ira Weiny,
Rafael J. Wysocki
Cc: Arnd Bergmann, Len Brown, nvdimm, linux-acpi, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The nfit_intel_shutdown_status() function has a __weak defintion
in nfit.c and an override in acpi_nfit_test.c for testing
purposes. This works without an extern declaration, but causes
a W=1 build warning:
drivers/acpi/nfit/core.c:1717:13: error: no previous prototype for 'nfit_intel_shutdown_status' [-Werror=missing-prototypes]
Add a declaration in a header that gets included from both
sides to shut up the warning and ensure that the prototypes
actually match.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/acpi/nfit/nfit.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h
index 6023ad61831a..573bc0de2990 100644
--- a/drivers/acpi/nfit/nfit.h
+++ b/drivers/acpi/nfit/nfit.h
@@ -347,4 +347,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
void acpi_nfit_desc_init(struct acpi_nfit_desc *acpi_desc, struct device *dev);
bool intel_fwa_supported(struct nvdimm_bus *nvdimm_bus);
extern struct device_attribute dev_attr_firmware_activate_noidle;
+void nfit_intel_shutdown_status(struct nfit_mem *nfit_mem);
+
#endif /* __NFIT_H__ */
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3] acpi: nfit: add declaration in a local header
2023-05-16 20:14 [PATCH 1/3] acpi: nfit: add declaration in a local header Arnd Bergmann
@ 2023-05-22 15:22 ` Dave Jiang
2023-06-05 17:07 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Dave Jiang @ 2023-05-22 15:22 UTC (permalink / raw
To: Arnd Bergmann, Dan Williams, Vishal Verma, Ira Weiny,
Rafael J. Wysocki
Cc: Arnd Bergmann, Len Brown, nvdimm, linux-acpi, linux-kernel
On 5/16/23 1:14 PM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The nfit_intel_shutdown_status() function has a __weak defintion
> in nfit.c and an override in acpi_nfit_test.c for testing
> purposes. This works without an extern declaration, but causes
> a W=1 build warning:
>
> drivers/acpi/nfit/core.c:1717:13: error: no previous prototype for 'nfit_intel_shutdown_status' [-Werror=missing-prototypes]
>
> Add a declaration in a header that gets included from both
> sides to shut up the warning and ensure that the prototypes
> actually match.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/acpi/nfit/nfit.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h
> index 6023ad61831a..573bc0de2990 100644
> --- a/drivers/acpi/nfit/nfit.h
> +++ b/drivers/acpi/nfit/nfit.h
> @@ -347,4 +347,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
> void acpi_nfit_desc_init(struct acpi_nfit_desc *acpi_desc, struct device *dev);
> bool intel_fwa_supported(struct nvdimm_bus *nvdimm_bus);
> extern struct device_attribute dev_attr_firmware_activate_noidle;
> +void nfit_intel_shutdown_status(struct nfit_mem *nfit_mem);
> +
> #endif /* __NFIT_H__ */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3] acpi: nfit: add declaration in a local header
2023-05-22 15:22 ` Dave Jiang
@ 2023-06-05 17:07 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2023-06-05 17:07 UTC (permalink / raw
To: Dave Jiang, Arnd Bergmann
Cc: Dan Williams, Vishal Verma, Ira Weiny, Rafael J. Wysocki,
Arnd Bergmann, Len Brown, nvdimm, linux-acpi, linux-kernel
On Mon, May 22, 2023 at 5:22 PM Dave Jiang <dave.jiang@intel.com> wrote:
>
>
>
> On 5/16/23 1:14 PM, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > The nfit_intel_shutdown_status() function has a __weak defintion
> > in nfit.c and an override in acpi_nfit_test.c for testing
> > purposes. This works without an extern declaration, but causes
> > a W=1 build warning:
> >
> > drivers/acpi/nfit/core.c:1717:13: error: no previous prototype for 'nfit_intel_shutdown_status' [-Werror=missing-prototypes]
> >
> > Add a declaration in a header that gets included from both
> > sides to shut up the warning and ensure that the prototypes
> > actually match.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Applied as 6.5 material, thanks!
> > ---
> > drivers/acpi/nfit/nfit.h | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h
> > index 6023ad61831a..573bc0de2990 100644
> > --- a/drivers/acpi/nfit/nfit.h
> > +++ b/drivers/acpi/nfit/nfit.h
> > @@ -347,4 +347,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
> > void acpi_nfit_desc_init(struct acpi_nfit_desc *acpi_desc, struct device *dev);
> > bool intel_fwa_supported(struct nvdimm_bus *nvdimm_bus);
> > extern struct device_attribute dev_attr_firmware_activate_noidle;
> > +void nfit_intel_shutdown_status(struct nfit_mem *nfit_mem);
> > +
> > #endif /* __NFIT_H__ */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-05 17:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-16 20:14 [PATCH 1/3] acpi: nfit: add declaration in a local header Arnd Bergmann
2023-05-22 15:22 ` Dave Jiang
2023-06-05 17:07 ` 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 read-only IMAP folder(s) and NNTP newsgroup(s).