Skip to contentSkip to conversation

CAIF: fix sparse warning for caif_usb

PATCH Superseded Silviu-Mihai Popescu 2 participants 2 messages Mar 4, 2013

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 CAIF: fix sparse warning for caif_usb

This fixes the following sparse warning:
net/caif/caif_usb.c:84:16: warning: symbol 'cfusbl_create' was not declared. Should it be static?

---
 net/caif/caif_usb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/caif/caif_usb.c +2 -2
index 3ebc8cb..1c6ded9 100644
@@ -81,8 +81,8 @@ static void cfusbl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
 		layr->up->ctrlcmd(layr->up, ctrl, layr->id);
 }
 
-struct cflayer *cfusbl_create(int phyid, u8 ethaddr[ETH_ALEN],
-					u8 braddr[ETH_ALEN])
+static struct cflayer *cfusbl_create(int phyid, u8 ethaddr[ETH_ALEN],
+							u8 braddr[ETH_ALEN])
 {
 	struct cfusbl *this = kmalloc(sizeof(struct cfusbl), GFP_ATOMIC);
 
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw

From: Silviu-Mihai Popescu <[email protected]>
Date: Mon, 4 Mar 2013 08:52:00 +0200

Quoted 14 lines

This fixes the following sparse warning:
net/caif/caif_usb.c:84:16: warning: symbol 'cfusbl_create' was not declared. Should it be static?

---
 net/caif/caif_usb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/caif/caif_usb.c +0 -0
index 3ebc8cb..1c6ded9 100644

net/caif/caif_usb.c static void cfusbl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, · line 85

Quoted 7 lines
net/caif/caif_usb.c +2 -2
@@ -81,8 +81,8 @@ static void cfusbl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
 		layr->up->ctrlcmd(layr->up, ctrl, layr->id);
 }
 
-struct cflayer *cfusbl_create(int phyid, u8 ethaddr[ETH_ALEN],
-					u8 braddr[ETH_ALEN])
+static struct cflayer *cfusbl_create(int phyid, u8 ethaddr[ETH_ALEN],
+							u8 braddr[ETH_ALEN])

Nope, that indentation isn't correct, is should be:

static struct cflayer *cfusbl_create(int phyid, u8 ethaddr[ETH_ALEN],
u8 braddr[ETH_ALEN])

Read my email, I said that the first character on the second line must line up with the first column after the openning parenthesis of the first line.