diff options
author | stephen hemminger <shemminger@vyatta.com> | 2012-01-04 13:02:24 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-05 13:23:00 -0500 |
commit | e1e0918fcaea7b8100ed9f96f3ecd9eb9b867102 (patch) | |
tree | 60caa3f37801b440f2918c05ae838e9480482f43 /drivers/net/ethernet/brocade | |
parent | 975419cf01fc6997879196d1c8f5ebffd30d3b20 (diff) |
bna: fix sparse warnings/errors
This fixes a several sparse warnings.
* the __iomem tag was being used incorrectly (needs to be a prefix)
* several variables should have been static since local to one file
* the firmware was not being forwared declared
and was const one place and not the other
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/brocade')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bna_types.h | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bnad.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bnad.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/brocade/bna/cna_fwimg.c | 1 |
4 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bna_types.h b/drivers/net/ethernet/brocade/bna/bna_types.h index 8e57fc5c586..e8d3ab7ea6c 100644 --- a/drivers/net/ethernet/brocade/bna/bna_types.h +++ b/drivers/net/ethernet/brocade/bna/bna_types.h @@ -427,7 +427,7 @@ struct bna_ethport { /* Doorbell structure */ struct bna_ib_dbell { - void *__iomem doorbell_addr; + void __iomem *doorbell_addr; u32 doorbell_ack; }; @@ -463,7 +463,7 @@ struct bna_tcb { u32 consumer_index; volatile u32 *hw_consumer_index; u32 q_depth; - void *__iomem q_dbell; + void __iomem *q_dbell; struct bna_ib_dbell *i_dbell; int page_idx; int page_count; @@ -599,7 +599,7 @@ struct bna_rcb { u32 producer_index; u32 consumer_index; u32 q_depth; - void *__iomem q_dbell; + void __iomem *q_dbell; int page_idx; int page_count; /* Control path */ diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c index 2eddbaa5db4..be7d91e4b78 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.c +++ b/drivers/net/ethernet/brocade/bna/bnad.c @@ -53,9 +53,9 @@ MODULE_PARM_DESC(bna_debugfs_enable, "Enables debugfs feature, default=1," * Global variables */ u32 bnad_rxqs_per_cq = 2; -u32 bna_id; -struct mutex bnad_list_mutex; -LIST_HEAD(bnad_list); +static u32 bna_id; +static struct mutex bnad_list_mutex; +static LIST_HEAD(bnad_list); static const u8 bnad_bcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; /* diff --git a/drivers/net/ethernet/brocade/bna/bnad.h b/drivers/net/ethernet/brocade/bna/bnad.h index c975ce672f4..55824d92699 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.h +++ b/drivers/net/ethernet/brocade/bna/bnad.h @@ -347,7 +347,7 @@ struct bnad_drvinfo { /* * EXTERN VARIABLES */ -extern struct firmware *bfi_fw; +extern const struct firmware *bfi_fw; extern u32 bnad_rxqs_per_cq; /* diff --git a/drivers/net/ethernet/brocade/bna/cna_fwimg.c b/drivers/net/ethernet/brocade/bna/cna_fwimg.c index 725b9fff337..cfc22a64157 100644 --- a/drivers/net/ethernet/brocade/bna/cna_fwimg.c +++ b/drivers/net/ethernet/brocade/bna/cna_fwimg.c @@ -16,6 +16,7 @@ * www.brocade.com */ #include <linux/firmware.h> +#include "bnad.h" #include "bfi.h" #include "cna.h" |