From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752835AbYIANqZ (ORCPT ); Mon, 1 Sep 2008 09:46:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750839AbYIANqR (ORCPT ); Mon, 1 Sep 2008 09:46:17 -0400 Received: from gw-colo-pa.panasas.com ([66.238.117.130]:9989 "EHLO natasha.panasas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750727AbYIANqQ (ORCPT ); Mon, 1 Sep 2008 09:46:16 -0400 Message-ID: <48BBF1DA.5060808@panasas.com> Date: Mon, 01 Sep 2008 16:44:58 +0300 From: Boaz Harrosh User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Ingo Molnar , Rusty Russell , "David S. Miller" , Ivo van Doorn , "John W. Linville" CC: Alexey Dobriyan , Andrew Morton , Theodore Tso , Linus Torvalds , Jan Beulich , linux-kernel Subject: [PATCH 4/5 ver2] rt2x00: Compiler warning unmasked by fix of BUILD_BUG_ON References: <48BBE77D.7070007@panasas.com> <48BBEC6C.1050301@panasas.com> In-Reply-To: <48BBEC6C.1050301@panasas.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Sep 2008 13:44:11.0060 (UTC) FILETIME=[D062AF40:01C90C38] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A "Set" of a sign-bit in an "&" operation causes a compiler warning. Make calculations unsigned. [ The warning was masked by the use of (void)() cast in the old BUILD_BUG_ON() ] Signed-off-by: Boaz Harrosh TO: Ivo van Doorn TO: John W. Linville CC: Ingo Molnar CC: Rusty Russell --- drivers/net/wireless/rt2x00/rt2x00reg.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2x00reg.h b/drivers/net/wireless/rt2x00/rt2x00reg.h index 7e88ce5..e71b793 100644 --- a/drivers/net/wireless/rt2x00/rt2x00reg.h +++ b/drivers/net/wireless/rt2x00/rt2x00reg.h @@ -136,8 +136,8 @@ struct rt2x00_field32 { */ #define is_power_of_two(x) ( !((x) & ((x)-1)) ) #define low_bit_mask(x) ( ((x)-1) & ~(x) ) -#define is_valid_mask(x) is_power_of_two(1 + (x) + low_bit_mask(x)) - +#define is_valid_mask(x) is_power_of_two(1 + (x) + \ + low_bit_mask((unsigned long)x)) /* * Macro's to find first set bit in a variable. * These macro's behaves the same as the __ffs() function with -- 1.5.6.rc1.5.gadf6