From owner-svn-src-all@FreeBSD.ORG Wed Jan 19 19:23:26 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A849106564A; Wed, 19 Jan 2011 19:23:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id ED9868FC0C; Wed, 19 Jan 2011 19:23:25 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id p0JJK9AA023229; Wed, 19 Jan 2011 12:20:10 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4D373969.1040301@bsdimp.com> Date: Wed, 19 Jan 2011 12:20:09 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101211 Thunderbird/3.1.7 MIME-Version: 1.0 To: Peter Jeremy References: <201101181523.p0IFNGeB042079@svn.freebsd.org> <20110119055635.GA90983@server.vk2pj.dyndns.org> In-Reply-To: <20110119055635.GA90983@server.vk2pj.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin Subject: Re: svn commit: r217538 - in head/sys/dev: buslogic cs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2011 19:23:26 -0000 On 01/18/2011 22:56, Peter Jeremy wrote: > On 2011-Jan-18 15:23:16 +0000, John Baldwin wrote: >> Log: >> Remove some always-true comparisons. > ... >> --- head/sys/dev/cs/if_cs.c Tue Jan 18 14:58:44 2011 (r217537) >> +++ head/sys/dev/cs/if_cs.c Tue Jan 18 15:23:16 2011 (r217538) >> @@ -364,7 +364,7 @@ cs_cs89x0_probe(device_t dev) >> >> if (!error&& !(sc->flags& CS_NO_IRQ)) { >> if (chip_type == CS8900) { >> - if (irq>= 0 || irq< 16) >> + if (irq< 16) >> irq = cs8900_irq2eeint[irq]; >> else >> irq = 255; > Irrespective of the signedness or otherwise of "irq", I'm fairly > certain that '||' should have been '&&' before. Yes. The old code was clearly wrong when a bogus IRQ was set. Thankfully this was kinda hard to do and only affected ISA cards that didn't have the IRQ setup with the DOS utility. Most of the ones I've seen have this setup, so it isn't surprising this bug lurked here for that long. The new code is correct. Warner