From patchwork Tue May 14 17:38:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10943483 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 284AE912 for ; Tue, 14 May 2019 17:38:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1067828875 for ; Tue, 14 May 2019 17:38:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 042A328880; Tue, 14 May 2019 17:38:23 +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 9F99C28875 for ; Tue, 14 May 2019 17:38:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726229AbfENRiW (ORCPT ); Tue, 14 May 2019 13:38:22 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44295 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726180AbfENRiW (ORCPT ); Tue, 14 May 2019 13:38:22 -0400 Received: by mail-pl1-f194.google.com with SMTP id c5so885286pll.11; Tue, 14 May 2019 10:38:21 -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=yQwlOtBHnK6CRRjE4ab4v9zRwfsos8oSSPSf6ns3DeM=; b=fYamd2nfaPVrWYUlTU2JQo4Hjv80wsUG5q2CIWedan+EMdJUs8r6IroZINOLDxuk4t hUd+rrb1Ggo5A9sXY/vhycaQNaoO4ea/Q7Kr6TKg3Qe8DOwZcxiaSTU8TiuZxZXoKvTm djuup/Bb+CIIhKlnKHjAMoqJweQ7zu3xQNDcOLoGBSUSsbD9MUrKHniw239K4dOOpsPW CgkL7fZ4e2yvAue4fa2pPYBIQ03R8VNGlqj5T8sruSi/4icWRCBTKaYUPy1w3X5ErU/H WNHIC36xyhikn+ZM+yRT2vtYa4SFdW/wpwHXD1tJQriZsiuTnN30YMmu2rYs0fl4s8nP ot7A== 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=yQwlOtBHnK6CRRjE4ab4v9zRwfsos8oSSPSf6ns3DeM=; b=Y7ms9/rOGBK97x7oyD7Xo4a6D9F5CQkf70tFsC/+wRCB5dMpkLqNDvVCRRVJqSXKiK bAtQBJChYGbBEaTGulWd0oXRAnIDrHs/DIqXvQ+zqKnxMsmzjcD0tEPIqb3uO0cKy/nN v6TABkdMR5Jt9GJU/62R1NkyGx8xbWTFq89Fjlr+x5U72kA5IHd0kmzbngdwBPx+75NR qBdxUcTcjmnIRN6fH14qhwQMTjkv4j8eWlTwDQsGeaYFJ4yiYe35KEaOiTy+m/UaSxBa 866txLLHhppjwTdOt+Ja7xFGo0o2TYXl0//6pOs5YKe9kgAmqEL2IEJJOg0xrjhmIqB1 qYxA== X-Gm-Message-State: APjAAAVrrAJB0qo8SvVGU80NY17nM7+Kk48SIEWXEvP7YfO5k/n2eAGP e68Nov1CJoL8TI1CPmwn1YTSOUfM X-Google-Smtp-Source: APXvYqwIkqz2URE7Givd+nsWZchVlcnU3FFpVXxK/+Y/f80GPujaPxXDenUc3ZH3hMItbKNhPcLPTQ== X-Received: by 2002:a17:902:4624:: with SMTP id o33mr21139240pld.268.1557855501351; Tue, 14 May 2019 10:38:21 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id a80sm46115717pfj.105.2019.05.14.10.38.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 May 2019 10:38:20 -0700 (PDT) From: Florian Fainelli To: linux-mips@linux-mips.org Cc: joe@perches.com, Florian Fainelli , =?utf-8?b?UmFm?= =?utf-8?b?YcWCIE1pxYJlY2tp?= , linux-mips@vger.kernel.org (open list:BROADCOM NVRAM DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 1/2] firmware: bcm47xx_nvram: Correct size_t printf format Date: Tue, 14 May 2019 10:38:14 -0700 Message-Id: <20190514173816.17030-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 %zu instead for that purpose. Signed-off-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé --- Changes in v2: - Use %zu instead of %zi (Joe Perches) 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..8698c5dd29d9 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 (%zu 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 (%zu 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 Tue May 14 17:38:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10943485 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 68F6E912 for ; Tue, 14 May 2019 17:38:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53C422887B for ; Tue, 14 May 2019 17:38:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4850928882; Tue, 14 May 2019 17:38:30 +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 E98BD2887B for ; Tue, 14 May 2019 17:38:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726933AbfENRiY (ORCPT ); Tue, 14 May 2019 13:38:24 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:39213 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726180AbfENRiX (ORCPT ); Tue, 14 May 2019 13:38:23 -0400 Received: by mail-pf1-f194.google.com with SMTP id z26so9506765pfg.6; Tue, 14 May 2019 10:38: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:in-reply-to:references; bh=Af+6okQBbBqI283SlkSp5KD4CPy+AkHPzwyEcYQ+9Mg=; b=jJNIwt+ZFeGtfVTmguA4D9aqTzf2cxOJrbHR0IEggfMsNQeVWgXzt0abGeCQMlYhXQ w/o57RsBIDGHNpK7XVdc76kBsShQnwYTF4ID20XulNLJreRlzfOE1pxW0vU8I81Q84Yr 15d7mELFQrG8HcTmlOhLkifOf308+DOm0dZnzwb78easI3YE12cFxb/GXix29ArQqpTf UROmvsACUMWLe3ciAbFTBWgA0Tm0GzN4kUprUHg7D2GOW3q7riXsy+BtBMAH9yL2iMBS y/AKAKvestQ0aQKuyAQK640mEQOTpsRqEPRCsU3EgRtbmCPUUxDLoLEEvLXi1dtucLz/ HVvA== 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=sns3i0u+qd9FMlLnMdZ7xU91Q8ayTbMsJHGhHbkeaIFtBBQ39f8H5okk3Lt7Is9j6a 7Zk+5qGQJP/hccX5hlQLbZTq8Z6MPy7MTWw+ZzVl+FxFo7F2UTZr8Iabr1e0hEi70RZH K/pQRWyPX5CnRV5aXR+3q5ngchHE17MJt1yhfcWqWQOZRYwBGcY0B27STcWUF8CAjzt6 KHohR2ZXtjyahlG10dGRZJliPFLuy4DkTUbUbe3qZkIjvQ7cNEyd4om60gHqI8IVLPy+ kZsPQ/07JCcPuLM3igMNKguoCbLon5EsFkXp7Df2t3zNUNG9OJKEak832Tae7i9FPNm2 I/GA== X-Gm-Message-State: APjAAAWv7o9fyTBQH/jsFjT9a7xItIKQHJsEWv7kX9bDu46xYTqM54v5 fa/e0lvkV6WDAa4G/boZqAD7I186 X-Google-Smtp-Source: APXvYqxtzuJ/roniTZP8I35oCojKxTGjqb7Bgg8WaAksJkq4A/NsQRQxmTmYmK0fMX9yNVdwFAzOJQ== X-Received: by 2002:aa7:9242:: with SMTP id 2mr42788012pfp.230.1557855502904; Tue, 14 May 2019 10:38:22 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id a80sm46115717pfj.105.2019.05.14.10.38.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 May 2019 10:38:22 -0700 (PDT) From: Florian Fainelli To: linux-mips@linux-mips.org Cc: joe@perches.com, Florian Fainelli , =?utf-8?b?UmFm?= =?utf-8?b?YcWCIE1pxYJlY2tp?= , linux-mips@vger.kernel.org (open list:BROADCOM NVRAM DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 2/2] firmware: bcm47xx_nvram: Allow COMPILE_TEST Date: Tue, 14 May 2019 10:38:15 -0700 Message-Id: <20190514173816.17030-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190514173816.17030-1-f.fainelli@gmail.com> References: <20190514173816.17030-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.