* [PATCH] brcmfmac: treat NULL character in NVRAM as separator
@ 2016-01-31 11:14 Rafał Miłecki
2016-02-06 11:56 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Rafał Miłecki @ 2016-01-31 11:14 UTC (permalink / raw)
To: Kalle Valo, linux-wireless
Cc: Brett Rudley, Arend van Spriel, Franky (Zhenhui) Lin,
Hante Meuleman, brcm80211-dev-list, Rafał Miłecki
Platform NVRAM (stored on a flash partition) has entries separated by a
NULL (\0) char. Our parsing code switches from VALUE state to IDLE
whenever it meets a NULL (\0). When that happens our IDLE handler should
simply consume it and analyze whatever is placed ahead.
This fixes harmless warnings spamming debugging output:
[ 155.165624] brcmfmac: brcmf_nvram_handle_idle warning: ln=1:col=20: ignoring invalid character
[ 155.180806] brcmfmac: brcmf_nvram_handle_idle warning: ln=1:col=44: ignoring invalid character
[ 155.195971] brcmfmac: brcmf_nvram_handle_idle warning: ln=1:col=63: ignoring invalid character
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
index 1365c12..7269056 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
@@ -93,7 +93,7 @@ static enum nvram_parser_state brcmf_nvram_handle_idle(struct nvram_parser *nvp)
c = nvp->data[nvp->pos];
if (c == '\n')
return COMMENT;
- if (is_whitespace(c))
+ if (is_whitespace(c) || c == '\0')
goto proceed;
if (c == '#')
return COMMENT;
--
1.8.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] brcmfmac: treat NULL character in NVRAM as separator
2016-01-31 11:14 [PATCH] brcmfmac: treat NULL character in NVRAM as separator Rafał Miłecki
@ 2016-02-06 11:56 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2016-02-06 11:56 UTC (permalink / raw)
To: Rafał Miłecki
Cc: linux-wireless, Brett Rudley, Arend van Spriel,
Franky (Zhenhui) Lin, Hante Meuleman, brcm80211-dev-list
Rafał Miłecki <zajec5@gmail.com> writes:
> Platform NVRAM (stored on a flash partition) has entries separated by a
> NULL (\0) char. Our parsing code switches from VALUE state to IDLE
> whenever it meets a NULL (\0). When that happens our IDLE handler should
> simply consume it and analyze whatever is placed ahead.
>
> This fixes harmless warnings spamming debugging output:
> [ 155.165624] brcmfmac: brcmf_nvram_handle_idle warning: ln=1:col=20: ignoring invalid character
> [ 155.180806] brcmfmac: brcmf_nvram_handle_idle warning: ln=1:col=44: ignoring invalid character
> [ 155.195971] brcmfmac: brcmf_nvram_handle_idle warning: ln=1:col=63: ignoring invalid character
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Manually applied to wireless-drivers-next.git, thanks.
--
Kalle Valo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-06 11:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-31 11:14 [PATCH] brcmfmac: treat NULL character in NVRAM as separator Rafał Miłecki
2016-02-06 11:56 ` 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).