All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Kellermann <max.kellermann@ionos.com>
To: richard.henderson@linaro.org, ink@jurassic.park.msu.ru,
	mattst88@gmail.com, linux-alpha@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Max Kellermann <max.kellermann@ionos.com>
Subject: [PATCH 10/11] arch/alpha/smc37c669.: make SMC37c669_dump_registers() static
Date: Mon, 11 Mar 2024 14:23:05 +0100	[thread overview]
Message-ID: <20240311132306.3420135-10-max.kellermann@ionos.com> (raw)
In-Reply-To: <20240311132306.3420135-1-max.kellermann@ionos.com>

This function is only used within this source file.  Fixes
`-Wmissing-prototypes`:

 arch/alpha/kernel/smc37c669.c:2434:1: error: no previous prototype for 'SMC37c669_dump_registers' [-Werror=missing-prototypes]
  2434 | SMC37c669_dump_registers(void)
       | ^~~~~~~~~~~~~~~~~~~~~~~~

Also add `#if SMC_DEBUG` because it's only ever used under this
condition.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
 arch/alpha/kernel/smc37c669.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/alpha/kernel/smc37c669.c b/arch/alpha/kernel/smc37c669.c
index bbbd34586de0..ab22ade3dea3 100644
--- a/arch/alpha/kernel/smc37c669.c
+++ b/arch/alpha/kernel/smc37c669.c
@@ -2430,13 +2430,16 @@ int __init smcc669_write( struct FILE *fp, int size, int number, unsigned char *
 }
 #endif
 
-void __init
+#if SMC_DEBUG
+static void __init
 SMC37c669_dump_registers(void)
 {
   int i;
   for (i = 0; i <= 0x29; i++)
     printk("-- CR%02x : %02x\n", i, SMC37c669_read_config(i));
 }
+#endif // SMC_DEBUG
+
 /*+
  * ============================================================================
  * = SMC_init - SMC37c669 Super I/O controller initialization                 =
-- 
2.39.2


  parent reply	other threads:[~2024-03-11 13:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 13:22 [PATCH 01/11] arch/alpha/kernel: disable -Wmissing-prototypes for asmlinkage functions Max Kellermann
2024-03-11 13:22 ` [PATCH 02/11] arch/alpha/bugs: add missing SPDX header Max Kellermann
2024-03-11 13:22 ` [PATCH 03/11] arch/alpha/bugs: include <linux/cpu.h> to fix -Wmissing-prototypes Max Kellermann
2024-03-11 13:22 ` [PATCH 04/11] arch/alpha/io: add missing includes " Max Kellermann
2024-03-11 13:23 ` [PATCH 05/11] arch/alpha/pci: make pcibios_claim_one_bus() static Max Kellermann
2024-03-11 13:23 ` [PATCH 06/11] arch/alpha/irq: include irq_impl.h to fix -Wmissing-prototypes Max Kellermann
2024-03-11 13:23 ` [PATCH 07/11] arch/alpha/perf_event: make init_hw_perf_events() static Max Kellermann
2024-03-11 13:23 ` [PATCH 08/11] arch/alpha/checksum: add missing includes to fix -Wmissing-prototypes Max Kellermann
2024-03-11 13:23 ` [PATCH 09/11] arch/alpha/fpreg: " Max Kellermann
2024-03-11 13:23 ` Max Kellermann [this message]
2024-03-11 13:23 ` [PATCH 11/11] arch/alpha/smc37c669: " Max Kellermann

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=20240311132306.3420135-10-max.kellermann@ionos.com \
    --to=max.kellermann@ionos.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=richard.henderson@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.