diff mbox

CAIF: fix sparse warning for caif_usb

Message ID 1362316188-2927-1-git-send-email-silviupopescu1990@gmail.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Silviu-Mihai Popescu March 3, 2013, 1:09 p.m. UTC
This fixes the following sparse warning:
net/caif/caif_usb.c:84:16: warning: symbol 'cfusbl_create' was not
declared. Should it be static?

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
---
 net/caif/caif_usb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller March 3, 2013, 10:49 p.m. UTC | #1
From: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Date: Sun,  3 Mar 2013 15:09:48 +0200

> This fixes the following sparse warning:
> net/caif/caif_usb.c:84:16: warning: symbol 'cfusbl_create' was not
> declared. Should it be static?
> 
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
> ---
>  net/caif/caif_usb.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/caif/caif_usb.c b/net/caif/caif_usb.c
> index 3ebc8cb..cbae9b0 100644
> --- a/net/caif/caif_usb.c
> +++ b/net/caif/caif_usb.c
> @@ -81,7 +81,7 @@ 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],
> +static struct cflayer *cfusbl_create(int phyid, u8 ethaddr[ETH_ALEN],
>  					u8 braddr[ETH_ALEN])

You need to fix up the indentation of the second line of
function arguments if you move the location of the openning
parenthesis on the first line, because all arguments on the
second and subsequent line must line up exactly at the first
column after the openning parenthesis of the first line.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/caif/caif_usb.c b/net/caif/caif_usb.c
index 3ebc8cb..cbae9b0 100644
--- a/net/caif/caif_usb.c
+++ b/net/caif/caif_usb.c
@@ -81,7 +81,7 @@  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],
+static struct cflayer *cfusbl_create(int phyid, u8 ethaddr[ETH_ALEN],
 					u8 braddr[ETH_ALEN])
 {
 	struct cfusbl *this = kmalloc(sizeof(struct cfusbl), GFP_ATOMIC);