Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Mar 2014 00:11:46 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262634 - head/sys/dev/etherswitch/arswitch
Message-ID:  <201403010011.s210BkkO060513@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sat Mar  1 00:11:45 2014
New Revision: 262634
URL: http://svnweb.freebsd.org/changeset/base/262634

Log:
  Be paranoid about bit operations here.

Modified:
  head/sys/dev/etherswitch/arswitch/arswitchreg.h

Modified: head/sys/dev/etherswitch/arswitch/arswitchreg.h
==============================================================================
--- head/sys/dev/etherswitch/arswitch/arswitchreg.h	Sat Mar  1 00:09:36 2014	(r262633)
+++ head/sys/dev/etherswitch/arswitch/arswitchreg.h	Sat Mar  1 00:11:45 2014	(r262634)
@@ -296,7 +296,7 @@
  */
 
 /* XXX Linux define compatibility stuff */
-#define	BITM(_count)			((1 << _count) - 1)
+#define	BITM(_count)			((1UL << _count) - 1)
 #define	BITS(_shift, _count)		(BITM(_count) << _shift)
 
 #define	AR934X_REG_OPER_MODE0		0x04



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