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] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB85103180D6EA605BCEB2735C884BA@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Fri, 11 Jul 2025 01:28:36 +0000
From: Wei Fang <wei.fang@....com>
To: Andrew Lunn <andrew@...n.ch>, Maxime Chevallier
	<maxime.chevallier@...tlin.com>
CC: Shenwei Wang <shenwei.wang@....com>, Clark Wang <xiaoning.wang@....com>,
	"andrew+netdev@...n.ch" <andrew+netdev@...n.ch>, "davem@...emloft.net"
	<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
	"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"imx@...ts.linux.dev" <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.
> 

Thanks, I will improve it.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ