From owner-svn-src-all@FreeBSD.ORG Fri Oct 10 16:06:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0ECBFBE4; Fri, 10 Oct 2014 16:06:25 +0000 (UTC) Received: from fep19.mx.upcmail.net (fep19.mx.upcmail.net [62.179.121.39]) by mx1.freebsd.org (Postfix) with ESMTP id B27F8D5F; Fri, 10 Oct 2014 16:06:22 +0000 (UTC) Received: from edge04.upcmail.net ([192.168.13.239]) by viefep15-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20141010160537.YJUT19410.viefep15-int.chello.at@edge04.upcmail.net>; Fri, 10 Oct 2014 18:05:37 +0200 Received: from mole.fafoe.narf.at ([80.109.238.242]) by edge04.upcmail.net with edge id 1U5d1p00Z5EV2AQ01U5dfW; Fri, 10 Oct 2014 18:05:37 +0200 X-SourceIP: 80.109.238.242 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 2D40E6D413; Fri, 10 Oct 2014 18:05:37 +0200 (CEST) Date: Fri, 10 Oct 2014 18:05:37 +0200 From: Stefan Farfeleder To: Baptiste Daroussin Subject: Re: svn commit: r272894 - head/sys/dev/mc146818 Message-ID: <20141010160536.GC1262@mole.fafoe.narf.at> References: <201410101417.s9AEHhKL099720@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201410101417.s9AEHhKL099720@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, marius@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Fri, 10 Oct 2014 16:06:25 -0000 On Fri, Oct 10, 2014 at 02:17:43PM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Fri Oct 10 14:17:42 2014 > New Revision: 272894 > URL: https://svnweb.freebsd.org/changeset/base/272894 > > Log: > Use FreeBSD-bit-checking-style > This appease gcc 4.9 issuing warnings about parentheses > > Differential Revision: https://reviews.freebsd.org/D933 > Reviewed by: marius > > Modified: > head/sys/dev/mc146818/mc146818.c > > Modified: head/sys/dev/mc146818/mc146818.c > ============================================================================== > --- head/sys/dev/mc146818/mc146818.c Fri Oct 10 12:38:53 2014 (r272893) > +++ head/sys/dev/mc146818/mc146818.c Fri Oct 10 14:17:42 2014 (r272894) > @@ -77,7 +77,7 @@ mc146818_attach(device_t dev) > } > > mtx_lock_spin(&sc->sc_mtx); > - if (!(*sc->sc_mcread)(dev, MC_REGD) & MC_REGD_VRT) { > + if (((*sc->sc_mcread)(dev, MC_REGD) & MC_REGD_VRT) == 0) { > mtx_unlock_spin(&sc->sc_mtx); > device_printf(dev, "%s: battery low\n", __func__); > return (ENXIO); This changes the meaning. The old code was parsed as '(!...) & MC_REGD_VRT' which evaluates to constant 0. Probably this was wrong, but your comment doesn't seem to indicate that. The other two changes are fine. Stefan