Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Apr 2013 17:50:20 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r249557 - stable/8/sys/mips/atheros
Message-ID:  <201304161750.r3GHoKTR045224@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Tue Apr 16 17:50:20 2013
New Revision: 249557
URL: http://svnweb.freebsd.org/changeset/base/249557

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 <loos.br@gmail.com>
  PR:		kern/177759

Modified:
  stable/8/sys/mips/atheros/ar71xx_gpio.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/mips/   (props changed)

Modified: stable/8/sys/mips/atheros/ar71xx_gpio.c
==============================================================================
--- stable/8/sys/mips/atheros/ar71xx_gpio.c	Tue Apr 16 17:47:13 2013	(r249556)
+++ stable/8/sys/mips/atheros/ar71xx_gpio.c	Tue Apr 16 17:50:20 2013	(r249557)
@@ -225,8 +225,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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304161750.r3GHoKTR045224>