From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932270AbdJUXeL (ORCPT ); Sat, 21 Oct 2017 19:34:11 -0400 Received: from smtprelay0008.hostedemail.com ([216.40.44.8]:47325 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932251AbdJUXeK (ORCPT ); Sat, 21 Oct 2017 19:34:10 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:2901:3138:3139:3140:3141:3142:3352:3622:3865:3867:3871:3872:4321:5007:6742:7901:9038:10004:10400:10848:11026:11232:11473:11658:11914:12043:12296:12438:12740:12760:12895:13069:13161:13229:13311:13357:13439:14659:14721:21080:21433:21627:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: smell34_7b59959e7b645 X-Filterd-Recvd-Size: 2080 Message-ID: <1508628846.14611.2.camel@perches.com> Subject: Re: [v8,4/5] watchdog: Add RAVE SP watchdog driver From: Joe Perches To: Guenter Roeck , Andrey Smirnov Cc: linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, cphealy@gmail.com, Lucas Stach , Nikita Yushchenko , Lee Jones , Greg Kroah-Hartman , Pavel Machek , Andy Shevchenko , Rob Herring , Johan Hovold Date: Sat, 21 Oct 2017 16:34:06 -0700 In-Reply-To: <20171021164730.GA20402@roeck-us.net> References: <20171018170136.12347-5-andrew.smirnov@gmail.com> <20171021164730.GA20402@roeck-us.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 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 On Sat, 2017-10-21 at 09:47 -0700, Guenter Roeck wrote: > On Wed, Oct 18, 2017 at 10:01:35AM -0700, Andrey Smirnov wrote: > > This driver provides access to RAVE SP watchdog functionality. [] > > +static int rave_sp_wdt_legacy_configure(struct watchdog_device *wdd) > > +{ > > + const bool enable = watchdog_hw_running(wdd); > > + u8 cmd[] = { > > + [0] = RAVE_SP_CMD_SW_WDT, > > + [1] = 0, > > + [2] = 0, > > + [3] = !!enable, > > Useless !!. It converts a boolean to a boolean. Besides, isn't it always > true anyway ? This converts a _Bool to an int which is cast to a u8 The !! is useless though. > > + [4] = enable ? wdd->timeout : 0, > > + }; > > Interesting; checkpatch doesn't require an empty line after variable > declarations anymore ? Lets keep it anyway for consistency. checkpatch is primarily a single line oriented parser. Multi-line declarations aren't parsed.