* [PATCH] staging: visorchipset: fix sparse warnings about static declaration
@ 2014-07-27 21:02 Vincent Bernat
0 siblings, 0 replies; 4+ messages in thread
From: Vincent Bernat @ 2014-07-27 21:02 UTC (permalink / raw)
To: Benjamin Romer, David Kershner, Greg Kroah-Hartman, linux-kernel
Cc: Vincent Bernat
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@bernat.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 58a441dd602e..65541dad014c 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -367,8 +367,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;
@@ -378,8 +379,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;
@@ -395,8 +397,9 @@ ssize_t toolaction_store(struct device *dev, struct device_attribute *attr,
return -EIO;
}
-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;
@@ -408,8 +411,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;
ULTRA_EFI_SPAR_INDICATION efiSparIndication;
@@ -2003,7 +2007,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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] staging: visorchipset: fix sparse warnings about static declaration
@ 2014-08-01 8:10 Vincent Bernat
2014-08-01 8:15 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Vincent Bernat @ 2014-08-01 8:10 UTC (permalink / raw)
To: Benjamin Romer, David Kershner, Greg Kroah-Hartman,
sparmaintainer, devel, linux-kernel
Cc: Vincent Bernat
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@bernat.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 58a441dd602e..65541dad014c 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -367,8 +367,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;
@@ -378,8 +379,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;
@@ -395,8 +397,9 @@ ssize_t toolaction_store(struct device *dev, struct device_attribute *attr,
return -EIO;
}
-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;
@@ -408,8 +411,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;
ULTRA_EFI_SPAR_INDICATION efiSparIndication;
@@ -2003,7 +2007,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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: visorchipset: fix sparse warnings about static declaration
2014-08-01 8:10 [PATCH] staging: visorchipset: fix sparse warnings about static declaration Vincent Bernat
@ 2014-08-01 8:15 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2014-08-01 8:15 UTC (permalink / raw)
To: Vincent Bernat
Cc: Benjamin Romer, David Kershner, sparmaintainer, devel,
linux-kernel
On Fri, Aug 01, 2014 at 10:10:22AM +0200, Vincent Bernat wrote:
> 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@bernat.im>
> ---
> .../unisys/visorchipset/visorchipset_main.c | 22 +++++++++++++---------
> 1 file changed, 13 insertions(+), 9 deletions(-)
This no longer applies cleanly to my tree, can you please refresh it and
resend so that I can apply it?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] staging: visorchipset: fix sparse warnings about static declaration
@ 2014-08-01 8:29 Vincent Bernat
0 siblings, 0 replies; 4+ messages in thread
From: Vincent Bernat @ 2014-08-01 8:29 UTC (permalink / raw)
To: Benjamin Romer, David Kershner, Greg Kroah-Hartman,
sparmaintainer, devel, linux-kernel
Cc: Vincent Bernat
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@bernat.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-01 8:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 8:10 [PATCH] staging: visorchipset: fix sparse warnings about static declaration Vincent Bernat
2014-08-01 8:15 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2014-08-01 8:29 Vincent Bernat
2014-07-27 21:02 Vincent Bernat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox