aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2012-01-04 08:02:24 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-05 13:23:00 -0500
commite1e0918fcaea7b8100ed9f96f3ecd9eb9b867102 (patch)
tree60caa3f37801b440f2918c05ae838e9480482f43 /drivers/net
parent975419cf01fc6997879196d1c8f5ebffd30d3b20 (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')
-rw-r--r--drivers/net/ethernet/brocade/bna/bna_types.h6
-rw-r--r--drivers/net/ethernet/brocade/bna/bnad.c6
-rw-r--r--drivers/net/ethernet/brocade/bna/bnad.h2
-rw-r--r--drivers/net/ethernet/brocade/bna/cna_fwimg.c1
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 8e57fc5c5868..e8d3ab7ea6cb 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 {
427 427
428/* Doorbell structure */ 428/* Doorbell structure */
429struct bna_ib_dbell { 429struct bna_ib_dbell {
430 void *__iomem doorbell_addr; 430 void __iomem *doorbell_addr;
431 u32 doorbell_ack; 431 u32 doorbell_ack;
432}; 432};
433 433
@@ -463,7 +463,7 @@ struct bna_tcb {
463 u32 consumer_index; 463 u32 consumer_index;
464 volatile u32 *hw_consumer_index; 464 volatile u32 *hw_consumer_index;
465 u32 q_depth; 465 u32 q_depth;
466 void *__iomem q_dbell; 466 void __iomem *q_dbell;
467 struct bna_ib_dbell *i_dbell; 467 struct bna_ib_dbell *i_dbell;
468 int page_idx; 468 int page_idx;
469 int page_count; 469 int page_count;
@@ -599,7 +599,7 @@ struct bna_rcb {
599 u32 producer_index; 599 u32 producer_index;
600 u32 consumer_index; 600 u32 consumer_index;
601 u32 q_depth; 601 u32 q_depth;
602 void *__iomem q_dbell; 602 void __iomem *q_dbell;
603 int page_idx; 603 int page_idx;
604 int page_count; 604 int page_count;
605 /* Control path */ 605 /* Control path */
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index 2eddbaa5db47..be7d91e4b785 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,"
53 * Global variables 53 * Global variables
54 */ 54 */
55u32 bnad_rxqs_per_cq = 2; 55u32 bnad_rxqs_per_cq = 2;
56u32 bna_id; 56static u32 bna_id;
57struct mutex bnad_list_mutex; 57static struct mutex bnad_list_mutex;
58LIST_HEAD(bnad_list); 58static LIST_HEAD(bnad_list);
59static const u8 bnad_bcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; 59static const u8 bnad_bcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
60 60
61/* 61/*
diff --git a/drivers/net/ethernet/brocade/bna/bnad.h b/drivers/net/ethernet/brocade/bna/bnad.h
index c975ce672f48..55824d92699f 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.h
+++ b/drivers/net/ethernet/brocade/bna/bnad.h
@@ -347,7 +347,7 @@ struct bnad_drvinfo {
347/* 347/*
348 * EXTERN VARIABLES 348 * EXTERN VARIABLES
349 */ 349 */
350extern struct firmware *bfi_fw; 350extern const struct firmware *bfi_fw;
351extern u32 bnad_rxqs_per_cq; 351extern u32 bnad_rxqs_per_cq;
352 352
353/* 353/*
diff --git a/drivers/net/ethernet/brocade/bna/cna_fwimg.c b/drivers/net/ethernet/brocade/bna/cna_fwimg.c
index 725b9fff337f..cfc22a64157e 100644
--- a/drivers/net/ethernet/brocade/bna/cna_fwimg.c
+++ b/drivers/net/ethernet/brocade/bna/cna_fwimg.c
@@ -16,6 +16,7 @@
16 * www.brocade.com 16 * www.brocade.com
17 */ 17 */
18#include <linux/firmware.h> 18#include <linux/firmware.h>
19#include "bnad.h"
19#include "bfi.h" 20#include "bfi.h"
20#include "cna.h" 21#include "cna.h"
21 22