From: Andrew Lunn Subject: Re: [PATCH 2/2] ktime: helpers to convert between ktime and jiffies Date: Tue, 12 Jun 2018 18:30:32 +0200 Message-ID: <20180612163032.GB12251@lunn.ch> References: <20180611115058.GA12452@tejaswit-linux.qualcomm.com> <20180611115218.GA23539@tejaswit-linux.qualcomm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, f.fainelli@gmail.com, davem@davemloft.net To: Tejaswi Tanikella Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:59774 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933751AbeFLQae (ORCPT ); Tue, 12 Jun 2018 12:30:34 -0400 Content-Disposition: inline In-Reply-To: <20180611115218.GA23539@tejaswit-linux.qualcomm.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Jun 11, 2018 at 05:22:28PM +0530, Tejaswi Tanikella wrote: > Signed-off-by: Tejaswi Tanikella > --- > include/linux/ktime.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/linux/ktime.h b/include/linux/ktime.h > index 5b9fddb..4881483 100644 > --- a/include/linux/ktime.h > +++ b/include/linux/ktime.h > @@ -96,6 +96,10 @@ static inline ktime_t timeval_to_ktime(struct timeval tv) > /* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */ > #define ktime_to_ns(kt) (kt) > > +/* ktime to jiffies and back */ > +#define ktime_to_jiffies(kt) nsecs_to_jiffies(kt) > +#define jiffies_to_ktime(j) jiffies_to_nsecs(j) Hi Tejaswi You should also add some users of these new helpers. Andrew