Re: [RFC 02/11] net: phy: Simplify MMD device list termination

2020-05-25 Thread Russell King - ARM Linux admin
On Sun, May 24, 2020 at 09:48:55PM -0500, Jeremy Linton wrote: > Hi, > > On 5/23/20 1:36 PM, Russell King - ARM Linux admin wrote: > > On Fri, May 22, 2020 at 04:30:50PM -0500, Jeremy Linton wrote: > > > Since we are already checking for *devs == 0 after > > > the loop terminates, we can add a mos

Re: [RFC 02/11] net: phy: Simplify MMD device list termination

2020-05-24 Thread Jeremy Linton
Hi, On 5/23/20 1:36 PM, Russell King - ARM Linux admin wrote: On Fri, May 22, 2020 at 04:30:50PM -0500, Jeremy Linton wrote: Since we are already checking for *devs == 0 after the loop terminates, we can add a mostly F's check as well. With that change we can simplify the return/break sequence

Re: [RFC 02/11] net: phy: Simplify MMD device list termination

2020-05-23 Thread Russell King - ARM Linux admin
On Fri, May 22, 2020 at 04:30:50PM -0500, Jeremy Linton wrote: > Since we are already checking for *devs == 0 after > the loop terminates, we can add a mostly F's check > as well. With that change we can simplify the return/break > sequence inside the loop. > > Add a valid_phy_id() macro for this,

[RFC 02/11] net: phy: Simplify MMD device list termination

2020-05-22 Thread Jeremy Linton
Since we are already checking for *devs == 0 after the loop terminates, we can add a mostly F's check as well. With that change we can simplify the return/break sequence inside the loop. Add a valid_phy_id() macro for this, since we will be using it in a couple other places. Signed-off-by: Jeremy