Date: Fri, 10 Oct 2014 14:17:43 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272894 - head/sys/dev/mc146818 Message-ID: <201410101417.s9AEHhKL099720@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); @@ -118,7 +118,7 @@ mc146818_gettime(device_t dev, struct ti */ for (;;) { mtx_lock_spin(&sc->sc_mtx); - if (!((*sc->sc_mcread)(dev, MC_REGA) & MC_REGA_UIP)) + if (((*sc->sc_mcread)(dev, MC_REGA) & MC_REGA_UIP) == 0) break; mtx_unlock_spin(&sc->sc_mtx); if (--timeout < 0) { @@ -164,7 +164,7 @@ mc146818_getsecs(device_t dev, int *secp for (;;) { mtx_lock_spin(&sc->sc_mtx); - if (!((*sc->sc_mcread)(dev, MC_REGA) & MC_REGA_UIP)) { + if (((*sc->sc_mcread)(dev, MC_REGA) & MC_REGA_UIP) == 0) { sec = FROMREG((*sc->sc_mcread)(dev, MC_SEC)); mtx_unlock_spin(&sc->sc_mtx); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410101417.s9AEHhKL099720>