[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ys12E0mVdc3rd7it@lunn.ch>
Date: Tue, 12 Jul 2022 15:24:35 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Michael Walle <michael@...le.cc>
Cc: Xu Liang <lxu@...linear.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/4] net: phy: mxl-gpy: cache PHY firmware
version
> + priv->fw_type = FIELD_GET(PHY_FWV_TYPE_MASK, fw_version);
> + priv->fw_minor = FIELD_GET(PHY_FWV_MINOR_MASK, fw_version);
>
> ret = gpy_hwmon_register(phydev);
> if (ret)
> return ret;
>
> + /* Show GPY PHY FW version in dmesg */
> phydev_info(phydev, "Firmware Version: 0x%04X (%s)\n", fw_version,
> (fw_version & PHY_FWV_REL_MASK) ? "release" : "test");
Maybe use fw_type and fw_minor. It makes the patch a bit bigger, but
makes the code more consistent.
Andrew
Powered by blists - more mailing lists