From owner-svn-src-all@FreeBSD.ORG Tue Apr 16 16:35:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5593DC4D; Tue, 16 Apr 2013 16:35:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 37AB87B9; Tue, 16 Apr 2013 16:35:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3GGZn3C019369; Tue, 16 Apr 2013 16:35:49 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3GGZmaT019365; Tue, 16 Apr 2013 16:35:48 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201304161635.r3GGZmaT019365@svn.freebsd.org> From: Dimitry Andric Date: Tue, 16 Apr 2013 16:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249550 - in stable/9/sys: arm/xscale/ixp425 mips/atheros mips/rt305x X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 16 Apr 2013 16:35:49 -0000 Author: dim Date: Tue Apr 16 16:35:48 2013 New Revision: 249550 URL: http://svnweb.freebsd.org/changeset/base/249550 Log: MFC r249449: Fix undefined behaviour in several gpio_pin_setflags() routines (under sys/arm and sys/mips), squelching the clang 3.3 warnings about this. Noticed by: tinderbox and many irate spectators Submitted by: Luiz Otavio O Souza PR: kern/177759 Modified: stable/9/sys/arm/xscale/ixp425/avila_gpio.c stable/9/sys/arm/xscale/ixp425/cambria_gpio.c stable/9/sys/mips/atheros/ar71xx_gpio.c stable/9/sys/mips/rt305x/rt305x_gpio.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- stable/9/sys/arm/xscale/ixp425/avila_gpio.c Tue Apr 16 16:09:27 2013 (r249549) +++ stable/9/sys/arm/xscale/ixp425/avila_gpio.c Tue Apr 16 16:35:48 2013 (r249550) @@ -220,8 +220,8 @@ avila_gpio_pin_setflags(device_t dev, ui if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - /* Filter out unwanted flags */ - if ((flags &= sc->sc_pins[pin].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->sc_pins[pin].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together */ Modified: stable/9/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- stable/9/sys/arm/xscale/ixp425/cambria_gpio.c Tue Apr 16 16:09:27 2013 (r249549) +++ stable/9/sys/arm/xscale/ixp425/cambria_gpio.c Tue Apr 16 16:35:48 2013 (r249550) @@ -317,8 +317,8 @@ cambria_gpio_pin_setflags(device_t dev, if (pin >= GPIO_PINS) return (EINVAL); - /* Filter out unwanted flags */ - if ((flags &= sc->sc_pins[pin].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->sc_pins[pin].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together */ Modified: stable/9/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- stable/9/sys/mips/atheros/ar71xx_gpio.c Tue Apr 16 16:09:27 2013 (r249549) +++ stable/9/sys/mips/atheros/ar71xx_gpio.c Tue Apr 16 16:35:48 2013 (r249550) @@ -238,8 +238,8 @@ ar71xx_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Filter out unwanted flags */ - if ((flags &= sc->gpio_pins[i].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->gpio_pins[i].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together */ Modified: stable/9/sys/mips/rt305x/rt305x_gpio.c ============================================================================== --- stable/9/sys/mips/rt305x/rt305x_gpio.c Tue Apr 16 16:09:27 2013 (r249549) +++ stable/9/sys/mips/rt305x/rt305x_gpio.c Tue Apr 16 16:35:48 2013 (r249550) @@ -242,8 +242,8 @@ rt305x_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Filter out unwanted flags */ - if ((flags &= sc->gpio_pins[i].gp_caps) != flags) + /* Check for unwanted flags. */ + if ((flags & sc->gpio_pins[i].gp_caps) != flags) return (EINVAL); /* Can't mix input/output together */