lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1427916824-1513-1-git-send-email-mkl@pengutronix.de>
Date:	Wed,  1 Apr 2015 21:33:44 +0200
From:	Marc Kleine-Budde <mkl@...gutronix.de>
To:	adi-buildroot-devel@...ts.sourceforge.net
Cc:	kernel@...gutronix.de, linux-kernel@...r.kernel.org,
	Steven Miao <realmz6@...il.com>,
	Marc Kleine-Budde <mkl@...gutronix.de>
Subject: [PATCH resend] blackfin: portmux: define proper no-ops for peripheral_* for CONFIG_PINCTRL=y

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@...gutronix.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ