Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1201676 > unrolled thread
| Started by | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| First post | 2015-08-06 14:10 +0200 |
| Last post | 2015-08-06 23:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
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
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Date | 2015-08-06 14:10 +0200 |
| Subject | Re: [PATCH v3 3/3] iTCO_wdt: Add support for TCO on Intel Sunrisepoint |
| Message-ID | <pUs9I-8ts-35@gated-at.bofh.it> |
(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/
[toc] | [next] | [standalone]
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Date | 2015-08-06 23:10 +0200 |
| Message-ID | <pUAAh-3Sz-7@gated-at.bofh.it> |
| In reply to | #1201676 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Aug 06, 2015 at 01:00:24PM +0100, Matt Fleming wrote: > (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. I'd go for the ternary operator here.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web