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: <366c8743-224b-4715-a2ff-399b16996621@redhat.com>
Date: Tue, 29 Apr 2025 11:07:04 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Kory Maincent <kory.maincent@...tlin.com>, Andrew Lunn <andrew@...n.ch>,
 Oleksij Rempel <o.rempel@...gutronix.de>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Jonathan Corbet <corbet@....net>,
 Donald Hunter <donald.hunter@...il.com>, Rob Herring <robh@...nel.org>,
 Andrew Lunn <andrew+netdev@...n.ch>, Simon Horman <horms@...nel.org>,
 Heiner Kallweit <hkallweit1@...il.com>, Russell King
 <linux@...linux.org.uk>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>, netdev@...r.kernel.org,
 linux-doc@...r.kernel.org, Kyle Swenson <kyle.swenson@....tech>,
 Dent Project <dentproject@...uxfoundation.org>, kernel@...gutronix.de,
 Maxime Chevallier <maxime.chevallier@...tlin.com>,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v9 03/13] net: pse-pd: tps23881: Add support for
 PSE events and interrupts

On 4/22/25 4:56 PM, Kory Maincent wrote:
> +/* Convert interrupt events to 0xff to be aligned with the chan
> + * number.
> + */
> +static u8 tps23881_irq_export_chans_helper(u16 reg_val, u8 field_offset)
> +{
> +	u8 val;
> +
> +	val = (reg_val >> (4 + field_offset) & 0xf0) |
> +	      (reg_val >> field_offset & 0x0f);

I'm probably low on coffee but I don't see why the above could not be
replaced with:

	return reg_val >> field_offset;

(given that the return type is u8)

/P


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ