lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-b893485db994b17402524d3d700b950294cb6c97@git.kernel.org>
Date:	Fri, 24 Feb 2012 12:16:51 -0800
From:	tip-bot for Joerg Roedel <joerg.roedel@....com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	joerg.roedel@....com, arnd@...db.de, dhowells@...hat.com,
	tglx@...utronix.de, hpa@...ux.intel.com, mingo@...e.hu
Subject: [tip:x86/asm] bitops:
  Add missing parentheses to new get_order macro

Commit-ID:  b893485db994b17402524d3d700b950294cb6c97
Gitweb:     http://git.kernel.org/tip/b893485db994b17402524d3d700b950294cb6c97
Author:     Joerg Roedel <joerg.roedel@....com>
AuthorDate: Fri, 24 Feb 2012 13:58:15 +0100
Committer:  H. Peter Anvin <hpa@...ux.intel.com>
CommitDate: Fri, 24 Feb 2012 10:39:27 -0800

bitops: Add missing parentheses to new get_order macro

The new get_order macro introcuded in commit

	d66acc39c7cee323733c8503b9de1821a56dff7e

does not use parentheses around all uses of the parameter n.
This causes new compile warnings, for example in the
amd_iommu_init.c function:

drivers/iommu/amd_iommu_init.c:561:6: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
drivers/iommu/amd_iommu_init.c:561:6: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]

Fix those warnings by adding the missing parentheses.

Reported-by: Ingo Molnar <mingo@...e.hu>
Cc: David Howells <dhowells@...hat.com>
Acked-by: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Joerg Roedel <joerg.roedel@....com>
Link: http://lkml.kernel.org/r/1330088295-28732-1-git-send-email-joerg.roedel@amd.com
Signed-off-by: H. Peter Anvin <hpa@...ux.intel.com>
---
 include/asm-generic/getorder.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-generic/getorder.h b/include/asm-generic/getorder.h
index e0fb4bf..65e4468 100644
--- a/include/asm-generic/getorder.h
+++ b/include/asm-generic/getorder.h
@@ -49,8 +49,8 @@ int __get_order(unsigned long size)
 #define get_order(n)						\
 (								\
 	__builtin_constant_p(n) ? (				\
-		(n == 0UL) ? BITS_PER_LONG - PAGE_SHIFT :	\
-		((n < (1UL << PAGE_SHIFT)) ? 0 :		\
+		((n) == 0UL) ? BITS_PER_LONG - PAGE_SHIFT :	\
+		(((n) < (1UL << PAGE_SHIFT)) ? 0 :		\
 		 ilog2((n) - 1) - PAGE_SHIFT + 1)		\
 	) :							\
 	__get_order(n)						\
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ