lkml.org 
[lkml]   [2021]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] phy: ralink: phy-mt7621-pci: properly print pointer address
    Date
    The way of printing the pointer address for the 'port_base'
    address got into compile warnings on some architectures
    [-Wpointer-to-int-cast]. Instead of use '%08x' and cast
    to an 'unsigned int' just make use of '%px' and avoid the
    cast.

    Fixes: d87da32372a0 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY")
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
    ---
    drivers/phy/ralink/phy-mt7621-pci.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/phy/ralink/phy-mt7621-pci.c b/drivers/phy/ralink/phy-mt7621-pci.c
    index 753cb5bab930..4705931fb072 100644
    --- a/drivers/phy/ralink/phy-mt7621-pci.c
    +++ b/drivers/phy/ralink/phy-mt7621-pci.c
    @@ -272,8 +272,8 @@ static struct phy *mt7621_pcie_phy_of_xlate(struct device *dev,

    mt7621_phy->has_dual_port = args->args[0];

    - dev_info(dev, "PHY for 0x%08x (dual port = %d)\n",
    - (unsigned int)mt7621_phy->port_base, mt7621_phy->has_dual_port);
    + dev_info(dev, "PHY for 0x%px (dual port = %d)\n",
    + mt7621_phy->port_base, mt7621_phy->has_dual_port);

    return mt7621_phy->phy;
    }
    --
    2.25.1
    \
     
     \ /
      Last update: 2021-05-07 08:02    [W:3.233 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site