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 9D50A215041; Thu, 12 Dec 2024 17:49:02 +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=1734025742; cv=none; b=q0Cv2lBVioqwxIFO0gfGNiArx18cgp5Sq0AZkYKpeNOQcv5npVeojHte7ybuglurwNonCRQxJVejpKqy3rjZxkCJTbiSocHs4NYaeVYmdSxI5aXsv5ffhy5cG7OEaLGy78Y+3xgNOn+OLy769uQJnJcYLvS/inaDeHCkpsRC85Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734025742; c=relaxed/simple; bh=U2BFt0XyKY5y3f7exKNALlGhGteoEX9+YrjR84xHy+Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hX88kFBs5eKJAak3fc6DMeQghjeEF0Zg4ItgFIM6Nkc75W6hFfZTBMgThB9+fTICHN9i3ow8ePCcq/tkqVvNpRr+DJFQSQB8WPSpzZOszgfAXWIPy4VMIydJ3fQ+fsBekgze2AX7A1pcD+A8hZe9LERU5B7TIjZElb2QxxSWcZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1DF5HMwK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1DF5HMwK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 228E0C4CECE; Thu, 12 Dec 2024 17:49:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1734025742; bh=U2BFt0XyKY5y3f7exKNALlGhGteoEX9+YrjR84xHy+Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1DF5HMwKdoUkbtIIwCCpgrfQjsof3BgbASnccl5ckIgyy1mK2NTq8+OhU1p9cBagQ L4X8fc+chCShkybemD1HSsBQJ/T3FIBk+A58wSNFYE1mbRo5fvpbepBeEdeQY9jHBb r8xkKVPzjVEAhM63Zkk6Khz9OP7FzKXzUQk4fqnE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Geert Uytterhoeven , Simon Horman , Daniel Machon , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.4 271/321] net: fec_mpc52xx_phy: Use %pa to format resource_size_t Date: Thu, 12 Dec 2024 16:03:09 +0100 Message-ID: <20241212144240.685776045@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241212144229.291682835@linuxfoundation.org> References: <20241212144229.291682835@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ 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