From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F524C4360C for ; Sun, 29 Sep 2019 17:36:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7A7E021925 for ; Sun, 29 Sep 2019 17:36:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569778562; bh=lEC7SU1gCm84VqYepEtvzNcy7DIGdmzDSTI2ZQ9SbzI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ytEmSXzdRCNev7pXT83HB0nw40HL6PoSduIDNLaz9bcuIgnltJuRYAp6b2XSACfth s8s95LgNK5osTcTIRki+Ts9PzDjgj1aweItcPJ79l8yAsLqWGOibvFxo9Qm7+wLjhm z9cojyK8OQJ0YVqj9VNN1jLv3AQk7Gc6UuwMrPpQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730719AbfI2RgB (ORCPT ); Sun, 29 Sep 2019 13:36:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:48238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730693AbfI2Rf5 (ORCPT ); Sun, 29 Sep 2019 13:35:57 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 49F1621D7C; Sun, 29 Sep 2019 17:35:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569778557; bh=lEC7SU1gCm84VqYepEtvzNcy7DIGdmzDSTI2ZQ9SbzI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XRJDGig/EmARqdajswNJrGI+46wESXgPdCn/hUUTEmi6Ty5kQsVbKXX3cDMlJfLb9 uUek1P9A2CczaHyonZ6Y2KIZW+cpLelJ9L2/yanY/NHzPlI2iadwb+1ypkwLXzUg2U abGn9XYRS13xSTyPqc1upi/AQkBU7mnKQb3gViBs= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Florian Fainelli , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Burton , linux-mips@linux-mips.org, joe@perches.com, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , linux-mips@vger.kernel.org, Sasha Levin Subject: [PATCH AUTOSEL 4.14 10/23] firmware: bcm47xx_nvram: Correct size_t printf format Date: Sun, 29 Sep 2019 13:35:20 -0400 Message-Id: <20190929173535.9744-10-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190929173535.9744-1-sashal@kernel.org> References: <20190929173535.9744-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Fainelli [ Upstream commit feb4eb060c3aecc3c5076bebe699cd09f1133c41 ] 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é Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: joe@perches.com Cc: Rafał Miłecki Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Sasha Levin --- 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 0b631e5b5b843..8632b952d77c5 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; } -- 2.20.1