diff mbox

[-next] bna: fix sparse non static symbol warnings

Message ID CAPgLHd_dx9YdxMrrCybiEovXCfuGGg0TE+rvap3XpmyezuO+wQ@mail.gmail.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Wei Yongjun Dec. 21, 2013, 8:40 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fixes the following sparse warnings:

drivers/net/ethernet/brocade/bna/bnad.c:2112:1: warning:
 symbol 'bnad_reinit_rx' was not declared. Should it be static?
drivers/net/ethernet/brocade/bna/bfa_ioc.c:1784:1: warning:
 symbol 'bfa_nw_ioc_flash_img_get_size' was not declared. Should it be static?
drivers/net/ethernet/brocade/bna/bfa_ioc.c:1792:1: warning:
 symbol 'bfa_nw_ioc_flash_img_get_chnk' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/ethernet/brocade/bna/bnad.c    | 2 +-
 drivers/net/ethernet/brocade/bna/bfa_ioc.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Dec. 22, 2013, 3:04 a.m. UTC | #1
From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Sat, 21 Dec 2013 16:40:55 +0800

> -		fwimg_size = BFI_FLASH_IMAGE_SZ/sizeof(u32);
> +		fwimg_size = bfa_nw_ioc_flash_img_get_size(ioc);

This is not documented in your commit message and seems totally
unrelated to fixing sparse warnings.

I'm not applying this, sorry.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index d31524f..c3c1cde 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -2108,7 +2108,7 @@  bnad_rx_ctrl_init(struct bnad *bnad, u32 rx_id)
 }
 
 /* Called with mutex_lock(&bnad->conf_mutex) held */
-u32
+static u32
 bnad_reinit_rx(struct bnad *bnad)
 {
 	struct net_device *netdev = bnad->netdev;

diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
index 537bba1..4a1f49c 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
@@ -1780,7 +1780,7 @@  bfa_flash_raw_read(void __iomem *pci_bar, u32 offset, char *buf,
 	return BFA_STATUS_OK;
 }
 
-u32
+static u32
 bfa_nw_ioc_flash_img_get_size(struct bfa_ioc *ioc)
 {
 	return BFI_FLASH_IMAGE_SZ/sizeof(u32);
@@ -1788,7 +1788,7 @@  bfa_nw_ioc_flash_img_get_size(struct bfa_ioc *ioc)
 
 #define BFA_FLASH_PART_FWIMG_ADDR	0x100000 /* fw image address */
 
-enum bfa_status
+static enum bfa_status
 bfa_nw_ioc_flash_img_get_chnk(struct bfa_ioc *ioc, u32 off,
 			      u32 *fwimg)
 {
@@ -2053,7 +2053,7 @@  bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type,
 
 	if (boot_env == BFI_FWBOOT_ENV_OS &&
 	    boot_type == BFI_FWBOOT_TYPE_FLASH) {
-		fwimg_size = BFI_FLASH_IMAGE_SZ/sizeof(u32);
+		fwimg_size = bfa_nw_ioc_flash_img_get_size(ioc);
 
 		status = bfa_nw_ioc_flash_img_get_chnk(ioc,
 			BFA_IOC_FLASH_CHUNK_ADDR(chunkno), fwimg_buf);