driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] staging: wfx: Make some functions static
@ 2019-10-09 13:03 zhengbin
  2019-10-09 13:03 ` [PATCH 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static zhengbin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: zhengbin @ 2019-10-09 13:03 UTC (permalink / raw)
  To: jerome.pouiller, gregkh, devel; +Cc: zhengbin13

zhengbin (3):
  staging: wfx: Make function
    'sram_write_dma_safe','load_firmware_secure' static
  staging: wfx: Make function 'wfx_tx_queue_get' static
  staging: wfx: Make some functions static in sta.c

 drivers/staging/wfx/fwio.c  |  5 +++--
 drivers/staging/wfx/queue.c |  3 ++-
 drivers/staging/wfx/sta.c   | 16 ++++++++--------
 3 files changed, 13 insertions(+), 11 deletions(-)

--
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static
  2019-10-09 13:03 [PATCH 0/3] staging: wfx: Make some functions static zhengbin
@ 2019-10-09 13:03 ` zhengbin
  2019-10-09 13:12   ` Dan Carpenter
  2019-10-09 13:03 ` [PATCH 2/3] staging: wfx: Make function 'wfx_tx_queue_get' static zhengbin
  2019-10-09 13:03 ` [PATCH 3/3] staging: wfx: Make some functions static in sta.c zhengbin
  2 siblings, 1 reply; 5+ messages in thread
From: zhengbin @ 2019-10-09 13:03 UTC (permalink / raw)
  To: jerome.pouiller, gregkh, devel; +Cc: zhengbin13

Fix sparse warnings:

drivers/staging/wfx/fwio.c:83:5: warning: symbol 'sram_write_dma_safe' was not declared. Should it be static?
drivers/staging/wfx/fwio.c:229:5: warning: symbol 'load_firmware_secure' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/staging/wfx/fwio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c
index 8fb4a9f..39e1258 100644
--- a/drivers/staging/wfx/fwio.c
+++ b/drivers/staging/wfx/fwio.c
@@ -80,7 +80,8 @@ static const char * const fwio_error_strings[] = {
  * NOTE: it may also be possible to use 'pages' from struct firmware and avoid
  * bounce buffer
  */
-int sram_write_dma_safe(struct wfx_dev *wdev, u32 addr, const u8 *buf, size_t len)
+static int
+sram_write_dma_safe(struct wfx_dev *wdev, u32 addr, const u8 *buf, size_t len)
 {
 	int ret;
 	const u8 *tmp;
@@ -226,7 +227,7 @@ static void print_boot_status(struct wfx_dev *wdev)
 	}
 }

-int load_firmware_secure(struct wfx_dev *wdev)
+static int load_firmware_secure(struct wfx_dev *wdev)
 {
 	const struct firmware *fw = NULL;
 	int header_size;
--
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] staging: wfx: Make function 'wfx_tx_queue_get' static
  2019-10-09 13:03 [PATCH 0/3] staging: wfx: Make some functions static zhengbin
  2019-10-09 13:03 ` [PATCH 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static zhengbin
@ 2019-10-09 13:03 ` zhengbin
  2019-10-09 13:03 ` [PATCH 3/3] staging: wfx: Make some functions static in sta.c zhengbin
  2 siblings, 0 replies; 5+ messages in thread
From: zhengbin @ 2019-10-09 13:03 UTC (permalink / raw)
  To: jerome.pouiller, gregkh, devel; +Cc: zhengbin13

Fix sparse warnings:

drivers/staging/wfx/queue.c:218:16: warning: symbol 'wfx_tx_queue_get' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/staging/wfx/queue.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c
index 6f1be4f..4a860227 100644
--- a/drivers/staging/wfx/queue.c
+++ b/drivers/staging/wfx/queue.c
@@ -215,7 +215,8 @@ void wfx_tx_queue_put(struct wfx_dev *wdev, struct wfx_queue *queue, struct sk_b
 	spin_unlock_bh(&queue->queue.lock);
 }

-struct sk_buff *wfx_tx_queue_get(struct wfx_dev *wdev, struct wfx_queue *queue, u32 link_id_map)
+static struct sk_buff *
+wfx_tx_queue_get(struct wfx_dev *wdev, struct wfx_queue *queue, u32 link_id_map)
 {
 	struct sk_buff *skb = NULL;
 	struct sk_buff *item;
--
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] staging: wfx: Make some functions static in sta.c
  2019-10-09 13:03 [PATCH 0/3] staging: wfx: Make some functions static zhengbin
  2019-10-09 13:03 ` [PATCH 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static zhengbin
  2019-10-09 13:03 ` [PATCH 2/3] staging: wfx: Make function 'wfx_tx_queue_get' static zhengbin
@ 2019-10-09 13:03 ` zhengbin
  2 siblings, 0 replies; 5+ messages in thread
From: zhengbin @ 2019-10-09 13:03 UTC (permalink / raw)
  To: jerome.pouiller, gregkh, devel; +Cc: zhengbin13

Fix sparse warnings:

drivers/staging/wfx/sta.c:269:6: warning: symbol 'wfx_update_filtering_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:475:6: warning: symbol 'wfx_event_handler_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:521:6: warning: symbol 'wfx_bss_loss_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:528:6: warning: symbol 'wfx_bss_params_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:539:6: warning: symbol 'wfx_set_beacon_wakeup_period_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:732:6: warning: symbol 'wfx_unjoin_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:794:6: warning: symbol 'wfx_set_cts_work' was not declared. Should it be static?
drivers/staging/wfx/sta.c:1234:6: warning: symbol 'wfx_set_tim_work' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/staging/wfx/sta.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 2855d14..d19bab6 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -269,7 +269,7 @@ void wfx_update_filtering(struct wfx_vif *wvif)
 	kfree(bf_tbl);
 }

-void wfx_update_filtering_work(struct work_struct *work)
+static void wfx_update_filtering_work(struct work_struct *work)
 {
 	struct wfx_vif *wvif = container_of(work, struct wfx_vif, update_filtering_work);

@@ -475,7 +475,7 @@ static void wfx_event_report_rssi(struct wfx_vif *wvif, uint8_t raw_rcpi_rssi)
 	ieee80211_cqm_rssi_notify(wvif->vif, cqm_evt, rcpi_rssi, GFP_KERNEL);
 }

-void wfx_event_handler_work(struct work_struct *work)
+static void wfx_event_handler_work(struct work_struct *work)
 {
 	struct wfx_vif *wvif =
 		container_of(work, struct wfx_vif, event_handler_work);
@@ -521,14 +521,14 @@ void wfx_event_handler_work(struct work_struct *work)
 	__wfx_free_event_queue(&list);
 }

-void wfx_bss_loss_work(struct work_struct *work)
+static void wfx_bss_loss_work(struct work_struct *work)
 {
 	struct wfx_vif *wvif = container_of(work, struct wfx_vif, bss_loss_work.work);

 	ieee80211_connection_loss(wvif->vif);
 }

-void wfx_bss_params_work(struct work_struct *work)
+static void wfx_bss_params_work(struct work_struct *work)
 {
 	struct wfx_vif *wvif = container_of(work, struct wfx_vif, bss_params_work);

@@ -539,7 +539,7 @@ void wfx_bss_params_work(struct work_struct *work)
 	mutex_unlock(&wvif->wdev->conf_mutex);
 }

-void wfx_set_beacon_wakeup_period_work(struct work_struct *work)
+static void wfx_set_beacon_wakeup_period_work(struct work_struct *work)
 {
 	struct wfx_vif *wvif = container_of(work, struct wfx_vif, set_beacon_wakeup_period_work);

@@ -732,7 +732,7 @@ static void wfx_do_join(struct wfx_vif *wvif)
 		cfg80211_put_bss(wvif->wdev->hw->wiphy, bss);
 }

-void wfx_unjoin_work(struct work_struct *work)
+static void wfx_unjoin_work(struct work_struct *work)
 {
 	struct wfx_vif *wvif = container_of(work, struct wfx_vif, unjoin_work);

@@ -794,7 +794,7 @@ int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	return 0;
 }

-void wfx_set_cts_work(struct work_struct *work)
+static void wfx_set_cts_work(struct work_struct *work)
 {
 	struct wfx_vif *wvif = container_of(work, struct wfx_vif, set_cts_work);
 	u8 erp_ie[3] = { WLAN_EID_ERP_INFO, 1, 0 };
@@ -1234,7 +1234,7 @@ static int wfx_set_tim_impl(struct wfx_vif *wvif, bool aid0_bit_set)
 	return 0;
 }

-void wfx_set_tim_work(struct work_struct *work)
+static void wfx_set_tim_work(struct work_struct *work)
 {
 	struct wfx_vif *wvif = container_of(work, struct wfx_vif, set_tim_work);

--
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static
  2019-10-09 13:03 ` [PATCH 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static zhengbin
@ 2019-10-09 13:12   ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2019-10-09 13:12 UTC (permalink / raw)
  To: zhengbin; +Cc: devel, gregkh

On Wed, Oct 09, 2019 at 09:03:37PM +0800, zhengbin wrote:
> -int sram_write_dma_safe(struct wfx_dev *wdev, u32 addr, const u8 *buf, size_t len)
> +static int
> +sram_write_dma_safe(struct wfx_dev *wdev, u32 addr, const u8 *buf, size_t len)

Either declaration style is fine, but keep it consistent within the
file.  Here the style should be:

static int sram_write_dma_safe(struct wfx_dev *wdev, u32 addr, const u8 *buf,
			       size_t len)

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-09 13:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 13:03 [PATCH 0/3] staging: wfx: Make some functions static zhengbin
2019-10-09 13:03 ` [PATCH 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static zhengbin
2019-10-09 13:12   ` Dan Carpenter
2019-10-09 13:03 ` [PATCH 2/3] staging: wfx: Make function 'wfx_tx_queue_get' static zhengbin
2019-10-09 13:03 ` [PATCH 3/3] staging: wfx: Make some functions static in sta.c zhengbin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).