Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6025229ybn; Sun, 29 Sep 2019 10:42:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAY/nW4MaaDN71qY9N0soWqyIYDqF1JvNNKkSvoD2qPf/EQT/CVO6ozDeAvrz++2c+2hmh X-Received: by 2002:aa7:d816:: with SMTP id v22mr16056734edq.28.1569778950314; Sun, 29 Sep 2019 10:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569778950; cv=none; d=google.com; s=arc-20160816; b=FaXPWbbO5h+c4hnVxeL2+JdVfV0Zma/+TSfwD43bGONQwiBZUFbFsbrbyhgOzrud4b iBsNAR7AoxmXV7NSvctYZRGBDwvGb27k5XTgMvOoNUdgu6pFlW/CUFdiFxJSm6lLi2jj 7D9VpQpWf50rw1GZNahXxKrUqLIhm8VNzKa7B6WCvrCTFQ1/uPGJF/QQrWAWkogCiLT6 GGA6ybff0k+texNBGqRmgbku0mwenzkxRmL4Sqlrml2auyWEiiCDES4yfaHiw2gFcg08 gKoMA//BqQTobFS8IHOqbUfxOW75qIFfpz2dhoJbRlWIaPZ9BUBFudWYaITUPSUz7GT/ rhGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BuXWuD7NkwVM9p+L8ivC7rQWBXJWgm1Tdw6YNMl/XY8=; b=behBaZvmpIK+Td/ffWz5cuNNQrDXXCjDpMJu9LJh3qxb6KgUgAYqahG8VZ8ex9kubC j2ZL49zeKoMxB1X9b++PPfGiC6I+X5eivgrtxJX8jCljr9f4Y5TyAOn8lXRi7xhpuu65 J72J2u74OJpSs2DlNYZE8iFavwRSy5if2am/yfEKCrGSQZz33mMoNDcjoMpVWyse2KXu iOp+wYblHALszRSMcbynJOP8pwhYnJ4g8vFOUD8XWvH0j0NS2NxOtXdDjwpwy71aRogb Vjauro9y3l5ml7AAT7oJQH38Mv+iWXOmpZRifWwjAmu+oMaC3Va+366KzbwUSxIYH1Fo B2YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xRlL51Jn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id si9si6064371ejb.97.2019.09.29.10.42.05; Sun, 29 Sep 2019 10:42:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xRlL51Jn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730503AbfI2RfC (ORCPT + 99 others); Sun, 29 Sep 2019 13:35:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:46946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730463AbfI2Rew (ORCPT ); Sun, 29 Sep 2019 13:34:52 -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 8BCA221906; Sun, 29 Sep 2019 17:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569778491; bh=083q+yZ0ZAmFQlK1Ja7FPWGtT4oivjOlDpFQKWeB3Uw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xRlL51JnvpQ5RbOV+XDAuP3+28I1kZ99pl4Z4RDZBLcfMylvj7W7nRpDNTJKg3b3q 9mecIzQCEHUMIIN/fzVGiID68fyMKXYwXZKRXY7RJ3eF9c8UkpC3DiE6RP/Enmc5Pc RG/1whwZjIy2WQ2AAfWSSQeJqqFjajtElgy3A/Ls= 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.19 13/33] firmware: bcm47xx_nvram: Correct size_t printf format Date: Sun, 29 Sep 2019 13:34:01 -0400 Message-Id: <20190929173424.9361-13-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190929173424.9361-1-sashal@kernel.org> References: <20190929173424.9361-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 d25f080fcb0d8..8698c5dd29d9c 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