lkml.org 
[lkml]   [2015]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2015-08-06 14:21    [W:0.059 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site