mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: brgl@kernel.org, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: [PATCH v2 2/6] MIPS: alchemy: provide visible function prototypes to board files
Date: Tue, 05 May 2026 11:04:42 +0200	[thread overview]
Message-ID: <20260505-gpio-swnode-alchemy-v2-2-cb208afc5b56@oss.qualcomm.com> (raw)
In-Reply-To: <20260505-gpio-swnode-alchemy-v2-0-cb208afc5b56@oss.qualcomm.com>

Board files under arch/mips/alchemy/ define functions called from
db1xxx.c but their prototypes are only in that .c file instead of being
declared in a common header. This causes several build warnings about
missing prototypes. Provide these prototypes in a new header and include
it where necessary.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
 arch/mips/alchemy/devboards/db1000.c |  2 ++
 arch/mips/alchemy/devboards/db1200.c |  1 +
 arch/mips/alchemy/devboards/db1300.c |  1 +
 arch/mips/alchemy/devboards/db1550.c |  2 ++
 arch/mips/alchemy/devboards/db1xxx.c | 11 +----------
 arch/mips/alchemy/devboards/db1xxx.h | 18 ++++++++++++++++++
 6 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/arch/mips/alchemy/devboards/db1000.c b/arch/mips/alchemy/devboards/db1000.c
index 6984cd5169b5fda48d9dcbeb1f72a5de4473100d..65238f14f28d61ef3eddfd571c7d61f01e7434fd 100644
--- a/arch/mips/alchemy/devboards/db1000.c
+++ b/arch/mips/alchemy/devboards/db1000.c
@@ -27,6 +27,8 @@
 #include <asm/mach-db1x00/bcsr.h>
 #include <asm/reboot.h>
 #include <prom.h>
+
+#include "db1xxx.h"
 #include "platform.h"
 
 #define F_SWAPPED (bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT)
diff --git a/arch/mips/alchemy/devboards/db1200.c b/arch/mips/alchemy/devboards/db1200.c
index 67f067706af27342317c4265d2b3dda97681d391..de2a9083ed9a35b3f87bcba7e05da1de175615b1 100644
--- a/arch/mips/alchemy/devboards/db1200.c
+++ b/arch/mips/alchemy/devboards/db1200.c
@@ -30,6 +30,7 @@
 #include <asm/mach-au1x00/au1550_spi.h>
 #include <asm/mach-db1x00/bcsr.h>
 
+#include "db1xxx.h"
 #include "platform.h"
 
 #define BCSR_INT_IDE		0x0001
diff --git a/arch/mips/alchemy/devboards/db1300.c b/arch/mips/alchemy/devboards/db1300.c
index d377e043b49f86539b88fd6f79c5395f1a42278d..b46f5e47da2c32be3b44bcb80ea4b6e2623f735b 100644
--- a/arch/mips/alchemy/devboards/db1300.c
+++ b/arch/mips/alchemy/devboards/db1300.c
@@ -32,6 +32,7 @@
 #include <asm/mach-db1x00/bcsr.h>
 #include <asm/mach-au1x00/prom.h>
 
+#include "db1xxx.h"
 #include "platform.h"
 
 /* FPGA (external mux) interrupt sources */
diff --git a/arch/mips/alchemy/devboards/db1550.c b/arch/mips/alchemy/devboards/db1550.c
index 6c6837181f5555f3f9b8ebf495c03a22bef735b4..b8295a5c2e9a1e782e6d460b2e912c7155066ad4 100644
--- a/arch/mips/alchemy/devboards/db1550.c
+++ b/arch/mips/alchemy/devboards/db1550.c
@@ -28,6 +28,8 @@
 #include <asm/mach-au1x00/au1550nd.h>
 #include <asm/mach-db1x00/bcsr.h>
 #include <prom.h>
+
+#include "db1xxx.h"
 #include "platform.h"
 
 static void __init db1550_hw_setup(void)
diff --git a/arch/mips/alchemy/devboards/db1xxx.c b/arch/mips/alchemy/devboards/db1xxx.c
index e6d25aad8350ed639683b2c6fa6d013690c74913..2e8c68d97b34a829af00a8e622ca0955c1d8c2ff 100644
--- a/arch/mips/alchemy/devboards/db1xxx.c
+++ b/arch/mips/alchemy/devboards/db1xxx.c
@@ -7,16 +7,7 @@
 #include <asm/mach-au1x00/au1000.h>
 #include <asm/mach-db1x00/bcsr.h>
 
-int __init db1000_board_setup(void);
-int __init db1000_dev_setup(void);
-int __init db1500_pci_setup(void);
-int __init db1200_board_setup(void);
-int __init db1200_dev_setup(void);
-int __init db1300_board_setup(void);
-int __init db1300_dev_setup(void);
-int __init db1550_board_setup(void);
-int __init db1550_dev_setup(void);
-int __init db1550_pci_setup(int);
+#include "db1xxx.h"
 
 static const char *board_type_str(void)
 {
diff --git a/arch/mips/alchemy/devboards/db1xxx.h b/arch/mips/alchemy/devboards/db1xxx.h
new file mode 100644
index 0000000000000000000000000000000000000000..f39e3551e3b3a738693b2bae8133a6e01a6aabaa
--- /dev/null
+++ b/arch/mips/alchemy/devboards/db1xxx.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef __LINUX_MIPS_DB1XXX__
+#define __LINUX_MIPS_DB1XXX__
+
+const char *get_system_type(void);
+int db1000_board_setup(void);
+int db1000_dev_setup(void);
+int db1500_pci_setup(void);
+int db1200_board_setup(void);
+int db1200_dev_setup(void);
+int db1300_board_setup(void);
+int db1300_dev_setup(void);
+int db1550_board_setup(void);
+int db1550_dev_setup(void);
+int db1550_pci_setup(int id);
+
+#endif /* __LINUX_MIPS_DB1XXX__ */

-- 
2.47.3


  parent reply	other threads:[~2026-05-05  9:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05  9:04 [PATCH v2 0/6] MIPS: alchemy: attach software nodes to GPIO controllers and use properties Bartosz Golaszewski
2026-05-05  9:04 ` [PATCH v2 1/6] MIPS: alchemy: platform: add missing include Bartosz Golaszewski
2026-05-05  9:04 ` Bartosz Golaszewski [this message]
2026-05-05  9:04 ` [PATCH v2 3/6] MIPS: alchemy: mtx1: attach software nodes to GPIO chips Bartosz Golaszewski
2026-05-05  9:04 ` [PATCH v2 4/6] MIPS: alchemy: db1000: use nodes attached to GPIO chips in properties Bartosz Golaszewski
2026-05-05  9:04 ` [PATCH v2 5/6] MIPS: alchemy: gpr: switch to static device properties Bartosz Golaszewski
2026-05-05  9:04 ` [PATCH v2 6/6] MIPS: alchemy: db1300: " Bartosz Golaszewski
2026-05-05 13:31 ` [PATCH v2 0/6] MIPS: alchemy: attach software nodes to GPIO controllers and use properties Manuel Lauss
2026-05-19 11:52   ` Bartosz Golaszewski
2026-05-19 20:56     ` Thomas Bogendoerfer
2026-05-20  7:07       ` Bartosz Golaszewski
2026-05-26 14:35         ` Thomas Bogendoerfer

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=20260505-gpio-swnode-alchemy-v2-2-cb208afc5b56@oss.qualcomm.com \
    --to=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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

all inboxes | Powered by JetHome®