Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1201676

Re: [PATCH v3 3/3] iTCO_wdt: Add support for TCO on Intel Sunrisepoint

From Matt Fleming <matt@codeblueprint.co.uk>
Newsgroups linux.kernel
Subject Re: [PATCH v3 3/3] iTCO_wdt: Add support for TCO on Intel Sunrisepoint
Date 2015-08-06 14:10 +0200
Message-ID <pUs9I-8ts-35@gated-at.bofh.it> (permalink)
References <pS41Q-2wU-1@gated-at.bofh.it> <pS41Q-2wU-11@gated-at.bofh.it> <pSeaS-mJ-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


(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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3 3/3] iTCO_wdt: Add support for TCO on Intel  Sunrisepoint Matt Fleming <matt@codeblueprint.co.uk> - 2015-08-06 14:10 +0200
  Re: [PATCH v3 3/3] iTCO_wdt: Add support for TCO on Intel  Sunrisepoint Wolfram Sang <wsa@the-dreams.de> - 2015-08-06 23:10 +0200

csiph-web