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 25EA8232794; Sun, 24 Nov 2024 13:50:16 +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=1732456216; cv=none; b=S0VAELsoctYOVnwdQZpubgVsOprK3kn1VM8oUaR846LI8Q2LcnzskzWIQmWP+W6RhIfdbLi14xh9f5zBcNnnYA0CNsxhstM1zZE57Amx4QZSGKzCl6L7xiOmCaiOazsTJM8J84vctoqrAOUQI9uFBFre9deeLdzf0EfbCAHfHSs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732456216; c=relaxed/simple; bh=s+zh4uFtItfkEXF5Ul26y91tJ54IZ6q1IwJuQmye4WY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fjk5WTMlB7qelpr56Ellt4f5PJvhfuU1FHDTetZcnqG7HE3D0mujTDwPigGzOc22qJHjPWGPcpKBXnI0o3+19KjmpKgm06FRz9g45BD7NqKpzw2xUw4+nWWRJ+RodauRkrCvcgxZqK3K3GdRwxcjee4ACgVH7e6wkp+fCw0OEC0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=V53xiHFS; 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="V53xiHFS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91C8DC4CECC; Sun, 24 Nov 2024 13:50:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732456216; bh=s+zh4uFtItfkEXF5Ul26y91tJ54IZ6q1IwJuQmye4WY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V53xiHFSBQegxjmvFNYAkQfBtpmwLOd2a49cO+GnKvrIjMjyscKPGwmLn5akpVpBM bfXHRGeIt0aopqLy0/6alHNoPRYspvmLymga5+Sz94V/FP0NtNV7/dyWfrX3w1IAMn 36eeWWyDsjUmQ30O6ZcydHvbXmfLfxCxPHjv62Vz0Wr3drFwjgGPihs/tN+wj3xQ+Q 1pjAyY7Gp0Fb3doIMt+HGH38494Jl/Yx2oGAR1GVIST9I+9ECBAmJzj2Ggs9wvdnr0 O3gAnQvviaP9jPf4+rBFzJu5yOKlEEH/S0iqfLXyy8j38tl1D2e7fSbq4ohMJYwLIC d9zn06tifmciA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Simon Horman , Geert Uytterhoeven , Daniel Machon , Jakub Kicinski , Sasha Levin , andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, u.kleine-koenig@baylibre.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 6.1 12/48] net: fec_mpc52xx_phy: Use %pa to format resource_size_t Date: Sun, 24 Nov 2024 08:48:35 -0500 Message-ID: <20241124134950.3348099-12-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241124134950.3348099-1-sashal@kernel.org> References: <20241124134950.3348099-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.1.119 Content-Transfer-Encoding: 8bit From: Simon Horman [ Upstream commit 020bfdc4ed94be472138c891bde4d14241cf00fd ] 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/fec_mpc52xx_phy.c: In function 'mpc52xx_fec_mdio_probe': drivers/net/ethernet/freescale/fec_mpc52xx_phy.c:97:46: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=] 97 | 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-1-dcc9afb8858b@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/fec_mpc52xx_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c b/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c index 95f778cce98cb..e4911a76f08eb 100644 --- a/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c +++ b/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c @@ -93,7 +93,7 @@ static int mpc52xx_fec_mdio_probe(struct platform_device *of) goto out_free; } - snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); + snprintf(bus->id, MII_BUS_ID_SIZE, "%pa", &res.start); bus->priv = priv; bus->parent = dev; -- 2.43.0