lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1508628846.14611.2.camel@perches.com>
Date:   Sat, 21 Oct 2017 16:34:06 -0700
From:   Joe Perches <joe@...ches.com>
To:     Guenter Roeck <linux@...ck-us.net>,
        Andrey Smirnov <andrew.smirnov@...il.com>
Cc:     linux-kernel@...r.kernel.org, linux-watchdog@...r.kernel.org,
        cphealy@...il.com, Lucas Stach <l.stach@...gutronix.de>,
        Nikita Yushchenko <nikita.yoush@...entembedded.com>,
        Lee Jones <lee.jones@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Pavel Machek <pavel@....cz>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Rob Herring <robh@...nel.org>, Johan Hovold <johan@...nel.org>
Subject: Re: [v8,4/5] watchdog: Add RAVE SP watchdog driver

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ