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]
Message-ID: <707b4ebc-c1ce-48a3-93c0-cebff9feef37@lunn.ch>
Date: Mon, 30 Sep 2024 17:14:09 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Shenghao Yang <me@...nghaoyang.info>
Cc: netdev@...r.kernel.org, f.fainelli@...il.com, olteanv@...il.com,
	pavana.sharma@...i.com, ashkan.boldaji@...i.com, kabel@...nel.org
Subject: Re: [PATCH net 1/3] net: dsa: mv88e6xxx: group cycle counter
 coefficients

> -#define MV88E6250_CC_SHIFT	28
> -#define MV88E6250_CC_MULT	(10 << MV88E6250_CC_SHIFT)
> -#define MV88E6250_CC_MULT_NUM	(1 << 7)
> -#define MV88E6250_CC_MULT_DEM	3125ULL
> +const struct mv88e6xxx_cc_coeffs mv88e6250_cc_coeffs = {
> +	.cc_shift = 28,
> +	.cc_mult = 10 << 28,

This is slightly less readable, you loose that the 28 is the same as
cc_shift. I would suggest you keep the MV88E6250_CC_SHIFT and use it
for these two lines. Please do the same for other instances of this
structure.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ