Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Aug 2017 07:37:46 -0700
From:      Conrad Meyer <cem@freebsd.org>
To:        Hans Petter Selasky <hselasky@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r321985 - head/sys/ofed/drivers/infiniband/core
Message-ID:  <CAG6CVpVL49nVqRs5atub=d2P39EGOqcNtx_Raa8fWtV=BFZXbw@mail.gmail.com>
In-Reply-To: <201708030918.v739IPVY034866@repo.freebsd.org>
References:  <201708030918.v739IPVY034866@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hey Hans,

Is it not important that the subtraction and result are evaluated
without truncation?

Thanks,
Conrad

On Thu, Aug 3, 2017 at 2:18 AM, Hans Petter Selasky
<hselasky@freebsd.org> wrote:
> Author: hselasky
> Date: Thu Aug  3 09:18:25 2017
> New Revision: 321985
> URL: https://svnweb.freebsd.org/changeset/base/321985
>
> Log:
>   Ticks are 32-bit in FreeBSD.
>
>   MFC after:    3 days
>   Sponsored by: Mellanox Technologies
>
> Modified:
>   head/sys/ofed/drivers/infiniband/core/addr.c
>
> Modified: head/sys/ofed/drivers/infiniband/core/addr.c
> ==============================================================================
> --- head/sys/ofed/drivers/infiniband/core/addr.c        Thu Aug  3 09:14:43 2017        (r321984)
> +++ head/sys/ofed/drivers/infiniband/core/addr.c        Thu Aug  3 09:18:25 2017        (r321985)
> @@ -187,10 +187,10 @@ EXPORT_SYMBOL(rdma_translate_ip);
>
>  static void set_timeout(unsigned long time)
>  {
> -       unsigned long delay;
> +       int delay;      /* under FreeBSD ticks are 32-bit */
>
>         delay = time - jiffies;
> -       if ((long)delay <= 0)
> +       if (delay <= 0)
>                 delay = 1;
>
>         mod_delayed_work(addr_wq, &work, delay);
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpVL49nVqRs5atub=d2P39EGOqcNtx_Raa8fWtV=BFZXbw>