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: <20150806120024.GG4332@codeblueprint.co.uk>
Date:	Thu, 6 Aug 2015 13:00:24 +0100
From:	Matt Fleming <matt@...eblueprint.co.uk>
To:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:	Wim Van Sebroeck <wim@...ana.be>, linux-kernel@...r.kernel.org,
	linux-watchdog@...r.kernel.org,
	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	Jean Delvare <jdelvare@...e.com>,
	Wolfram Sang <wsa@...-dreams.de>,
	Lee Jones <lee.jones@...aro.org>,
	Guenter Roeck <linux@...ck-us.net>,
	Matt Fleming <matt.fleming@...el.com>
Subject: Re: [PATCH v3 3/3] iTCO_wdt: Add support for TCO on Intel
 Sunrisepoint

(Sorry for the delay in replying)

On Fri, 31 Jul, at 11:41:04AM, Andy Shevchenko wrote:
> >  
> > +	if (val32 & enable_bit)
> > +		ret = -EIO;
> > +
> >  	return ret; /* returns: 0 = OK, -EIO = Error */
> 
> What about removing ret at all?
> 
> if (val32 & enable_bit)
>  return -EIO;
> 
> return 0;
 
Yeah, good catch. I'll make this change.

> >  }
> >  
> > @@ -503,12 +512,19 @@ static int iTCO_wdt_probe(struct 
> > platform_device *dev)
> >  		pdata->name, pdata->version, (u64)TCOBASE);
> >  
> >  	/* Clear out the (probably old) status */
> > -	if (iTCO_wdt_private.iTCO_version == 3) {
> > +	switch (iTCO_wdt_private.iTCO_version) {
> > +	case 4:
> > +		outw(0x0008, TCO1_STS);	/* Clear the Time 
> > Out Status bit */
> > +		outw(0x0002, TCO2_STS);	/* Clear 
> > SECOND_TO_STS bit */
> > +		break;
> > +	case 3:
> >  		outl(0x20008, TCO1_STS);
> > -	} else {
> > +		break;
> > +	default:
> 
> Same idea here: put cases explicitly for all existing versions?
> 
> case 2:
> case 1:
> default:
 
I intentionally didn't do that because I figured it was implied that
versions 2 and 1 are included in the default case. But I've no problem
with making this change. I'll send a v4.

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ