From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C96A0E668AB for ; Sun, 24 Nov 2024 13:56:07 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Xx9NQ2sbcz2yF0; Mon, 25 Nov 2024 00:56:06 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2604:1380:45d1:ec00::3" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1732456566; cv=none; b=T1yh17wjom8v9Nna+xbO5Egzq8E6dQwER2rR9gdJrFxGa/nG0ZIv45eejJZ5U6BlJs5Rga33zxgj+wnWgzv4g4n7N/gbadFeJJF3cAhJXdRAxuBavXOTcjtWeQKUM3NUrOQjoHDYzze2ROElfonSjVq27sGhPL0cT7wDWE6XblA2AVVmqymzLkpv8jL4GFAFia+1so7fEtEs7ItIdkXIjzEctdseBlJySgz4UmYpWQYqUugDEDMnwFHcSrrf9eQn9SOwHFeKOfCrwPrrP6xv9OQmm2FT/y+9bMwKD1ML9XjsHAJ7JQA7jMrBI7hjXrDRQAmsc0ODYDI+MlQAv1qwLQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1732456566; c=relaxed/relaxed; bh=ctsLpoVO0HkiQMiEO29DzVJibaXZwkyBtNsvebcaHls=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b/cVMHWb0wRrFoTdDBhozwUjqFAFG5jtnw/3J7Fj/OqUi5Wf/qew5yxA89NT63iZLRdH9LI1xEucmVnJlVcIWQFLpo8CpkxBBpEl8+4CcWojwZySYhWVBHT171IK6H3QYiR6USObUumdMN4SW64NEAXm8NrSLq5ObxVIj+++SYagqQus/NdM47AUslA3bxIJcsVuv18Gxk0qtnCEDTHHqcAYxVeFCQ3dLe6tPVVhN8NYY9A7Pt2jc6a0zdrWLR3uPEUkHjkMGDmz5b/GnJEZjlNV/WINnsmav5WMISmzbwB5AHYAXHdSUbkO2dGuO7G5Mwx61kk+y3wTcy7dxJaDUw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=dPxRmbQe; dkim-atps=neutral; spf=pass (client-ip=2604:1380:45d1:ec00::3; helo=nyc.source.kernel.org; envelope-from=sashal@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=dPxRmbQe; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:45d1:ec00::3; helo=nyc.source.kernel.org; envelope-from=sashal@kernel.org; receiver=lists.ozlabs.org) Received: from nyc.source.kernel.org (nyc.source.kernel.org [IPv6:2604:1380:45d1:ec00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Xx9NP27TNz2xYs for ; Mon, 25 Nov 2024 00:56:05 +1100 (AEDT) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id C0E3DA40D44; Sun, 24 Nov 2024 13:54:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11E04C4CECC; Sun, 24 Nov 2024 13:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732456562; bh=7kJxGYpq5B6gkcecesOBUZjReUx4nZbMinW6ZwXQQO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dPxRmbQeTeXGAvb2v1PMzCrjW8ZMJFYVDJpcKwzmsHSmDEorwfL9VXKNT+m1pFQbs BHNYqjSR0wbG6FhNOxKN6WlM/9yYg0MXKeMNGGQDThckftK3NpaC3odXsIP5beUGjx omCRXRC2zLsyzqPBXg1PmWpt9Frjio0A5Vttq3VTaC2bvm5uu5qr8l9qGwohJXE5tj a6BvZKLbTL4C0hpV39o/tOdiBSzfDZIPBxI3+wXMT35RdYtDNSi2ucIlDWfoSYkQ9o xcxNpM7JDEVmSztUMSW/UZxUytfwfjV4OWRVwBFH3njFJpeUQsRYGSrEIli52hDKAL kvZ9gfDfdLeGw== 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 5.4 06/28] net: ethernet: fs_enet: Use %pa to format resource_size_t Date: Sun, 24 Nov 2024 08:55:06 -0500 Message-ID: <20241124135549.3350700-6-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241124135549.3350700-1-sashal@kernel.org> References: <20241124135549.3350700-1-sashal@kernel.org> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.4.286 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 21de56345503f..f743112730194 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c +++ b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c @@ -126,7 +126,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