* Re: [PATCH v2 0/3] staging: wfx: Make some functions static
2019-10-09 13:50 [PATCH v2 0/3] staging: wfx: Make some functions static zhengbin
@ 2019-10-09 13:47 ` Dan Carpenter
2019-10-09 13:50 ` [PATCH v2 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static zhengbin
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2019-10-09 13:47 UTC (permalink / raw)
To: zhengbin; +Cc: devel, gregkh
Thanks!
regars,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 0/3] staging: wfx: Make some functions static
@ 2019-10-09 13:50 zhengbin
2019-10-09 13:47 ` Dan Carpenter
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: zhengbin @ 2019-10-09 13:50 UTC (permalink / raw)
To: jerome.pouiller, gregkh, dan.carpenter, devel; +Cc: zhengbin13
v1->v2: keep the declaration style consistent within the file
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 | 4 +++-
drivers/staging/wfx/sta.c | 16 ++++++++--------
3 files changed, 14 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] 8+ messages in thread
* [PATCH v2 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static
2019-10-09 13:50 [PATCH v2 0/3] staging: wfx: Make some functions static zhengbin
2019-10-09 13:47 ` Dan Carpenter
@ 2019-10-09 13:50 ` zhengbin
2019-10-09 14:04 ` [PATCH v2 1/3] staging: wfx: Make function 'sram_write_dma_safe','load_firmware_secure' static Jerome Pouiller
2019-10-09 13:50 ` [PATCH v2 2/3] staging: wfx: Make function 'wfx_tx_queue_get' static zhengbin
2019-10-09 13:50 ` [PATCH v2 3/3] staging: wfx: Make some functions static in sta.c zhengbin
3 siblings, 1 reply; 8+ messages in thread
From: zhengbin @ 2019-10-09 13:50 UTC (permalink / raw)
To: jerome.pouiller, gregkh, dan.carpenter, 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..6d82c62 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] 8+ messages in thread
* [PATCH v2 2/3] staging: wfx: Make function 'wfx_tx_queue_get' static
2019-10-09 13:50 [PATCH v2 0/3] staging: wfx: Make some functions static zhengbin
2019-10-09 13:47 ` Dan Carpenter
2019-10-09 13:50 ` [PATCH v2 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static zhengbin
@ 2019-10-09 13:50 ` zhengbin
2019-10-09 14:05 ` Jerome Pouiller
2019-10-09 13:50 ` [PATCH v2 3/3] staging: wfx: Make some functions static in sta.c zhengbin
3 siblings, 1 reply; 8+ messages in thread
From: zhengbin @ 2019-10-09 13:50 UTC (permalink / raw)
To: jerome.pouiller, gregkh, dan.carpenter, 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 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c
index 6f1be4f..c44ffdf 100644
--- a/drivers/staging/wfx/queue.c
+++ b/drivers/staging/wfx/queue.c
@@ -215,7 +215,9 @@ 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] 8+ messages in thread
* [PATCH v2 3/3] staging: wfx: Make some functions static in sta.c
2019-10-09 13:50 [PATCH v2 0/3] staging: wfx: Make some functions static zhengbin
` (2 preceding siblings ...)
2019-10-09 13:50 ` [PATCH v2 2/3] staging: wfx: Make function 'wfx_tx_queue_get' static zhengbin
@ 2019-10-09 13:50 ` zhengbin
2019-10-09 14:05 ` Jerome Pouiller
3 siblings, 1 reply; 8+ messages in thread
From: zhengbin @ 2019-10-09 13:50 UTC (permalink / raw)
To: jerome.pouiller, gregkh, dan.carpenter, 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] 8+ messages in thread
* Re: [PATCH v2 1/3] staging: wfx: Make function 'sram_write_dma_safe','load_firmware_secure' static
2019-10-09 13:50 ` [PATCH v2 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static zhengbin
@ 2019-10-09 14:04 ` Jerome Pouiller
0 siblings, 0 replies; 8+ messages in thread
From: Jerome Pouiller @ 2019-10-09 14:04 UTC (permalink / raw)
To: zhengbin; +Cc: devel, gregkh, dan.carpenter
On Wednesday 9 October 2019 15:43:31 CEST zhengbin wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
> 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..6d82c62 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
>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
--
Jérôme Pouiller
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/3] staging: wfx: Make function 'wfx_tx_queue_get' static
2019-10-09 13:50 ` [PATCH v2 2/3] staging: wfx: Make function 'wfx_tx_queue_get' static zhengbin
@ 2019-10-09 14:05 ` Jerome Pouiller
0 siblings, 0 replies; 8+ messages in thread
From: Jerome Pouiller @ 2019-10-09 14:05 UTC (permalink / raw)
To: zhengbin; +Cc: devel, gregkh, dan.carpenter
On Wednesday 9 October 2019 15:43:35 CEST zhengbin wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
> 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 | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c
> index 6f1be4f..c44ffdf 100644
> --- a/drivers/staging/wfx/queue.c
> +++ b/drivers/staging/wfx/queue.c
> @@ -215,7 +215,9 @@ 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
>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
--
Jérôme Pouiller
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/3] staging: wfx: Make some functions static in sta.c
2019-10-09 13:50 ` [PATCH v2 3/3] staging: wfx: Make some functions static in sta.c zhengbin
@ 2019-10-09 14:05 ` Jerome Pouiller
0 siblings, 0 replies; 8+ messages in thread
From: Jerome Pouiller @ 2019-10-09 14:05 UTC (permalink / raw)
To: zhengbin; +Cc: devel, gregkh, dan.carpenter
On Wednesday 9 October 2019 15:43:35 CEST zhengbin wrote:
> 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
>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
--
Jérôme Pouiller
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-10-09 14:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 13:50 [PATCH v2 0/3] staging: wfx: Make some functions static zhengbin
2019-10-09 13:47 ` Dan Carpenter
2019-10-09 13:50 ` [PATCH v2 1/3] staging: wfx: Make function 'sram_write_dma_safe', 'load_firmware_secure' static zhengbin
2019-10-09 14:04 ` [PATCH v2 1/3] staging: wfx: Make function 'sram_write_dma_safe','load_firmware_secure' static Jerome Pouiller
2019-10-09 13:50 ` [PATCH v2 2/3] staging: wfx: Make function 'wfx_tx_queue_get' static zhengbin
2019-10-09 14:05 ` Jerome Pouiller
2019-10-09 13:50 ` [PATCH v2 3/3] staging: wfx: Make some functions static in sta.c zhengbin
2019-10-09 14:05 ` Jerome Pouiller
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).