Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2012553imu; Sun, 16 Dec 2018 14:31:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/XoRqTEyrj2kJNXgtSA1y930QIKDsWkKHUtgkvfJ7iIfBmsWPelZ9ODw1WBPFcIqfFSIpms X-Received: by 2002:a63:4948:: with SMTP id y8mr10116346pgk.32.1544999512088; Sun, 16 Dec 2018 14:31:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544999512; cv=none; d=google.com; s=arc-20160816; b=p/TnPwBS/AAnDZBZ3Kt5b1aHlftkeRuP8OGxT+aiMg6lDax95UaoViGAIatlHTbK4S khJasnBqHpv24BH76+Zkevg1cV7YlCMGBhLnVFkYxb/lutyknjBEt5m3LurTeTZ6TAlf vQUwRMJb/Py+jNR29Q03k4itMbZijQ3+mYzL3rvu6W0MoYLwo4ouDf4zPOdoyZ+eMjJM DAXcEQ7v3cEa6DcDEFtn9IyzgGz5IPwIelJ3HXQEAmYqKlBFL7oWavj1thq9v3VmU54J V03Bw18SHHVyO1MTSMjhXdwxRd1z4n7929CuLGu6czY7Anctj22hqMsYC3V1ztKDxrQd 1YXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=c1ugBlVzctTkSsqVEgoL1NF5CdGyX1+gwRRjwDwY8e4=; b=hf55Bw1vNEf7Y8T+XcJ21YWOHRdc9OFAYwH2Uqsxj+gHo8OzdnC26YTPF/5aCrvdJM nWzgBsESMKwEwYImpR7PfRxjGd9VqUi3UWeWK21xw7TfrWQloC5yQlgOF0qXdDvB+g+k K54GT5RqgC3VE00Et98GZE88BdfrqjzF4VJz+EvqDf1B6C1bkXFPyO10VJuz9aTHR4j1 vX6RLqzCM/gjhZVBqs8ZA2SZf8E3AXT7xLcRWd119mHnVIjj+Dy2VdlhcslDe3Um/5m6 2OLNP1MYh0W1uTclJ4GntD4LKEyouTvyCopo/e5r6h/5+dOCpCF3gFkwvdbJKqsyq7sl vTXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 19si9480206pgp.186.2018.12.16.14.31.36; Sun, 16 Dec 2018 14:31:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730996AbeLPWaG (ORCPT + 99 others); Sun, 16 Dec 2018 17:30:06 -0500 Received: from smtprelay0079.hostedemail.com ([216.40.44.79]:53046 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730758AbeLPWaF (ORCPT ); Sun, 16 Dec 2018 17:30:05 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 67216180A8125; Sun, 16 Dec 2018 22:30:04 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2559:2562:2828:2904:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:4225:4321:5007:6119:7875:7903:10004:10400:10848:10946:11232:11473:11658:11914:12740:12760:12895:13069:13137:13150:13230:13231:13311:13357:13439:14039:14659:14721:21080:21324:21433:21451:21627:30046:30054:30070:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:27,LUA_SUMMARY:none X-HE-Tag: leg39_3aa6ca8da283b X-Filterd-Recvd-Size: 2592 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA; Sun, 16 Dec 2018 22:30:02 +0000 (UTC) Message-ID: <325ac79885892082f4a5b9fe294178d59c2ced68.camel@perches.com> Subject: Re: [PATCH] Staging: nvec: nvec: fixed check style issues From: Joe Perches To: Amir Mahdi Ghorbanian , marvin24@gmx.de Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, ac100@lists.launchpad.net, linux-tegra@vger.kernel.org Date: Sun, 16 Dec 2018 14:30:01 -0800 In-Reply-To: <1544996634-10427-1-git-send-email-indigoomega021@gmail.com> References: <1544996634-10427-1-git-send-email-indigoomega021@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2018-12-16 at 13:43 -0800, Amir Mahdi Ghorbanian wrote: > Replaced udelay() by the preferred usleep_range() function. [] > diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c [] > @@ -626,7 +626,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) > break; > case 2: /* first byte after command */ > if (status == (I2C_SL_IRQ | RNW | RCVD)) { > - udelay(33); > + usleep_range(0, 33); Umm, this is not the same outcome. udelay delays a minimum of 33 usecs. usleep_range delays from min to max usecs. kernel/time/timer.c: * usleep_range - Sleep for an approximate time kernel/time/timer.c- * @min: Minimum time in usecs to sleep kernel/time/timer.c- * @max: Maximum time in usecs to sleep kernel/time/timer.c- * kernel/time/timer.c- * In non-atomic context where the exact wakeup time is flexible, use kernel/time/timer.c: * usleep_range() instead of udelay(). The sleep improves responsiveness kernel/time/timer.c- * by avoiding the CPU-hogging busy-wait of udelay(), and the range reduces kernel/time/timer.c- * power usage by allowing hrtimers to take advantage of an already- kernel/time/timer.c- * scheduled interrupt instead of scheduling a new one just for this sleep. kernel/time/timer.c- */ > if (nvec->rx->data[0] != 0x01) { > dev_err(nvec->dev, > "Read without prior read command\n"); > @@ -713,7 +713,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) > * We experience less incomplete messages with this delay than without > * it, but we don't know why. Help is appreciated. > */ > - udelay(100); > + usleep_range(0, 100); here too.