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: <c7c297de-d19c-4861-af85-b43b15f43d1a@lunn.ch>
Date: Thu, 10 Jul 2025 16:50:12 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: Wei Fang <wei.fang@....com>, shenwei.wang@....com,
	xiaoning.wang@....com, andrew+netdev@...n.ch, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	imx@...ts.linux.dev
Subject: Re: [PATCH net-next 3/3] net: fec: add fec_set_hw_mac_addr() helper
 function

> > -	writel(ndev->dev_addr[3] | (ndev->dev_addr[2] << 8) |
> > -		(ndev->dev_addr[1] << 16) | (ndev->dev_addr[0] << 24),
> > -		fep->hwp + FEC_ADDR_LOW);
> > -	writel((ndev->dev_addr[5] << 16) | (ndev->dev_addr[4] << 24),
> > -		fep->hwp + FEC_ADDR_HIGH);
> > +	fec_set_hw_mac_addr(ndev);
> 
> It's more of a personal preference, but I find this implementation to
> be much more readable than the one based on
> 
>   writel((__force u32)cpu_to_be32(temp_mac[...]), ...);

It also avoids the __force, which is good.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ