FW: [PATCH] Subject: e1000: Use time_after() for time comparison

Keller, Jacob E jacob.e.keller at intel.com
Fri May 30 15:47:26 PDT 2014


This patch is causing Aiaiai to break, due to how it splits the patch out.. Is there some way we could prevent this, so that it would correctly treat the patch? I'm not really sure how or where it's happening yet, hopefully I will have more investigation.

It causes Aiaiai to see an empty patch... Which in turn causes git-am to fail.

Thanks,
Jake

> -----Original Message-----
> From: e1000-patches-bounces at isotope.jf.intel.com [mailto:e1000-
> patches-bounces at isotope.jf.intel.com] On Behalf Of Kirsher, Jeffrey T
> Sent: Friday, May 23, 2014 3:04 AM
> To: e1000-patches at isotope.jf.intel.com
> Subject: [PATCH] Subject: e1000: Use time_after() for time comparison
> 
> From: Manuel Schölling <manuel.schoelling at gmx.de>
> 
> To be future-proof and for better readability the time comparisons are
> modified
> to use time_after() instead of plain, error-prone math.
> 
> Signed-off-by: Manuel Schölling <manuel.schoelling at gmx.de>
> ---
> 
>  drivers/net/ethernet/intel/e1000/e1000_ethtool.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
> b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
> index 341889a..08b207d 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
> @@ -1460,7 +1460,8 @@ static int e1000_run_loopback_test(struct
> e1000_adapter *adapter)
>  			 * enough time to complete the receives, if it's
>  			 * exceeded, break and error off
>  			 */
> -		} while (good_cnt < 64 && jiffies < (time + 20));
> +		} while (good_cnt < 64 && time_after(time + 20, jiffies));
> +
>  		if (good_cnt != 64) {
>  			ret_val = 13; /* ret_val is the same as mis-
> compare */
>  			break;
> 



More information about the aiaiai mailing list