[OPW,kernel] Staging: ft1000: Fix Sparse Warning for Static Declarations in ft1000_hw.c
diff mbox

Message ID 1382552962-4677-1-git-send-email-ebru.akagunduz@gmail.com
State Accepted
Headers show

Commit Message

Ebru Akagündüz Oct. 23, 2013, 6:29 p.m. UTC
This patch fixes the Sparse Warning: "symbol 'ft1000_reset'
was not declared. Should it be static?" in ft1000_hw.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rusty Russell Oct. 24, 2013, 2:43 a.m. UTC | #1
Ebru Akagunduz <ebru.akagunduz@gmail.com> writes:
> This patch fixes the Sparse Warning: "symbol 'ft1000_reset'
> was not declared. Should it be static?" in ft1000_hw.c
>
> Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>

Hi Ebru,

Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>

Another nice cleanup might be to remove those static declarations at the
top of the file:

static int ft1000_reset(void *ft1000dev);
static int ft1000_submit_rx_urb(struct ft1000_info *info);
static int ft1000_start_xmit(struct sk_buff *skb, struct net_device *dev);
static int ft1000_open (struct net_device *dev);
static struct net_device_stats *ft1000_netdev_stats(struct net_device *dev);
static int ft1000_chkcard (struct ft1000_usb *dev);

This can be done simply by reordering the functions so they don't need
it.

Cheers,
Rusty.

> ---
>  drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> index 9b8fed7..c99ee75 100644
> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
> @@ -854,7 +854,7 @@ int reg_ft1000_netdev(struct ft1000_usb *ft1000dev,
>  	return 0;
>  }
>  
> -int ft1000_reset(void *dev)
> +static int ft1000_reset(void *dev)
>  {
>  	ft1000_reset_card(dev);
>  	return 0;
> -- 
> 1.8.1.2
>
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Patch
diff mbox

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 9b8fed7..c99ee75 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -854,7 +854,7 @@  int reg_ft1000_netdev(struct ft1000_usb *ft1000dev,
 	return 0;
 }
 
-int ft1000_reset(void *dev)
+static int ft1000_reset(void *dev)
 {
 	ft1000_reset_card(dev);
 	return 0;