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: <1406881770-13808-1-git-send-email-vincent@bernat.im>
Date:	Fri,  1 Aug 2014 10:29:30 +0200
From:	Vincent Bernat <vincent@...nat.im>
To:	Benjamin Romer <benjamin.romer@...sys.com>,
	David Kershner <david.kershner@...sys.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	sparmaintainer@...sys.com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Cc:	Vincent Bernat <vincent@...nat.im>
Subject: [PATCH] staging: visorchipset: fix sparse warnings about static declaration

Some functions were prototyped as static but the actual definition
wasn't. While this is valid (the function is static because the two
declarations don't conflict and the first one is static), this makes
sparse unhappy and cause confusion of normal people too.

Signed-off-by: Vincent Bernat <vincent@...nat.im>
---
 .../unisys/visorchipset/visorchipset_main.c        | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 156a72fdabd9..c40ff24a30b9 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -339,8 +339,9 @@ static void controlvm_respond_physdev_changestate(CONTROLVM_MESSAGE_HEADER *
 						  msgHdr, int response,
 						  ULTRA_SEGMENT_STATE state);
 
-ssize_t toolaction_show(struct device *dev, struct device_attribute *attr,
-		char *buf)
+static ssize_t toolaction_show(struct device *dev,
+			       struct device_attribute *attr,
+			       char *buf)
 {
 	u8 toolAction;
 
@@ -350,8 +351,9 @@ ssize_t toolaction_show(struct device *dev, struct device_attribute *attr,
 	return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction);
 }
 
-ssize_t toolaction_store(struct device *dev, struct device_attribute *attr,
-		const char *buf, size_t count)
+static ssize_t toolaction_store(struct device *dev,
+				struct device_attribute *attr,
+				const char *buf, size_t count)
 {
 	u8 toolAction;
 	int ret;
@@ -369,8 +371,9 @@ ssize_t toolaction_store(struct device *dev, struct device_attribute *attr,
 		return count;
 }
 
-ssize_t boottotool_show(struct device *dev, struct device_attribute *attr,
-		char *buf)
+static ssize_t boottotool_show(struct device *dev,
+			       struct device_attribute *attr,
+			       char *buf)
 {
 	ULTRA_EFI_SPAR_INDICATION efiSparIndication;
 
@@ -382,8 +385,9 @@ ssize_t boottotool_show(struct device *dev, struct device_attribute *attr,
 			efiSparIndication.BootToTool);
 }
 
-ssize_t boottotool_store(struct device *dev, struct device_attribute *attr,
-		const char *buf, size_t count)
+static ssize_t boottotool_store(struct device *dev,
+				struct device_attribute *attr,
+				const char *buf, size_t count)
 {
 	int val, ret;
 	ULTRA_EFI_SPAR_INDICATION efiSparIndication;
@@ -1932,7 +1936,7 @@ handle_command(CONTROLVM_MESSAGE inmsg, HOSTADDRESS channel_addr)
 	return TRUE;
 }
 
-HOSTADDRESS controlvm_get_channel_address(void)
+static HOSTADDRESS controlvm_get_channel_address(void)
 {
 	U64 addr = 0;
 	U32 size = 0;
-- 
2.0.1

--
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