Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752495AbbETD5X (ORCPT ); Tue, 19 May 2015 23:57:23 -0400 Received: from smtprelay0176.hostedemail.com ([216.40.44.176]:55188 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752295AbbETD5U (ORCPT ); Tue, 19 May 2015 23:57:20 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3873:3874:4321:4362:5007:6261:10004:10400:10848:11026:11232:11658:11914:12517:12519:12663:12740:13069:13161:13229:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: egg80_22afad2edce3c X-Filterd-Recvd-Size: 1700 Message-ID: <1432094237.2870.262.camel@perches.com> Subject: Re: [PATCH] irda: irda-usb: use msecs_to_jiffies for conversions From: Joe Perches To: Guenter Roeck Cc: David Miller , hofrat@osadl.org, samuel@sortiz.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 19 May 2015 20:57:17 -0700 In-Reply-To: <20150520014408.GA19321@roeck-us.net> References: <1432032711-7020-1-git-send-email-hofrat@osadl.org> <1432045935.2870.152.camel@perches.com> <20150519.164555.1631069770118420652.davem@davemloft.net> <1432069747.2870.215.camel@perches.com> <20150520014408.GA19321@roeck-us.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 878 Lines: 25 On Tue, 2015-05-19 at 18:44 -0700, Guenter Roeck wrote: > On Tue, May 19, 2015 at 02:09:07PM -0700, Joe Perches wrote: > > The other thing that could be done is to use > > max(1ul, msecs_to_jiffies()) > > so that there's always some delay even if HZ <= 50 > > > I may be mistaken, but I am quite sure that msecs_to_jiffies() always returns > at least 1 in such situations. Otherwise there would be lots of conversions > to 0 in the kernel. Thanks Guenter Nope, you're not mistaken. Non 0 constants always return a value > 0 The existing uses like max(1ul, msecs_to_jiffies()) just guard against being 0. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/