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: <cf92b303-33c0-4e53-9406-0a9d33d05e21@lunn.ch>
Date: Wed, 22 Oct 2025 04:36:56 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Daniel Golle <daniel@...rotopia.org>
Cc: Hauke Mehrtens <hauke@...ke-m.de>, Vladimir Oltean <olteanv@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Andreas Schirm <andreas.schirm@...mens.com>,
	Lukas Stockmann <lukas.stockmann@...mens.com>,
	Alexander Sverdlin <alexander.sverdlin@...mens.com>,
	Peter Christen <peter.christen@...mens.com>,
	Avinash Jayaraman <ajayaraman@...linear.com>,
	Bing tao Xu <bxu@...linear.com>, Liang Xu <lxu@...linear.com>,
	Juraj Povazanec <jpovazanec@...linear.com>,
	"Fanni (Fang-Yi) Chan" <fchan@...linear.com>,
	"Benny (Ying-Tsan) Weng" <yweng@...linear.com>,
	"Livia M. Rosu" <lrosu@...linear.com>,
	John Crispin <john@...ozen.org>
Subject: Re: [PATCH net-next v3 5/7] net: dsa: lantiq_gswip: replace *_mask()
 functions with regmap API

On Sun, Oct 19, 2025 at 01:48:43PM +0100, Daniel Golle wrote:
> Use coccinelle to replace all uses of *_mask() with an equivalent call
> to regmap_write_bits().
> 
> // Replace gswip_switch_mask with regmap_write_bits
> @@
> expression priv, clear, set, offset;
> @@
> - gswip_switch_mask(priv, clear, set, offset)
> + regmap_write_bits(priv->gswip, offset, clear | set, set)
> 
> // Replace gswip_mdio_mask with regmap_write_bits
> @@
> expression priv, clear, set, offset;
> @@
> - gswip_mdio_mask(priv, clear, set, offset)
> + regmap_write_bits(priv->mdio, offset, clear | set, set)
> 
> // Replace gswip_mii_mask with regmap_write_bits
> @@
> expression priv, clear, set, offset;
> @@
> - gswip_mii_mask(priv, clear, set, offset)
> + regmap_write_bits(priv->mii, offset, clear | set, set)
> 
> Remove the new unused *_mask() functions.
> This naive approach will be further optmized manually in the next commit.
> 
> Signed-off-by: Daniel Golle <daniel@...rotopia.org>

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ