Commit e1e0918f authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

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: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 975419cf
...@@ -427,7 +427,7 @@ struct bna_ethport { ...@@ -427,7 +427,7 @@ struct bna_ethport {
/* Doorbell structure */ /* Doorbell structure */
struct bna_ib_dbell { struct bna_ib_dbell {
void *__iomem doorbell_addr; void __iomem *doorbell_addr;
u32 doorbell_ack; u32 doorbell_ack;
}; };
...@@ -463,7 +463,7 @@ struct bna_tcb { ...@@ -463,7 +463,7 @@ struct bna_tcb {
u32 consumer_index; u32 consumer_index;
volatile u32 *hw_consumer_index; volatile u32 *hw_consumer_index;
u32 q_depth; u32 q_depth;
void *__iomem q_dbell; void __iomem *q_dbell;
struct bna_ib_dbell *i_dbell; struct bna_ib_dbell *i_dbell;
int page_idx; int page_idx;
int page_count; int page_count;
...@@ -599,7 +599,7 @@ struct bna_rcb { ...@@ -599,7 +599,7 @@ struct bna_rcb {
u32 producer_index; u32 producer_index;
u32 consumer_index; u32 consumer_index;
u32 q_depth; u32 q_depth;
void *__iomem q_dbell; void __iomem *q_dbell;
int page_idx; int page_idx;
int page_count; int page_count;
/* Control path */ /* Control path */
......
...@@ -53,9 +53,9 @@ MODULE_PARM_DESC(bna_debugfs_enable, "Enables debugfs feature, default=1," ...@@ -53,9 +53,9 @@ MODULE_PARM_DESC(bna_debugfs_enable, "Enables debugfs feature, default=1,"
* Global variables * Global variables
*/ */
u32 bnad_rxqs_per_cq = 2; u32 bnad_rxqs_per_cq = 2;
u32 bna_id; static u32 bna_id;
struct mutex bnad_list_mutex; static struct mutex bnad_list_mutex;
LIST_HEAD(bnad_list); static LIST_HEAD(bnad_list);
static const u8 bnad_bcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; static const u8 bnad_bcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
/* /*
......
...@@ -347,7 +347,7 @@ struct bnad_drvinfo { ...@@ -347,7 +347,7 @@ struct bnad_drvinfo {
/* /*
* EXTERN VARIABLES * EXTERN VARIABLES
*/ */
extern struct firmware *bfi_fw; extern const struct firmware *bfi_fw;
extern u32 bnad_rxqs_per_cq; extern u32 bnad_rxqs_per_cq;
/* /*
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
* www.brocade.com * www.brocade.com
*/ */
#include <linux/firmware.h> #include <linux/firmware.h>
#include "bnad.h"
#include "bfi.h" #include "bfi.h"
#include "cna.h" #include "cna.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment