X86 platform drivers
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: irenic.rajneesh@gmail.com, david.e.box@intel.com,
	hdegoede@redhat.com,  ilpo.jarvinen@linux.intel.com,
	rajvi.jingar@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, patches@lists.linux.dev,
	 Stephen Rothwell <sfr@canb.auug.org.au>,
	 Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH 2/2] platform/x86/intel/pmc: Mark lnl_d3_fixup() and lnl_resume() as static
Date: Fri, 22 Dec 2023 11:27:02 -0700	[thread overview]
Message-ID: <20231222-intel-pmc-missing-prototypes-v1-2-3f0d47377d4c@kernel.org> (raw)
In-Reply-To: <20231222-intel-pmc-missing-prototypes-v1-0-3f0d47377d4c@kernel.org>

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


  parent reply	other threads:[~2023-12-22 18:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2023-12-28  9:07 ` [PATCH 0/2] platform/x86/intel/pmc: Fix recent instances of -Wmissing-prototypes Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231222-intel-pmc-missing-prototypes-v1-2-3f0d47377d4c@kernel.org \
    --to=nathan@kernel.org \
    --cc=david.e.box@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=irenic.rajneesh@gmail.com \
    --cc=patches@lists.linux.dev \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rajvi.jingar@linux.intel.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox