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: <20250708190748.GX452973@horms.kernel.org>
Date: Tue, 8 Jul 2025 20:07:48 +0100
From: Simon Horman <horms@...nel.org>
To: Jacek Kowalski <jacek@...ekk.info>
Cc: Tony Nguyen <anthony.l.nguyen@...el.com>,
	Przemek Kitszel <przemyslaw.kitszel@...el.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org
Subject: Re: [PATCH iwl-next v2 2/5] e1000e: drop unnecessary constant casts
 to u16

On Tue, Jul 08, 2025 at 10:17:22AM +0200, Jacek Kowalski wrote:
> Remove unnecessary casts of constant values to u16.
> Let the C type system do it's job.
> 
> Signed-off-by: Jacek Kowalski <Jacek@...ekk.info>
> Suggested-by: Simon Horman <horms@...nel.org>

The nit below not withstanding this looks good to me.

Reviewed-by: Simon Horman <horms@...nel.org>

> ---
>  drivers/net/ethernet/intel/e1000e/ethtool.c | 2 +-
>  drivers/net/ethernet/intel/e1000e/nvm.c     | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c
> index c0bbb12eed2e..5d8c66253779 100644
> --- a/drivers/net/ethernet/intel/e1000e/ethtool.c
> +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c
> @@ -959,7 +959,7 @@ static int e1000_eeprom_test(struct e1000_adapter *adapter, u64 *data)
>  	}
>  
>  	/* If Checksum is not Correct return error else test passed */
> -	if ((checksum != (u16)NVM_SUM) && !(*data))
> +	if ((checksum != NVM_SUM) && !(*data))

Unnecessary inner parentheses here too.

...


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ