Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1637734
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison |
| Date | 2017-05-08 23:30 +0200 |
| Message-ID | <tEYoa-Pg-9@gated-at.bofh.it> (permalink) |
| References | <tEUaS-6rk-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Karim Eshapa <karim.eshapa@gmail.com>
Date: Mon, 8 May 2017 18:58:02 +0200
> diff --git a/drivers/net/wimax/i2400m/i2400m-usb.h b/drivers/net/wimax/i2400m/i2400m-usb.h
> index 649ecad..6fc941c 100644
> --- a/drivers/net/wimax/i2400m/i2400m-usb.h
> +++ b/drivers/net/wimax/i2400m/i2400m-usb.h
> @@ -131,7 +131,7 @@ static inline int edc_inc(struct edc *edc, u16 max_err, u16 timeframe)
> unsigned long now;
>
> now = jiffies;
> - if (now - edc->timestart > timeframe) {
> + if (time_after(now - edc->timestart, (unsigned long)timeframe)) {
This is far from correct.
time_after() compares two "jiffies" timestamp values. The second
argument here is not a jiffies timestamp value.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison Karim Eshapa <karim.eshapa@gmail.com> - 2017-05-08 19:00 +0200
Re: [PATCH] drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison David Miller <davem@davemloft.net> - 2017-05-08 23:30 +0200
Re: [PATCH] drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison Girish Moodalbail <girish.moodalbail@oracle.com> - 2017-05-09 01:30 +0200
RE: [PATCH] drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison Karim Eshapa <karim.eshapa@gmail.com> - 2017-05-09 02:10 +0200
Re: [PATCH] drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison David Miller <davem@davemloft.net> - 2017-05-09 15:50 +0200
csiph-web