Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4704107ybf; Wed, 4 Mar 2020 09:03:20 -0800 (PST) X-Google-Smtp-Source: ADFU+vvM++YuVi8UG5RT+qxz9azG5y5gRuynnsX9z395uW1IoRC9Jgp8OljAkwnXfGYo/T7T73GT X-Received: by 2002:a9d:3bc4:: with SMTP id k62mr3307999otc.186.1583341399881; Wed, 04 Mar 2020 09:03:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583341399; cv=none; d=google.com; s=arc-20160816; b=jMdvJnyyN2BaJtvbwNvHdJovEiXltv1r9Jpq87YzPxY8sdus48rH2sNVMBYsFPHqVB PEIki/pc6iDLb10kgE1zqv5pYTDkMq4GTkgIhiDiyxdnQG6mExRGvVJNZ3weL0gRonXT g3S+yU5m1O1/PckwTBwFqFJ7gbVEGHo/uuYMr4J/JAeS3mUdNKZXz7vepHmx9Ce6YRo3 0ly5Xke3QJaxPz3OQzBA8ron7eUEF8w7/zuzS6UF2lnOLbQn0c75FFlDSFp3lHLFeWqY EOjXf8P8Ilk1ofERtfVk4aqvswsGK7Ok+Z7x0aQ6yPV/ibii27Smn9KdF2TsRX4oymYH l+cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=N9lOtVrft0/qB707n6HjzkBxcOjRFvTGY92Y8JzpDCQ=; b=QdVCncsi5XypTR9Nc5LD5EZMk4PH8AyZimIHsR0khAfMfdByRxBJ5NLvm9zN9U+lRR xCztKZqDVm+u1e0yL2+O6tuo3zZ0gWpO/nr9FXbcITxv+uEkDqmE0hmcBIeYYvz+awQU OC/2Tu6+I7qKbQbr+ulEaW8SKRm4k45g96EkhySLmfID+sBTZfQKkMqslnHO34MqE/ew H1a5xmj0QZyHRxPna/FX/I9pbmOoZB7qo9SPnZwlAmjLeSGZ2u651eFD0f+Kiel1/mvb JYE8skw3M8s7ncR1H+azo4JMbrClFbVtXXGsT+7yjZZJ8uTqVlsPD25SOIlLbp+Ne+yo SmUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=XabP4KAA; 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 d2si1813260otc.66.2020.03.04.09.03.00; Wed, 04 Mar 2020 09:03:19 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=XabP4KAA; 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 S1729965AbgCDRCt (ORCPT + 99 others); Wed, 4 Mar 2020 12:02:49 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:37782 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727804AbgCDRCt (ORCPT ); Wed, 4 Mar 2020 12:02:49 -0500 Received: by mail-pl1-f193.google.com with SMTP id b8so1270216plx.4; Wed, 04 Mar 2020 09:02:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=N9lOtVrft0/qB707n6HjzkBxcOjRFvTGY92Y8JzpDCQ=; b=XabP4KAApP77XUAYcTnaIzXQeuabw9MkJ0yRu6X8zGBT+xeGPMG7bwJf1sX53KoR/p L09+g2GDYU1oTPBxZAvl+zxP0lcii67bfIpL6/nQJTIdkXFaWJEdavS1VUGZ/VwKnUOT bbLmQoiMta+UPN0T53/2FLS90bd6d9OJtJ6pU/j02DKVv+ZDWKa7AX42mxClYzILIzTD 4A/3xllTeQN8PUVk3EMmJZdmJ9Mfr9/5alqR6qNLy43X+ZMwsq4J1HsRP1DSrJ44hHHP AAtwRewPBGHDO2IJrF0XyerLMkRwCAY++ypMhtVqCpBslhW5+bB6nH+lKA6NbZ6NRkvB YEcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=N9lOtVrft0/qB707n6HjzkBxcOjRFvTGY92Y8JzpDCQ=; b=c7Dj4jvQW2Jz4KztdZNzw8GbcEgU/aRibEjkcx+SVkzfUh7Dpl26X+fQYKmYi0gTY0 V8XkxTzAP7q0Dbh+/it4Nomv9O+EKzZOEcNDOldy/w1JKjjfNkT+Hqo9n7TncIPwMeUo ECffFPDeOpBpPG/Z/KW0RvonuQ4uKwfBzVjVs2XqPdaq6OHDc0/BKrMUNpk3oOCodp2c WfvRva0ivwLPKD+o4G+WEznYyTKU0K6cQl545qxLPgXs6UG6pKJdF/eOK5rfdVTbifb5 s/+KiOZBwCmhsYivcJ+dgTbX6pKotwWBmvl2jupLQHoRcVybbRpwT1WUittYkwB/fzNH 3vKA== X-Gm-Message-State: ANhLgQ1X6vD4T79h4o1UYk2WR0rejpuOcr2/KORTb4gFmuABqgQUanN5 KTwnS//GbmtHq8dhaaLddIg= X-Received: by 2002:a17:902:b085:: with SMTP id p5mr3882183plr.218.1583341367729; Wed, 04 Mar 2020 09:02:47 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id b184sm15647035pfb.89.2020.03.04.09.02.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Mar 2020 09:02:46 -0800 (PST) Date: Wed, 4 Mar 2020 09:02:45 -0800 From: Guenter Roeck To: Tomer Maimon Cc: Wim Van Sebroeck , Rob Herring , Mark Rutland , Joel Stanley , Avi Fishman , Tali Perry , Nancy Yuen , Benjamin Fair , linux-watchdog@vger.kernel.org, devicetree , Linux Kernel Mailing List , OpenBMC Maillist Subject: Re: [PATCH v2 3/3] watchdog: npcm: remove whitespaces Message-ID: <20200304170245.GA22851@roeck-us.net> References: <20200303100114.87786-1-tmaimon77@gmail.com> <20200303100114.87786-4-tmaimon77@gmail.com> <20200303212512.GA20448@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 04, 2020 at 10:18:12AM +0200, Tomer Maimon wrote: > Hi Guenter, > > I still see the whitespaces warning in v5.6-rc4 > > https://github.com/torvalds/linux/blob/master/drivers/watchdog/npcm_wdt.c#L106 > You are corerct, sorry. No idea what I looked at yesterday. Reviewed-by: Guenter Roeck > > bash-4.2$ ./scripts/checkpatch.pl --strict --file > drivers/watchdog/npcm_wdt.c > CHECK: Please don't use multiple blank lines > #106: FILE: drivers/watchdog/npcm_wdt.c:106: > + > + > > WARNING: suspect code indent for conditional statements (8, 14) > #112: FILE: drivers/watchdog/npcm_wdt.c:112: > + else if (timeout < 3) > + wdd->timeout = 2; > > WARNING: suspect code indent for conditional statements (8, 14) > #114: FILE: drivers/watchdog/npcm_wdt.c:114: > + else if (timeout < 6) > + wdd->timeout = 5; > > WARNING: suspect code indent for conditional statements (8, 14) > #116: FILE: drivers/watchdog/npcm_wdt.c:116: > + else if (timeout < 11) > + wdd->timeout = 10; > > WARNING: suspect code indent for conditional statements (8, 14) > #118: FILE: drivers/watchdog/npcm_wdt.c:118: > + else if (timeout < 22) > + wdd->timeout = 21; > > WARNING: suspect code indent for conditional statements (8, 14) > #120: FILE: drivers/watchdog/npcm_wdt.c:120: > + else if (timeout < 44) > + wdd->timeout = 43; > > WARNING: suspect code indent for conditional statements (8, 14) > #122: FILE: drivers/watchdog/npcm_wdt.c:122: > + else if (timeout < 87) > + wdd->timeout = 86; > > WARNING: suspect code indent for conditional statements (8, 14) > #124: FILE: drivers/watchdog/npcm_wdt.c:124: > + else if (timeout < 173) > + wdd->timeout = 172; > > WARNING: suspect code indent for conditional statements (8, 14) > #126: FILE: drivers/watchdog/npcm_wdt.c:126: > + else if (timeout < 688) > + wdd->timeout = 687; > > WARNING: suspect code indent for conditional statements (8, 14) > #128: FILE: drivers/watchdog/npcm_wdt.c:128: > + else > + wdd->timeout = 2750; > > Thanks, > > Tomer > > On Tue, 3 Mar 2020 at 23:25, Guenter Roeck wrote: > > > On Tue, Mar 03, 2020 at 12:01:14PM +0200, Tomer Maimon wrote: > > > Signed-off-by: Tomer Maimon > > > > Turns out this problem does not actually exist in the upstream driver > > (as of v5.6-rc4). You might want to align your code with the upstream > > kernel. > > > > Guenter > > > > > --- > > > drivers/watchdog/npcm_wdt.c | 19 +++++++++---------- > > > 1 file changed, 9 insertions(+), 10 deletions(-) > > > > > > diff --git a/drivers/watchdog/npcm_wdt.c b/drivers/watchdog/npcm_wdt.c > > > index 84a728af6664..bd38bf1ee6a1 100644 > > > --- a/drivers/watchdog/npcm_wdt.c > > > +++ b/drivers/watchdog/npcm_wdt.c > > > @@ -123,30 +123,29 @@ static int npcm_wdt_stop(struct watchdog_device > > *wdd) > > > return 0; > > > } > > > > > > - > > > static int npcm_wdt_set_timeout(struct watchdog_device *wdd, > > > unsigned int timeout) > > > { > > > if (timeout < 2) > > > wdd->timeout = 1; > > > else if (timeout < 3) > > > - wdd->timeout = 2; > > > + wdd->timeout = 2; > > > else if (timeout < 6) > > > - wdd->timeout = 5; > > > + wdd->timeout = 5; > > > else if (timeout < 11) > > > - wdd->timeout = 10; > > > + wdd->timeout = 10; > > > else if (timeout < 22) > > > - wdd->timeout = 21; > > > + wdd->timeout = 21; > > > else if (timeout < 44) > > > - wdd->timeout = 43; > > > + wdd->timeout = 43; > > > else if (timeout < 87) > > > - wdd->timeout = 86; > > > + wdd->timeout = 86; > > > else if (timeout < 173) > > > - wdd->timeout = 172; > > > + wdd->timeout = 172; > > > else if (timeout < 688) > > > - wdd->timeout = 687; > > > + wdd->timeout = 687; > > > else > > > - wdd->timeout = 2750; > > > + wdd->timeout = 2750; > > > > > > if (watchdog_active(wdd)) > > > npcm_wdt_start(wdd); > >