From patchwork Sun Jan 31 11:14:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 8173681 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 14C48BEEE5 for ; Sun, 31 Jan 2016 11:14:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 37FD8202FE for ; Sun, 31 Jan 2016 11:14:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 599CE202F0 for ; Sun, 31 Jan 2016 11:14:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757292AbcAaLOs (ORCPT ); Sun, 31 Jan 2016 06:14:48 -0500 Received: from mail-lf0-f42.google.com ([209.85.215.42]:33295 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757205AbcAaLOr (ORCPT ); Sun, 31 Jan 2016 06:14:47 -0500 Received: by mail-lf0-f42.google.com with SMTP id m1so5061114lfg.0 for ; Sun, 31 Jan 2016 03:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=NIXbnHcqjZXoOpC5uVXMKtbf71twbGLp8RmIIdMd/mY=; b=mSMByy+mlXLxWbpJb58hb6IKw/u5pjMLzcnwXbDOXQLtqbhT2KNj2TgE48L4TXwlaD RQ2JEpZGlAH09DumzXkmtzxalmquI0yA/nGzjhOoBMmP6j350gf6rod2PZ+GWT1Ajue1 Z4dwgwVQUdmGQy29FI83+Q62eBZQFNP6qR6iqsOpKDKJT2PJvkyP/4y7a5rRgpWs3/4m X1iocZ2WP7qs+67Fmgx/akzFnj5g1hetN3YFwxGLsjQN7B1290+lGoDuZRdvH2BFnN48 tkqoK2N2GetVqKhFFCNIMzTHr/RP5w+mH5pjf03QvNpsEVnxI0UuaQUHDbHTy5J3HYG0 BQEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=NIXbnHcqjZXoOpC5uVXMKtbf71twbGLp8RmIIdMd/mY=; b=N1Kn7eTho9/iqrk61YGAAgq7Q+hKyaCr0ciQWEyhS89dBXvJjMYstCgQFCwVXVZfQS ZesRG6xbi+zpkEUrRdcTXt+eymUBvZLo9hwslGOrqk2QRGNv2Oxz4UU7Y1yKwOnupNz8 QWmbfCR0JnCLPVt5QgVRzf0JFpzt2P15Q0WizoFKr8IjUGUIdnvpWeLLSWJMMecGGp6C oBaDzJPSE7/kwg685oB7Gb4Dv15TktR5x6AFzYaWglaHZk5FImolHlsosMDe5A2q9Ws+ PIyDFbZPSrMhj9Va5NkFnsO0z4vulLr6ma9BS84biAibjhdaoxNMFZQxA3pazEDYHHyq ESMA== X-Gm-Message-State: AG10YOQCe7L0xNzk814AMDjonKpBFU+tf1VfoDLi5PaBtLV4Dahjj8ppUOO+eiy9EBc4fA== X-Received: by 10.25.149.145 with SMTP id x139mr475269lfd.141.1454238886229; Sun, 31 Jan 2016 03:14:46 -0800 (PST) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id eb3sm3266003lbc.31.2016.01.31.03.14.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Jan 2016 03:14:45 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo , linux-wireless@vger.kernel.org Cc: Brett Rudley , Arend van Spriel , "Franky (Zhenhui) Lin" , Hante Meuleman , brcm80211-dev-list@broadcom.com, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH] brcmfmac: treat NULL character in NVRAM as separator Date: Sun, 31 Jan 2016 12:14:34 +0100 Message-Id: <1454238874-20118-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;