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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu,  2 Jul 2020 15:46:16 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     gregkh@...uxfoundation.org
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Roman Weissgaerber <weissg@...nna.at>,
        David Brownell <dbrownell@...rs.sourceforge.net>
Subject: [PATCH 21/30] usb: host: ohci: Mark cc_to_error as __maybe_unused

drivers/usb/host/ohci.h in included by a whole much of different
sourcefiles.  Not all of them make use of cc_to_error.  So mark
it as __maybe_used to convey that this behaviour is not only
acceptable it's expected.

Fixes the following kernel build warning(s):

 In file included from drivers/usb/host/ohci-pci.c:25:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-platform.c:32:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-exynos.c:20:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-spear.c:22:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-st.c:26:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-at91.c:31:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~
 In file included from drivers/usb/host/ohci-s3c2410.c:32:
 drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=]
 165 | static const int cc_to_error 1 = {
 | ^~~~~~~~~~~

Cc: Alan Stern <stern@...land.harvard.edu>
Cc: Roman Weissgaerber <weissg@...nna.at>
Cc: David Brownell <dbrownell@...rs.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
 drivers/usb/host/ohci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index b85a39588f9d9..aac6285b37f80 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -162,7 +162,7 @@ struct td {
 
 
 /* map OHCI TD status codes (CC) to errno values */
-static const int cc_to_error [16] = {
+static const int __maybe_unused cc_to_error [16] = {
 	/* No  Error  */               0,
 	/* CRC Error  */               -EILSEQ,
 	/* Bit Stuff  */               -EPROTO,
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ