X86 platform drivers
 help / color / mirror / Atom feed
* [PATCH 0/2] platform/x86/intel/pmc: Fix recent instances of -Wmissing-prototypes
@ 2023-12-22 18:27 Nathan Chancellor
  2023-12-22 18:27 ` [PATCH 1/2] platform/x86/intel/pmc: Mark arl_d3_fixup() and arl_resume() as static Nathan Chancellor
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nathan Chancellor @ 2023-12-22 18:27 UTC (permalink / raw)
  To: irenic.rajneesh, david.e.box, hdegoede, ilpo.jarvinen,
	rajvi.jingar
  Cc: platform-driver-x86, patches, Stephen Rothwell, Nathan Chancellor

As reported by Stephen at [1], there are a few instances of
-Wmissing-prototypes, which break the build with CONFIG_WERROR=y. This
series marks these functions as static because they are not used outside
of these translation units.

Feel free to squash these into the original changes if the branch is not
set in stone.

[1]: https://lore.kernel.org/all/20231222135412.6bd796cc@canb.auug.org.au/

---
Nathan Chancellor (2):
      platform/x86/intel/pmc: Mark arl_d3_fixup() and arl_resume() as static
      platform/x86/intel/pmc: Mark lnl_d3_fixup() and lnl_resume() as static

 drivers/platform/x86/intel/pmc/arl.c | 4 ++--
 drivers/platform/x86/intel/pmc/lnl.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
base-commit: 119652b855e6c96676406ee9a7f535f4db4e8eff
change-id: 20231222-intel-pmc-missing-prototypes-8fb5014b16b8

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


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

* [PATCH 1/2] platform/x86/intel/pmc: Mark arl_d3_fixup() and arl_resume() as static
  2023-12-22 18:27 [PATCH 0/2] platform/x86/intel/pmc: Fix recent instances of -Wmissing-prototypes Nathan Chancellor
@ 2023-12-22 18:27 ` Nathan Chancellor
  2023-12-22 18:27 ` [PATCH 2/2] platform/x86/intel/pmc: Mark lnl_d3_fixup() and lnl_resume() " Nathan Chancellor
  2023-12-28  9:07 ` [PATCH 0/2] platform/x86/intel/pmc: Fix recent instances of -Wmissing-prototypes Hans de Goede
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2023-12-22 18:27 UTC (permalink / raw)
  To: irenic.rajneesh, david.e.box, hdegoede, ilpo.jarvinen,
	rajvi.jingar
  Cc: platform-driver-x86, patches, Stephen Rothwell, Nathan Chancellor

With -Wmissing-prototypes, there are two instances flagged with no
prototypes:

  drivers/platform/x86/intel/pmc/arl.c:680:6: error: no previous prototype for 'arl_d3_fixup' [-Werror=missing-prototypes]
    680 | void arl_d3_fixup(void)
        |      ^~~~~~~~~~~~
  drivers/platform/x86/intel/pmc/arl.c:685:5: error: no previous prototype for 'arl_resume' [-Werror=missing-prototypes]
    685 | int arl_resume(struct pmc_dev *pmcdev)
        |     ^~~~~~~~~~
  cc1: all warnings being treated as errors

These functions are not used outside of this translation unit, so mark
them as static to fix the warning.

Fixes: f34dcf397286 ("platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20231222135412.6bd796cc@canb.auug.org.au/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 drivers/platform/x86/intel/pmc/arl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel/pmc/arl.c b/drivers/platform/x86/intel/pmc/arl.c
index c20506a9f4a6..9d873e02c412 100644
--- a/drivers/platform/x86/intel/pmc/arl.c
+++ b/drivers/platform/x86/intel/pmc/arl.c
@@ -677,12 +677,12 @@ static struct pmc_info arl_pmc_info_list[] = {
  * Set power state of select devices that do not have drivers to D3
  * so that they do not block Package C entry.
  */
-void arl_d3_fixup(void)
+static void arl_d3_fixup(void)
 {
 	pmc_core_set_device_d3(ARL_NPU_PCI_DEV);
 }
 
-int arl_resume(struct pmc_dev *pmcdev)
+static int arl_resume(struct pmc_dev *pmcdev)
 {
 	arl_d3_fixup();
 	return pmc_core_resume_common(pmcdev);

-- 
2.43.0


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

* [PATCH 2/2] platform/x86/intel/pmc: Mark lnl_d3_fixup() and lnl_resume() as static
  2023-12-22 18:27 [PATCH 0/2] platform/x86/intel/pmc: Fix recent instances of -Wmissing-prototypes Nathan Chancellor
  2023-12-22 18:27 ` [PATCH 1/2] platform/x86/intel/pmc: Mark arl_d3_fixup() and arl_resume() as static Nathan Chancellor
@ 2023-12-22 18:27 ` Nathan Chancellor
  2023-12-28  9:07 ` [PATCH 0/2] platform/x86/intel/pmc: Fix recent instances of -Wmissing-prototypes Hans de Goede
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2023-12-22 18:27 UTC (permalink / raw)
  To: irenic.rajneesh, david.e.box, hdegoede, ilpo.jarvinen,
	rajvi.jingar
  Cc: platform-driver-x86, patches, Stephen Rothwell, Nathan Chancellor

With -Wmissing-prototypes, there are two instances flagged with no
prototypes:

  drivers/platform/x86/intel/pmc/lnl.c:503:6: error: no previous prototype for 'lnl_d3_fixup' [-Werror=missing-prototypes]
    503 | void lnl_d3_fixup(void)
        |      ^~~~~~~~~~~~
  drivers/platform/x86/intel/pmc/lnl.c:509:5: error: no previous prototype for 'lnl_resume' [-Werror=missing-prototypes]
    509 | int lnl_resume(struct pmc_dev *pmcdev)
        |     ^~~~~~~~~~
  cc1: all warnings being treated as errors

These functions are not used outside of this translation unit, so mark
them as static to fix the warning.

Fixes: 119652b855e6 ("platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20231222135412.6bd796cc@canb.auug.org.au/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 drivers/platform/x86/intel/pmc/lnl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel/pmc/lnl.c b/drivers/platform/x86/intel/pmc/lnl.c
index 88b35931f5df..b5de569e6662 100644
--- a/drivers/platform/x86/intel/pmc/lnl.c
+++ b/drivers/platform/x86/intel/pmc/lnl.c
@@ -500,13 +500,13 @@ const struct pmc_reg_map lnl_socm_reg_map = {
  * Set power state of select devices that do not have drivers to D3
  * so that they do not block Package C entry.
  */
-void lnl_d3_fixup(void)
+static void lnl_d3_fixup(void)
 {
 	pmc_core_set_device_d3(LNL_IPU_PCI_DEV);
 	pmc_core_set_device_d3(LNL_NPU_PCI_DEV);
 }
 
-int lnl_resume(struct pmc_dev *pmcdev)
+static int lnl_resume(struct pmc_dev *pmcdev)
 {
 	lnl_d3_fixup();
 	return pmc_core_resume_common(pmcdev);

-- 
2.43.0


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

* Re: [PATCH 0/2] platform/x86/intel/pmc: Fix recent instances of -Wmissing-prototypes
  2023-12-22 18:27 [PATCH 0/2] platform/x86/intel/pmc: Fix recent instances of -Wmissing-prototypes Nathan Chancellor
  2023-12-22 18:27 ` [PATCH 1/2] platform/x86/intel/pmc: Mark arl_d3_fixup() and arl_resume() as static Nathan Chancellor
  2023-12-22 18:27 ` [PATCH 2/2] platform/x86/intel/pmc: Mark lnl_d3_fixup() and lnl_resume() " Nathan Chancellor
@ 2023-12-28  9:07 ` Hans de Goede
  2 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2023-12-28  9:07 UTC (permalink / raw)
  To: Nathan Chancellor, irenic.rajneesh, david.e.box, ilpo.jarvinen,
	rajvi.jingar
  Cc: platform-driver-x86, patches, Stephen Rothwell

Hi,

On 12/22/23 19:27, Nathan Chancellor wrote:
> As reported by Stephen at [1], there are a few instances of
> -Wmissing-prototypes, which break the build with CONFIG_WERROR=y. This
> series marks these functions as static because they are not used outside
> of these translation units.
> 
> Feel free to squash these into the original changes if the branch is not
> set in stone.
> 
> [1]: https://lore.kernel.org/all/20231222135412.6bd796cc@canb.auug.org.au/

Thank you for your patch-series, I've squashed the patches into
the original commits in my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
pushed to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans



> ---
> Nathan Chancellor (2):
>       platform/x86/intel/pmc: Mark arl_d3_fixup() and arl_resume() as static
>       platform/x86/intel/pmc: Mark lnl_d3_fixup() and lnl_resume() as static
> 
>  drivers/platform/x86/intel/pmc/arl.c | 4 ++--
>  drivers/platform/x86/intel/pmc/lnl.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> ---
> base-commit: 119652b855e6c96676406ee9a7f535f4db4e8eff
> change-id: 20231222-intel-pmc-missing-prototypes-8fb5014b16b8
> 
> Best regards,


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

end of thread, other threads:[~2023-12-28  9:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-22 18:27 [PATCH 0/2] platform/x86/intel/pmc: Fix recent instances of -Wmissing-prototypes Nathan Chancellor
2023-12-22 18:27 ` [PATCH 1/2] platform/x86/intel/pmc: Mark arl_d3_fixup() and arl_resume() as static Nathan Chancellor
2023-12-22 18:27 ` [PATCH 2/2] platform/x86/intel/pmc: Mark lnl_d3_fixup() and lnl_resume() " Nathan Chancellor
2023-12-28  9:07 ` [PATCH 0/2] platform/x86/intel/pmc: Fix recent instances of -Wmissing-prototypes Hans de Goede

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