Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Dec 2019 18:15:27 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r355454 - stable/11/sys/dev/bwn
Message-ID:  <201912061815.xB6IFRcI000567@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Fri Dec  6 18:15:27 2019
New Revision: 355454
URL: https://svnweb.freebsd.org/changeset/base/355454

Log:
  MFC r355139:
  
  Fix a logic bug when "mask" contains a ?: operator.
  
  Newer versions of clang warn that '&' evaluates before '?:'.
  
  Reviewed by:	markj
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D22573

Modified:
  stable/11/sys/dev/bwn/if_bwnvar.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/bwn/if_bwnvar.h
==============================================================================
--- stable/11/sys/dev/bwn/if_bwnvar.h	Fri Dec  6 17:58:27 2019	(r355453)
+++ stable/11/sys/dev/bwn/if_bwnvar.h	Fri Dec  6 18:15:27 2019	(r355454)
@@ -125,7 +125,7 @@ struct bwn_mac;
 		mac->mac_phy.phy_maskset(mac, offset, mask, 0);		\
 	} else								\
 		BWN_PHY_WRITE(mac, offset,				\
-		    BWN_PHY_READ(mac, offset) & mask);			\
+		    BWN_PHY_READ(mac, offset) & (mask));		\
 } while (0)
 #define	BWN_PHY_COPY(mac, dst, src)	do {				\
 	KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED ||		\



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