[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200501183703.GS1551@shell.armlinux.org.uk>
Date: Fri, 1 May 2020 19:37:03 +0100
From: Russell King - ARM Linux admin <linux@...linux.org.uk>
To: Walter Harms <wharms@....de>
Cc: Colin King <colin.king@...onical.com>,
Vladimir Oltean <olteanv@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S . Miller" <davem@...emloft.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: dsa: sja1105: fix speed setting for 10 MBPS
On Fri, May 01, 2020 at 06:00:52PM +0000, Walter Harms wrote:
> IMHO it would be better to use switch case here to improve readability.
>
> switch (bmcr & mask) {
>
> case BMCR_SPEED1000:
> speed = SPEED_1000;
> break;
> case BMCR_SPEED100:
> speed = SPEED_100;
> break;
> case BMCR_SPEED10:
> speed = SPEED_10;
> break;
> default:
> speed = SPEED_UNKNOWN
> }
>
> jm2c,
> wh
>
> btw: an_enabled ? why not !enabled, mich more easy to read
You misinterpret "an_enabled". It's not "negated enabled". It's not
even "disabled". It's short for "autonegotiation enabled". It's
positive logic too.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up
Powered by blists - more mailing lists