From: Marc Kleine-Budde <mkl@pengutronix.de>
To: adi-buildroot-devel@lists.sourceforge.net
Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH] blackfin: portmux: define proper no-ops for peripheral_* for CONFIG_PINCTRL=y
Date: Wed, 4 Mar 2015 11:20:27 +0100 [thread overview]
Message-ID: <1425464427-6375-1-git-send-email-mkl@pengutronix.de> (raw)
When compiling blackfin code with CONFIG_PINCTRL=y, several functions
peripheral_* are no-oped by #define'ing them to nothing. This may lead to
unused variable warning in the code that's using the peripheral_* function.
This patch defines proper static inline no-op functions to fix these warnings.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
arch/blackfin/include/asm/portmux.h | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/arch/blackfin/include/asm/portmux.h b/arch/blackfin/include/asm/portmux.h
index c8f0939419be..110a66bbc268 100644
--- a/arch/blackfin/include/asm/portmux.h
+++ b/arch/blackfin/include/asm/portmux.h
@@ -23,10 +23,20 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state);
#define gpio_pint_regs bfin_pint_regs
#define adi_internal_set_wake bfin_internal_set_wake
-#define peripheral_request(per, label) (0)
-#define peripheral_free(per)
-#define peripheral_request_list(per, label) (0)
-#define peripheral_free_list(per)
+static inline int peripheral_request(unsigned short per, const char *label)
+{
+ return 0;
+}
+static inline void peripheral_free(unsigned short per)
+{
+}
+static inline int peripheral_request_list(const unsigned short per[], const char *label)
+{
+ return 0;
+}
+static inline void peripheral_free_list(const unsigned short per[])
+{
+}
#else
int peripheral_request(unsigned short per, const char *label);
void peripheral_free(unsigned short per);
--
2.1.4
reply other threads:[~2015-03-04 10:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1425464427-6375-1-git-send-email-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=adi-buildroot-devel@lists.sourceforge.net \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.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 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®