From patchwork Mon May 13 21:52:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10941801 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8375D933 for ; Mon, 13 May 2019 21:53:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 718352843B for ; Mon, 13 May 2019 21:53:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65900284CE; Mon, 13 May 2019 21:53:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 144032843B for ; Mon, 13 May 2019 21:53:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726454AbfEMVxX (ORCPT ); Mon, 13 May 2019 17:53:23 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:43136 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726339AbfEMVxX (ORCPT ); Mon, 13 May 2019 17:53:23 -0400 Received: by mail-pf1-f193.google.com with SMTP id c6so7899019pfa.10; Mon, 13 May 2019 14:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=X/D9Rbuw++npzUD5iZbLDGr4TpmDR63qCN78PuJyDwk=; b=p+9KUnOJUmGKNIyHHVYFV1ZnbwVq32m5jBtFAzpTzPYiZqrFgqUeM9ZUEQQgKXorye SJMxakHFA7DDoGIHoYyJZgr8b7ZgkCLLI4LTG3JTZKprgvmJIH1OQWBKpaXx97K8sDRS Y+v0ql5wHATrL1RUrHp6kXTCac7PHdQ32AkZtTomEfJHtCmVBvqha3sQpZ6xd8BbTlIW eNJq0ZAtxI4oiwNV8OjynHR5m8p4WlrOOgnzh15hcMzFb7fFcOfgJsKv3LUMbSr19VRf E6m3AO1vZrnyOW+MHtYbdGaRBPG9Ta8Oi3DDRmbH8UEwVyhJ7277+loQrdcEmMU5OIt1 vgDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=X/D9Rbuw++npzUD5iZbLDGr4TpmDR63qCN78PuJyDwk=; b=ValQ0l7L1O196y/0fC2CYsqZVT8zVM4UvlfBOFT+tCOCHH0XSytsLg95gg7in4/tBy ruZc3QYzCqzafFg8k1KA9ge12hsIldoMOa8zvU7KWLcRsEfxJs9j5bHNcyc14+h9smId 71rqbnRaeYQvJF2b392kWkgnzB2WrTO/nF6LMoyeo96H4yFx2AKSc7pQUc+qsIlDQHUV 9103/XgoUnxTJdBSms3nZqc97XKBF7utwGEBcwjTN0S5+4RW8N7mWMNlbfmV4W99SAMp ksfKQNcrq+YNDBQQRQ8YlVnZuDrCA9D2y8oapWfYrtj7FBf09kM0qSHSuqpA/TyZsF2q VCow== X-Gm-Message-State: APjAAAU6d06v/43dEm1XQVB7/G5wjd2n2I9NiptQ3MpkTiqkrMhUtQn8 m2LKyE514++miAh+TCRXzsk= X-Google-Smtp-Source: APXvYqz8m3jfMp/dFmAdKmHIQzo4hRk7Uxsp/wYoo1miaTqn7ufJaZnYfReFruWv2IlAzV7HCK+apQ== X-Received: by 2002:a63:58b:: with SMTP id 133mr34620626pgf.138.1557784402650; Mon, 13 May 2019 14:53:22 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id h11sm13761369pfn.170.2019.05.13.14.53.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 14:53:21 -0700 (PDT) From: Florian Fainelli To: linux-mips@linux-mips.org Cc: Florian Fainelli , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , linux-mips@vger.kernel.org (open list:BROADCOM NVRAM DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] firmware: bcm47xx_nvram: Correct size_t printf format Date: Mon, 13 May 2019 14:52:49 -0700 Message-Id: <20190513215250.19246-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When building on a 64-bit host, we will get warnings like those: drivers/firmware/broadcom/bcm47xx_nvram.c:103:3: note: in expansion of macro 'pr_err' pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", ^~~~~~ drivers/firmware/broadcom/bcm47xx_nvram.c:103:28: note: format string is defined here pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", ~^ %li Use %zi instead for that purpose. Signed-off-by: Florian Fainelli --- drivers/firmware/broadcom/bcm47xx_nvram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/broadcom/bcm47xx_nvram.c b/drivers/firmware/broadcom/bcm47xx_nvram.c index d25f080fcb0d..2d38ebbcf749 100644 --- a/drivers/firmware/broadcom/bcm47xx_nvram.c +++ b/drivers/firmware/broadcom/bcm47xx_nvram.c @@ -100,7 +100,7 @@ static int nvram_find_and_copy(void __iomem *iobase, u32 lim) nvram_len = size; } if (nvram_len >= NVRAM_SPACE) { - pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", + pr_err("nvram on flash (%zi bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", nvram_len, NVRAM_SPACE - 1); nvram_len = NVRAM_SPACE - 1; } @@ -152,7 +152,7 @@ static int nvram_init(void) header.len > sizeof(header)) { nvram_len = header.len; if (nvram_len >= NVRAM_SPACE) { - pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", + pr_err("nvram on flash (%zi bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", header.len, NVRAM_SPACE); nvram_len = NVRAM_SPACE - 1; } From patchwork Mon May 13 21:52:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10941803 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 508A3933 for ; Mon, 13 May 2019 21:53:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4219A28488 for ; Mon, 13 May 2019 21:53:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35942284D2; Mon, 13 May 2019 21:53:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E13F628488 for ; Mon, 13 May 2019 21:53:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726621AbfEMVxZ (ORCPT ); Mon, 13 May 2019 17:53:25 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44142 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726339AbfEMVxZ (ORCPT ); Mon, 13 May 2019 17:53:25 -0400 Received: by mail-pg1-f194.google.com with SMTP id z16so7435674pgv.11; Mon, 13 May 2019 14:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Af+6okQBbBqI283SlkSp5KD4CPy+AkHPzwyEcYQ+9Mg=; b=O8I4XgVOCq74r1feptf9zgrHpt+U2iBYWs7/dKmUqEO2eqiOnOXtCBz3KC2sAI9Ofg 4AZnd1Yk9AZNzgyR3VeDDvu8v2JoVVFB/dhQdMWGdcVk7gm+gs5OuVO21mon5ULj33Bv 6Cvx5mt45jq1Tlc7oJuSd/ZiIbqZTn+lQ1amW5YtrZmIECmeEHT+9fLtWrw2UR7tET9w mxT9sjR5o/bJmE/ghiyCVdzcq/XK7QGZtDZemzhOmczjy50wUFP0KKmnrZr+blMafYKc ZcsUEzfZiWsaTqaY7e002vRgdV6JAMUQTHTe6oZIbPZiFunn6fXPVKCYvMk/82rRG3xj JP6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Af+6okQBbBqI283SlkSp5KD4CPy+AkHPzwyEcYQ+9Mg=; b=IuxbEF3+sun1gW65gLAxfXHzMo+1xeqv7XcUJ9cwO/4ugqNNtmlDuwBymWAxMZprDu lv0QXfAiQSJdLyebUplxUi0pVk5jTgKpL895NUYveNeBLLsq533GCV2oMhpMX8OED6/g 00NGG0zUvthtqt5zieHQr3GLFlpq18zExrAjuVb0NBSKaVtSqy6lX5leNCr5aIgXKW6l ZoSwae8v2aKRuhIuN9n1MMsV+b9IfjGWlYP8adfdfwEbmRoQRYKeDpMubZa674wlbfyd FjEqbZadMvbCbCTxpu6AhdsErajde3UQ2oCS961IxUTfFuuwJbimSfPUdUV+Bjq57BfI kRtw== X-Gm-Message-State: APjAAAVSOSDi8NnT5zYkwp5M/RCucXCQvCinuL9GAGN+OZUoRuYFk+kD Ij6V/oDUnw/NJaguL+4nHKo= X-Google-Smtp-Source: APXvYqxQfC7rxTwzqnurcGJCKorLWeHY83pWqcRsPzAnMoDQiajt5AJ/SVJ9Hn1lxg1NpzzxhtNboQ== X-Received: by 2002:a63:6a41:: with SMTP id f62mr34252054pgc.392.1557784404434; Mon, 13 May 2019 14:53:24 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id h11sm13761369pfn.170.2019.05.13.14.53.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 14:53:23 -0700 (PDT) From: Florian Fainelli To: linux-mips@linux-mips.org Cc: Florian Fainelli , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , linux-mips@vger.kernel.org (open list:BROADCOM NVRAM DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] firmware: bcm47xx_nvram: Allow COMPILE_TEST Date: Mon, 13 May 2019 14:52:50 -0700 Message-Id: <20190513215250.19246-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190513215250.19246-1-f.fainelli@gmail.com> References: <20190513215250.19246-1-f.fainelli@gmail.com> Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allow building building the BCM47xx NVRAM and SPROM drivers using COMPILE_TEST. Signed-off-by: Florian Fainelli --- drivers/firmware/broadcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/broadcom/Kconfig b/drivers/firmware/broadcom/Kconfig index f77cdb3a041f..c041dcb7ea52 100644 --- a/drivers/firmware/broadcom/Kconfig +++ b/drivers/firmware/broadcom/Kconfig @@ -1,6 +1,6 @@ config BCM47XX_NVRAM bool "Broadcom NVRAM driver" - depends on BCM47XX || ARCH_BCM_5301X + depends on BCM47XX || ARCH_BCM_5301X || COMPILE_TEST help Broadcom home routers contain flash partition called "nvram" with all important hardware configuration as well as some minor user setup.