diff mbox

[1/4] staging: vt6655: correcting function declaration sparse error

Message ID 1421546666-21461-2-git-send-email-mathieu.poirier@linaro.org
State New
Headers show

Commit Message

Mathieu Poirier Jan. 18, 2015, 2:04 a.m. UTC
From: Mathieu Poirier <mathieu.poirier@linaro.org>

mpoirier@t430:~/work/kernel1$ make C=1 M=drivers/staging/vt6655/
  LD      drivers/staging/vt6655/built-in.o
  CHECK   drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/device_main.c:1672:5: warning: symbol 'vnt_init' was not declared. Should it be static?
  CC [M]  drivers/staging/vt6655/device_main.o

Function @vnt_init is only called by @vt6655_probe, in turn is declared "static".
As sparse suggest, @vnt_init should very likely be declared static as well.  At
least nothing in the file indicate that it should be otherwise.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
 drivers/staging/vt6655/device_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mathieu Poirier Jan. 28, 2015, 2:37 a.m. UTC | #1
On 25 January 2015 at 04:39, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Sat, Jan 17, 2015 at 07:04:23PM -0700, mathieu.poirier@linaro.org wrote:
>> From: Mathieu Poirier <mathieu.poirier@linaro.org>
>>
>> mpoirier@t430:~/work/kernel1$ make C=1 M=drivers/staging/vt6655/
>>   LD      drivers/staging/vt6655/built-in.o
>>   CHECK   drivers/staging/vt6655/device_main.c
>> drivers/staging/vt6655/device_main.c:1672:5: warning: symbol 'vnt_init' was not declared. Should it be static?
>>   CC [M]  drivers/staging/vt6655/device_main.o
>>
>> Function @vnt_init is only called by @vt6655_probe, in turn is declared "static".
>> As sparse suggest, @vnt_init should very likely be declared static as well.  At
>> least nothing in the file indicate that it should be otherwise.
>>
>> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
>> ---
>>  drivers/staging/vt6655/device_main.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> This whole series does not apply to my staging-next branch, of
> staging.git, please refresh against it and resend if it is still needed
> (hint, I don't think they all are...)

Turns out none of them are necessary anymore.

Regards,
Mathieu

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

Patch

diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 83e4162c0094..a3f5cd84259a 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1669,7 +1669,7 @@  static const struct ieee80211_ops vnt_mac_ops = {
 	.reset_tsf		= vnt_reset_tsf,
 };
 
-int vnt_init(struct vnt_private *priv)
+static int vnt_init(struct vnt_private *priv)
 {
 	SET_IEEE80211_PERM_ADDR(priv->hw, priv->abyCurrentNetAddr);