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]
Date:	Wed, 02 Jul 2014 20:34:10 -0700
From:	Joe Perches <joe@...ches.com>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:	davem@...emloft.net,
	Paul M Stillwell Jr <paul.m.stillwell.jr@...el.com>,
	netdev@...r.kernel.org, nhorman@...hat.com, sassmann@...hat.com
Subject: Re: [net-next 03/14] i40e/i40evf: Force a shifted '1' to be unsigned

On Wed, 2014-07-02 at 19:40 -0700, Jeff Kirsher wrote:
> Force a shifted '1' to be unsiged to avoid shifting a signed int

It doesn't make a difference, but it's up to you.

> diff --git a/drivers/net/ethernet/intel/i40e/i40e_hmc.h b/drivers/net/ethernet/intel/i40e/i40e_hmc.h
[]
> @@ -127,7 +127,7 @@ struct i40e_hmc_info {
>  		((((type) == I40E_SD_TYPE_PAGED) ? 0 : 1) <<		\
>  		I40E_PFHMC_SDDATALOW_PMSDTYPE_SHIFT) |			\
>  		(1 << I40E_PFHMC_SDDATALOW_PMSDVALID_SHIFT);		\
> -	val3 = (sd_index) | (1 << I40E_PFHMC_SDCMD_PMSDWR_SHIFT);	\
> +	val3 = (sd_index) | (1u << I40E_PFHMC_SDCMD_PMSDWR_SHIFT);	\
>  	wr32((hw), I40E_PFHMC_SDDATAHIGH, val1);			\
>  	wr32((hw), I40E_PFHMC_SDDATALOW, val2);				\
>  	wr32((hw), I40E_PFHMC_SDCMD, val3);				\


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ