From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754026AbYIANXU (ORCPT ); Mon, 1 Sep 2008 09:23:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751099AbYIANXI (ORCPT ); Mon, 1 Sep 2008 09:23:08 -0400 Received: from gw-colo-pa.panasas.com ([66.238.117.130]:8603 "EHLO natasha.panasas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751362AbYIANXH (ORCPT ); Mon, 1 Sep 2008 09:23:07 -0400 Message-ID: <48BBEC6C.1050301@panasas.com> Date: Mon, 01 Sep 2008 16:21:48 +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] rt2x00: Compiler warning unmasked by fix of BUILD_BUG_ON References: <48BBE77D.7070007@panasas.com> In-Reply-To: <48BBE77D.7070007@panasas.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Sep 2008 13:21:00.0402 (UTC) FILETIME=[937D1D20:01C90C35] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A "Set" of the 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..c0e8706 100644 --- a/drivers/net/wireless/rt2x00/rt2x00reg.h +++ b/drivers/net/wireless/rt2x00/rt2x00reg.h @@ -134,8 +134,8 @@ struct rt2x00_field32 { * Note that we cannot use the is_power_of_2() function since this * check must be done at compile-time. */ -#define is_power_of_two(x) ( !((x) & ((x)-1)) ) -#define low_bit_mask(x) ( ((x)-1) & ~(x) ) +#define is_power_of_two(x) ( !((unsigned)(x) & ((x)-1)) ) +#define low_bit_mask(x) ( ((unsigned)(x)-1) & ~(x) ) #define is_valid_mask(x) is_power_of_two(1 + (x) + low_bit_mask(x)) /*