From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9B2B1D0B82; Sun, 24 Nov 2024 13:35:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732455312; cv=none; b=R8o7Q95vlXBKRCx899ih3iJJE9IJLvfQAsC17a3f+6wVYVbcjGnOTetEfjBYCCZBjG8+JNPSRp4AQk97mXCGZ/x9jrufsV8ikgWS/IJ7WgNWUwUii9bTtsM5mjuEIF4TGzyrBBFZ2vGT5P0NxAKIRztdy4C7BRlJbdkjLl5/ep4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732455312; c=relaxed/simple; bh=1LHa2pRAMrNOXu0nElPLF4jZa8Jqxsl0Gw0jNzupz0A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NS/rPy1Sps9e1G3Qop1e41LcJlEGNSru9PvsVcYQSpxt+O4FCUPG+QCe4avFsAzNKmDKiqVbTqWC4BiBD74A8xsxIt96uSfzLfgK8itbPqH1Re5qcs4suCojkL510uatM30m9MNWbw4qT5U9883N7ldjH/Vf885COgi8ctmJDPM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nj1xPNu8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nj1xPNu8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CACFCC4CED1; Sun, 24 Nov 2024 13:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732455312; bh=1LHa2pRAMrNOXu0nElPLF4jZa8Jqxsl0Gw0jNzupz0A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nj1xPNu8Z/MbUmrVX+0Ur6b1aFh1A2NVZTX4ndwf7UArDP80zttR3zyEUvNUdOj3L h/O0sJ8dEJrdI1pEUtvADxd1tvwXQJ2H2Rhs+MnSavXL2NtN+TjUY3AIRaID7B4TKj 0jo234Rl38ZsYjwFJrf5AKGO2Taz+sxfkhvK53q2u+ACRkJpbweVsG9KpbtRHnJhoJ LSKAElAd8WKji9ZLBd0lCgOMgYHDctB0EznQi2X30Q/GzXK7q0KGR6PlGkqaW9ajy0 Z8i63ImM90Bq7quPPH1K9O27HFxRM6r95aLD3oRqb70Ewm0EqAOav/ibVJSTZZak5j 7kXd+W5psSN4w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Simon Horman , Geert Uytterhoeven , Daniel Machon , Jakub Kicinski , Sasha Levin , pantelis.antoniou@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 6.12 036/107] net: ethernet: fs_enet: Use %pa to format resource_size_t Date: Sun, 24 Nov 2024 08:28:56 -0500 Message-ID: <20241124133301.3341829-36-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241124133301.3341829-1-sashal@kernel.org> References: <20241124133301.3341829-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.12.1 Content-Transfer-Encoding: 8bit From: Simon Horman [ Upstream commit 45fe45fada261e1e83fce2a07fa22835aec1cf0a ] The correct format string for resource_size_t is %pa which acts on the address of the variable to be formatted [1]. [1] https://elixir.bootlin.com/linux/v6.11.3/source/Documentation/core-api/printk-formats.rst#L229 Introduced by commit 9d9326d3bc0e ("phy: Change mii_bus id field to a string") Flagged by gcc-14 as: drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c: In function 'fs_mii_bitbang_init': drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c:126:46: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=] 126 | snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); | ~^ ~~~~~~~~~ | | | | | resource_size_t {aka long long unsigned int} | unsigned int | %llx No functional change intended. Compile tested only. Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/netdev/711d7f6d-b785-7560-f4dc-c6aad2cce99@linux-m68k.org/ Signed-off-by: Simon Horman Reviewed-by: Daniel Machon Link: https://patch.msgid.link/20241014-net-pa-fmt-v1-2-dcc9afb8858b@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c index 2e210a0035584..249b482e32d3b 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c +++ b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c @@ -123,7 +123,7 @@ static int fs_mii_bitbang_init(struct mii_bus *bus, struct device_node *np) * we get is an int, and the odds of multiple bitbang mdio buses * is low enough that it's not worth going too crazy. */ - snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); + snprintf(bus->id, MII_BUS_ID_SIZE, "%pa", &res.start); data = of_get_property(np, "fsl,mdio-pin", &len); if (!data || len != 4) -- 2.43.0