linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: cfg80211: add error code in brcmf_notify_sched_scan_results()
@ 2022-08-29  6:58 Li Qiong
  2022-08-29  7:59 ` Kalle Valo
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Li Qiong @ 2022-08-29  6:58 UTC (permalink / raw)
  To: Arend van Spriel, Franky Lin, Hante Meuleman, Kalle Valo,
	David S . Miller, Eric Dumazet, Jakub Kicinski
  Cc: netdev, linux-kernel, Yu Zhe, Li Qiong

The err code is 0 at the first two "out_err" paths, add error code
'-EINVAL' for these error paths.

Signed-off-by: Li Qiong <liqiong@nfschina.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index db45da33adfd..b965649bb0e4 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -3553,6 +3553,7 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp,
 	WARN_ON(status != BRCMF_PNO_SCAN_COMPLETE);
 	brcmf_dbg(SCAN, "PFN NET FOUND event. count: %d\n", result_count);
 	if (!result_count) {
+		err = -EINVAL;
 		bphy_err(drvr, "FALSE PNO Event. (pfn_count == 0)\n");
 		goto out_err;
 	}
@@ -3560,6 +3561,7 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp,
 	netinfo_start = brcmf_get_netinfo_array(pfn_result);
 	datalen = e->datalen - ((void *)netinfo_start - (void *)pfn_result);
 	if (datalen < result_count * sizeof(*netinfo)) {
+		err = -EINVAL;
 		bphy_err(drvr, "insufficient event data\n");
 		goto out_err;
 	}
-- 
2.11.0


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

* Re: [PATCH] wifi: cfg80211: add error code in brcmf_notify_sched_scan_results()
  2022-08-29  6:58 [PATCH] wifi: cfg80211: add error code in brcmf_notify_sched_scan_results() Li Qiong
@ 2022-08-29  7:59 ` Kalle Valo
  2022-08-29  8:51 ` Arend Van Spriel
  2022-08-29 11:12 ` [PATCH v2] wifi: brcmfmac: " Li Qiong
  2 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2022-08-29  7:59 UTC (permalink / raw)
  To: Li Qiong
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, David S . Miller,
	Eric Dumazet, Jakub Kicinski, netdev, linux-kernel, Yu Zhe,
	linux-wireless

+ linux-wireless

Li Qiong <liqiong@nfschina.com> writes:

> The err code is 0 at the first two "out_err" paths, add error code
> '-EINVAL' for these error paths.
>
> Signed-off-by: Li Qiong <liqiong@nfschina.com>
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++
>  1 file changed, 2 insertions(+)

You need to CC linux-wireless, otherwise patchwork won't see it. Also
the title should be:

wifi: brcmfmac: add error code in brcmf_notify_sched_scan_results()

Please resubmit as v2.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH] wifi: cfg80211: add error code in brcmf_notify_sched_scan_results()
  2022-08-29  6:58 [PATCH] wifi: cfg80211: add error code in brcmf_notify_sched_scan_results() Li Qiong
  2022-08-29  7:59 ` Kalle Valo
@ 2022-08-29  8:51 ` Arend Van Spriel
  2022-08-29 11:31   ` liqiong
  2022-08-29 11:12 ` [PATCH v2] wifi: brcmfmac: " Li Qiong
  2 siblings, 1 reply; 6+ messages in thread
From: Arend Van Spriel @ 2022-08-29  8:51 UTC (permalink / raw)
  To: Li Qiong, Franky Lin, Hante Meuleman, Kalle Valo,
	David S . Miller, Eric Dumazet, Jakub Kicinski
  Cc: netdev, linux-kernel, Yu Zhe

On 8/29/2022 8:58 AM, Li Qiong wrote:
> The err code is 0 at the first two "out_err" paths, add error code
> '-EINVAL' for these error paths.

There is no added value provided in this change. There is an error 
message, but it is otherwise silently ignored as there is no additional 
fault handling required.

Regards,
Arend

> Signed-off-by: Li Qiong <liqiong@nfschina.com>
> ---
>   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++
>   1 file changed, 2 insertions(+)

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

* [PATCH v2] wifi: brcmfmac: add error code in brcmf_notify_sched_scan_results()
  2022-08-29  6:58 [PATCH] wifi: cfg80211: add error code in brcmf_notify_sched_scan_results() Li Qiong
  2022-08-29  7:59 ` Kalle Valo
  2022-08-29  8:51 ` Arend Van Spriel
@ 2022-08-29 11:12 ` Li Qiong
  2022-09-07  7:29   ` Kalle Valo
  2 siblings, 1 reply; 6+ messages in thread
From: Li Qiong @ 2022-08-29 11:12 UTC (permalink / raw)
  To: Arend van Spriel, Franky Lin, Hante Meuleman, Kalle Valo,
	David S . Miller, Eric Dumazet, Jakub Kicinski
  Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
	netdev, linux-kernel, Yu Zhe, Li Qiong

The err code is 0 at the first two "out_err" paths, add error code
'-EINVAL' for these error paths.

Signed-off-by: Li Qiong <liqiong@nfschina.com>
---
v1->v2:
- Modify subject.
- Resend patch and CC to linux-wireless.
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index db45da33adfd..b965649bb0e4 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -3553,6 +3553,7 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp,
 	WARN_ON(status != BRCMF_PNO_SCAN_COMPLETE);
 	brcmf_dbg(SCAN, "PFN NET FOUND event. count: %d\n", result_count);
 	if (!result_count) {
+		err = -EINVAL;
 		bphy_err(drvr, "FALSE PNO Event. (pfn_count == 0)\n");
 		goto out_err;
 	}
@@ -3560,6 +3561,7 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp,
 	netinfo_start = brcmf_get_netinfo_array(pfn_result);
 	datalen = e->datalen - ((void *)netinfo_start - (void *)pfn_result);
 	if (datalen < result_count * sizeof(*netinfo)) {
+		err = -EINVAL;
 		bphy_err(drvr, "insufficient event data\n");
 		goto out_err;
 	}
-- 
2.11.0


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

* Re: [PATCH] wifi: cfg80211: add error code in brcmf_notify_sched_scan_results()
  2022-08-29  8:51 ` Arend Van Spriel
@ 2022-08-29 11:31   ` liqiong
  0 siblings, 0 replies; 6+ messages in thread
From: liqiong @ 2022-08-29 11:31 UTC (permalink / raw)
  To: Arend Van Spriel, Kalle Valo, David S . Miller, Eric Dumazet,
	Jakub Kicinski
  Cc: Franky Lin, Hante Meuleman, netdev, linux-kernel, Yu Zhe



在 2022年08月29日 16:51, Arend Van Spriel 写道:
> On 8/29/2022 8:58 AM, Li Qiong wrote:
>> The err code is 0 at the first two "out_err" paths, add error code
>> '-EINVAL' for these error paths.
>
> There is no added value provided in this change. There is an error message, but it is otherwise silently ignored as there is no additional fault handling required.
It should be better to fix the return code, and It seems that the code has been checked, eg:
if (ifp->drvr->fweh.evt_handler[i]) {
.....
}


>
> Regards,
> Arend
>
>> Signed-off-by: Li Qiong <liqiong@nfschina.com>
>> ---
>>   drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++
>>   1 file changed, 2 insertions(+)


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

* Re: [PATCH v2] wifi: brcmfmac: add error code in brcmf_notify_sched_scan_results()
  2022-08-29 11:12 ` [PATCH v2] wifi: brcmfmac: " Li Qiong
@ 2022-09-07  7:29   ` Kalle Valo
  0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2022-09-07  7:29 UTC (permalink / raw)
  To: Li Qiong
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, David S . Miller,
	Eric Dumazet, Jakub Kicinski, linux-wireless,
	brcm80211-dev-list.pdl, SHA-cyfmac-dev-list, netdev,
	linux-kernel, Yu Zhe, Li Qiong

Li Qiong <liqiong@nfschina.com> wrote:

> The err code is 0 at the first two "out_err" paths, add error code
> '-EINVAL' for these error paths.
> 
> Signed-off-by: Li Qiong <liqiong@nfschina.com>

Arend already commented v1:

https://lore.kernel.org/netdev/a054ffb1-527b-836c-f43e-9f76058cc9ed@gmail.com/

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220829111256.21923-1-liqiong@nfschina.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

end of thread, other threads:[~2022-09-07  7:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29  6:58 [PATCH] wifi: cfg80211: add error code in brcmf_notify_sched_scan_results() Li Qiong
2022-08-29  7:59 ` Kalle Valo
2022-08-29  8:51 ` Arend Van Spriel
2022-08-29 11:31   ` liqiong
2022-08-29 11:12 ` [PATCH v2] wifi: brcmfmac: " Li Qiong
2022-09-07  7:29   ` Kalle Valo

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).