Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755508AbbHFMAb (ORCPT ); Thu, 6 Aug 2015 08:00:31 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:35737 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754043AbbHFMA1 (ORCPT ); Thu, 6 Aug 2015 08:00:27 -0400 Date: Thu, 6 Aug 2015 13:00:24 +0100 From: Matt Fleming To: Andy Shevchenko Cc: Wim Van Sebroeck , linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Mika Westerberg , Jean Delvare , Wolfram Sang , Lee Jones , Guenter Roeck , Matt Fleming Subject: Re: [PATCH v3 3/3] iTCO_wdt: Add support for TCO on Intel Sunrisepoint Message-ID: <20150806120024.GG4332@codeblueprint.co.uk> References: <1438293541-26131-1-git-send-email-matt@codeblueprint.co.uk> <1438293541-26131-4-git-send-email-matt@codeblueprint.co.uk> <1438332064.29746.141.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438332064.29746.141.camel@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1486 Lines: 56 (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/