From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: [PATCH 2/2] ktime: helpers to convert between ktime and jiffies Date: Wed, 13 Jun 2018 09:51:10 -0700 Message-ID: <79b44fc1-67eb-266a-f2c0-1ef30bbb8dde@gmail.com> References: <20180611115058.GA12452@tejaswit-linux.qualcomm.com> <20180611115218.GA23539@tejaswit-linux.qualcomm.com> <20180612163032.GB12251@lunn.ch> <20180613133557.GA15265@tejaswit-linux.qualcomm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net To: Tejaswi Tanikella , Andrew Lunn Return-path: Received: from mail-qt0-f194.google.com ([209.85.216.194]:41481 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934182AbeFMQvT (ORCPT ); Wed, 13 Jun 2018 12:51:19 -0400 Received: by mail-qt0-f194.google.com with SMTP id y20-v6so3008539qto.8 for ; Wed, 13 Jun 2018 09:51:19 -0700 (PDT) In-Reply-To: <20180613133557.GA15265@tejaswit-linux.qualcomm.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 06/13/2018 06:35 AM, Tejaswi Tanikella wrote: > On Tue, Jun 12, 2018 at 06:30:32PM +0200, Andrew Lunn wrote: >> 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 > > Hi Andrew, > > I used them in the first patch. Therefore you must swap the order of the patches in order not to break bisectability (that is, each commit must build on its own). Thanks!-- Florian