From owner-svn-src-head@freebsd.org Thu Aug 3 15:04:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1FAFDC227F; Thu, 3 Aug 2017 15:04:19 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-pf0-f169.google.com (mail-pf0-f169.google.com [209.85.192.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAED181415; Thu, 3 Aug 2017 15:04:19 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-pf0-f169.google.com with SMTP id d67so7439061pfc.0; Thu, 03 Aug 2017 08:04:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=pxeGlPlQ7nm8ePiDzas1N9zkAgZ7AjcDg25p7fAnMGo=; b=oUAMHPTElmjh4PVI8m8/o76lDMhZC63XPsQEg500CZuJ9Lw8I9r5MmTx5sZKJIwE1l sUex65ufvjIIddL442tIpoLGiPx2ffm7BhibAkK1Ld4Yj3+W2hcq3rKFYh+y/JDETIxj iYJoGSvKuucVetyeKqsITfBruUwtfFulq6zGckbhebOmjHqJ3mBc/BW+yic5wZ2F52NK j0btlbIcSMDehbZcsQr/hYIUL0VezLbbXeuZ8d9GtU52UM5sikrKCLhRNAgO9nZqa7BJ AdRYMnT7jcU3ckdjJsjcrtwnSHi5reLqwXtPmscA2VWuhpcurVa64S89iDrBd7SFIz3S k2fA== X-Gm-Message-State: AIVw1119VD05HtEyU4kDGyozViANUPFcfd09kWReYn8LCSU3Ar6UkleV LLzfQH6nV5h+xxdPWP4= X-Received: by 10.84.211.108 with SMTP id b99mr2212530pli.473.1501771067294; Thu, 03 Aug 2017 07:37:47 -0700 (PDT) Received: from mail-pg0-f52.google.com (mail-pg0-f52.google.com. [74.125.83.52]) by smtp.gmail.com with ESMTPSA id n19sm31159217pfi.35.2017.08.03.07.37.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 07:37:47 -0700 (PDT) Received: by mail-pg0-f52.google.com with SMTP id l64so6963708pge.5; Thu, 03 Aug 2017 07:37:47 -0700 (PDT) X-Received: by 10.84.198.129 with SMTP id p1mr2181847pld.120.1501771067016; Thu, 03 Aug 2017 07:37:47 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.100.169.8 with HTTP; Thu, 3 Aug 2017 07:37:46 -0700 (PDT) In-Reply-To: <201708030918.v739IPVY034866@repo.freebsd.org> References: <201708030918.v739IPVY034866@repo.freebsd.org> From: Conrad Meyer Date: Thu, 3 Aug 2017 07:37:46 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r321985 - head/sys/ofed/drivers/infiniband/core To: Hans Petter Selasky Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 15:04:20 -0000 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 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); >