Skip to content

Commit

Permalink
bna: fix sparse warnings/errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stephen hemminger authored and David S. Miller committed Jan 5, 2012
1 parent 975419c commit e1e0918
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/brocade/bna/bna_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ struct bna_ethport {

/* Doorbell structure */
struct bna_ib_dbell {
void *__iomem doorbell_addr;
void __iomem *doorbell_addr;
u32 doorbell_ack;
};

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/ethernet/brocade/bna/bnad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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};

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/brocade/bna/bnad.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/brocade/bna/cna_fwimg.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* www.brocade.com
*/
#include <linux/firmware.h>
#include "bnad.h"
#include "bfi.h"
#include "cna.h"

Expand Down

0 comments on commit e1e0918

Please sign in to comment.