RE: [stable request] e1000e: fix compiler warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Luis, Can we get this patch queued to kernel 3.10 and 3.12 too?

-----Original Message-----
From: Luis Henriques [mailto:luis.henriques@xxxxxxxxxxxxx] 
Sent: Monday, February 03, 2014 6:06 AM
To: Brown, Aaron F
Cc: stable@xxxxxxxxxxxxxxx; Pandey, Sunil K; Smith, Kevin B; Ertman, DavidX M; Kirsher, Jeffrey T
Subject: Re: [stable request] e1000e: fix compiler warnings

On Fri, Jan 31, 2014 at 12:59:51AM -0800, Aaron Brown wrote:
> Request to pull upstream commit: 
> 9e6c3b63399dd424d33a34e08b77f2cab0b84cdc
> into the stable from 3.9 onwards.  While the patch is described as a 
> warning, icc considers and treats it as an error making the build 
> break without this patch.

Thanks Aaron, I'm queuing this for the 3.11 kernel.

Cheers,
--
Luis

> This patch is to fix a compiler warning of __bad_udelay due to a value 
> of >999 being passed as a parameter to udelay() in the function 
> e1000e_phy_has_link_generic().  This affects the gcc compiler when it 
> is given a flag of -O3 and the icc compiler.
> 
> This patch is also making the change from mdelay() to msleep() in the 
> same function, since it was determined though code inspection that 
> this function is never called in atomic context.
> 
> Signed-off-by: David Ertman <davidx.m.ertman@xxxxxxxxx>
> Acked-by: Bruce Allan <bruce.w.allan@xxxxxxxxx>
> Tested-by: Aaron Brown <aaron.f.brown@xxxxxxxxx>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>
> ---
>  drivers/net/ethernet/intel/e1000e/phy.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/e1000e/phy.c 
> b/drivers/net/ethernet/intel/e1000e/phy.c
> index da2be59..20e71f4 100644
> --- a/drivers/net/ethernet/intel/e1000e/phy.c
> +++ b/drivers/net/ethernet/intel/e1000e/phy.c
> @@ -1757,19 +1757,23 @@ s32 e1000e_phy_has_link_generic(struct e1000_hw *hw, u32 iterations,
>  		 * it across the board.
>  		 */
>  		ret_val = e1e_rphy(hw, MII_BMSR, &phy_status);
> -		if (ret_val)
> +		if (ret_val) {
>  			/* If the first read fails, another entity may have
>  			 * ownership of the resources, wait and try again to
>  			 * see if they have relinquished the resources yet.
>  			 */
> -			udelay(usec_interval);
> +			if (usec_interval >= 1000)
> +				msleep(usec_interval / 1000);
> +			else
> +				udelay(usec_interval);
> +		}
>  		ret_val = e1e_rphy(hw, MII_BMSR, &phy_status);
>  		if (ret_val)
>  			break;
>  		if (phy_status & BMSR_LSTATUS)
>  			break;
>  		if (usec_interval >= 1000)
> -			mdelay(usec_interval / 1000);
> +			msleep(usec_interval / 1000);
>  		else
>  			udelay(usec_interval);
>  	}
> --
> 1.8.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in 
> the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info 
> at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]