Patch "net: fec_mpc52xx_phy: Use %pa to format resource_size_t" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: fec_mpc52xx_phy: Use %pa to format resource_size_t

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-fec_mpc52xx_phy-use-pa-to-format-resource_size_t.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e7fe3fef582d1ff5e1506763c85a6ad8115153a2
Author: Simon Horman <horms@xxxxxxxxxx>
Date:   Mon Oct 14 11:48:07 2024 +0100

    net: fec_mpc52xx_phy: Use %pa to format resource_size_t
    
    [ 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 <geert@xxxxxxxxxxxxxx>
    Closes: https://lore.kernel.org/netdev/711d7f6d-b785-7560-f4dc-c6aad2cce99@xxxxxxxxxxxxxx/
    Signed-off-by: Simon Horman <horms@xxxxxxxxxx>
    Reviewed-by: Daniel Machon <daniel.machon@xxxxxxxxxxxxx>
    Link: https://patch.msgid.link/20241014-net-pa-fmt-v1-1-dcc9afb8858b@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux