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: <694cf5fe021898c42b286f18fff71625134ed722.camel@intel.com>
Date:   Tue, 7 Jun 2022 14:32:45 +0000
From:   "Pandruvada, Srinivas" <srinivas.pandruvada@...el.com>
To:     "jikos@...nel.org" <jikos@...nel.org>,
        "benjamin.tissoires@...hat.com" <benjamin.tissoires@...hat.com>,
        "liqiong@...china.com" <liqiong@...china.com>,
        "Xu, Even" <even.xu@...el.com>, "Ye, Xiang" <xiang.ye@...el.com>,
        "Pandruvada@...ts.nfsmail.com" <Pandruvada@...ts.nfsmail.com>
CC:     "renyu@...china.com" <renyu@...china.com>,
        "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "yuzhe@...china.com" <yuzhe@...china.com>
Subject: Re: [PATCH 1/2] HID: intel-ish-hid: ipc: use time_before to replace
 "jiffies < a"

On Mon, 2022-06-06 at 21:47 +0800, Li Qiong wrote:
> time_before deals with timer wrapping correctly.
> 
> Signed-off-by: Li Qiong <liqiong@...china.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>

> ---
>  drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-
> ish-hid/ipc/ipc.c
> index 8ccb246b0114..15e14239af82 100644
> --- a/drivers/hid/intel-ish-hid/ipc/ipc.c
> +++ b/drivers/hid/intel-ish-hid/ipc/ipc.c
> @@ -578,7 +578,7 @@ static void _ish_sync_fw_clock(struct
> ishtp_device *dev)
>         static unsigned long    prev_sync;
>         uint64_t        usec;
>  
> -       if (prev_sync && jiffies - prev_sync < 20 * HZ)
> +       if (prev_sync && time_before(jiffies, prev_sync + 20 * HZ))
>                 return;
>  
>         prev_sync = jiffies;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ