lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 Jul 2022 15:27:56 +0200
From:   Michael Walle <michael@...le.cc>
To:     Andrew Lunn <andrew@...n.ch>
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

Am 2022-07-12 15:24, schrieb Andrew Lunn:
>> +	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.

See next patches ;) And fw_{type,minor} doesn't contain the REL_MASK.
I chose not to cached that as it just used during this reporting.

-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ