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 0E5ED23AFBC; Sun, 24 Nov 2024 13:52:34 +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=1732456354; cv=none; b=PzLWDqAmzKZKui3Hk6qWZarkVNeFQmLwTpqkkHISQkkKu7BxG8tstPxxktpGBaivDQXftUgEj+GZtM6CI5XVC41byWYsZLqZQLS1MAWPVaNVR0rVX3ZNp6lXtW6ce+uEyazoYwrikfA9dGFx9p5aGRxsYBtiz5bDSc1os8v16dY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732456354; c=relaxed/simple; bh=CGETTyCWoXPdn1YRwd2zWw1iVkn0FqNHobWiAX6+d5c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Isyj+BZd6ziyPwI7YZj3UyJpMlLqbrrfamdijcphwsrWNNlqmW+WudnczS33hC+FIsPEtLCUYySyiXIBIK69Whg/2ndgRPL7xd6mUD43C7HNLkZmb1ukRasS8mb74tjF8fVI7iqE+2w4rYdDDqwgSs+cwAilCNOQWJYQ0IkuHis= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BFUlmUCH; 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="BFUlmUCH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8810EC4CECC; Sun, 24 Nov 2024 13:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732456353; bh=CGETTyCWoXPdn1YRwd2zWw1iVkn0FqNHobWiAX6+d5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BFUlmUCHLJVpcu0+xW5hZ8CeyBYXAw9tgpqSbc2pBFiOuMY4GPEdc5BbGc3UDcEP8 kEUT09rP0XSEe5lGSgIo9PFBa/Lh+8AdnOVBqPzfiMGoSqhPaRjEwX2ZmqOzMGPPGV LC3l8gZ2A39mQzah6VJFwubQZ4iiZJ4DQiHHoLwy8sLhiIlKaYYehmvHTmcWPtGhJG I6cXLxw0vAjtLM92/tJewZuIa4hHWCqTkOXlLZFyNt2dR1srtuokrGOJ5abwKgkrOU RNWVcJaNA60w2PENsQQyWPUOrpsHiWO/i76WDZnuiEVfShmAJlf1+z020j0AMRS3Q0 GQmrxqbpdFQ5w== 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 5.15 07/36] net: fec_mpc52xx_phy: Use %pa to format resource_size_t Date: Sun, 24 Nov 2024 08:51:21 -0500 Message-ID: <20241124135219.3349183-7-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241124135219.3349183-1-sashal@kernel.org> References: <20241124135219.3349183-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.15.173 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 b5497e3083020..7e631e2f710fb 100644 --- a/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c +++ b/drivers/net/ethernet/freescale/fec_mpc52xx_phy.c @@ -92,7 +92,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