All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] net: phy: ensure that phy IDs are correctly typed
Date: Thu, 19 Dec 2019 22:40:48 +0000	[thread overview]
Message-ID: <20191219224048.GH25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <20191219210100.GQ17475@lunn.ch>

On Thu, Dec 19, 2019 at 10:01:00PM +0100, Andrew Lunn wrote:
> On Thu, Dec 19, 2019 at 10:20:48AM +0000, Russell King wrote:
> > PHY IDs are 32-bit unsigned quantities. Ensure that they are always
> > treated as such, and not passed around as "int"s.
> 
> Hi Russell
> 
> Do we want to fix all cases?
> 
> struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,

There's also the format specifier in phydev_err() - we already have
one instance where we case the u32 to unsigned long in order to get
a consistent type that is large enough to print without any issues.

Revised patch on its way.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

      reply	other threads:[~2019-12-19 22:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 10:20 [PATCH] net: phy: ensure that phy IDs are correctly typed Russell King
2019-12-19 10:24 ` Russell King - ARM Linux admin
2019-12-19 21:01 ` Andrew Lunn
2019-12-19 22:40   ` Russell King - ARM Linux admin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191219224048.GH25745@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.