From patchwork Fri Apr 4 16:24:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Merello X-Patchwork-Id: 3939511 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D43F69F1EE for ; Fri, 4 Apr 2014 16:24:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15F182035C for ; Fri, 4 Apr 2014 16:24:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 516F920381 for ; Fri, 4 Apr 2014 16:24:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752863AbaDDQYy (ORCPT ); Fri, 4 Apr 2014 12:24:54 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:51749 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752709AbaDDQYx (ORCPT ); Fri, 4 Apr 2014 12:24:53 -0400 Received: by mail-wi0-f175.google.com with SMTP id cc10so1625385wib.14 for ; Fri, 04 Apr 2014 09:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=u7QvSGmIjuIpuC3abX2Kxh3ccvQG++2XbfWQ6caG3pc=; b=JvgsG9gMycGsw/xbPwm9mo9eCiQY1QlW8NaCLaQdSSdegQA0PHLGlaOKsN2aWW1j+C 1Cjzj2cjwxmGwKrQbscz+Bp8KnQ+9lWnuWxKFJcWBb4Gl25SVSgI0Nnfri1gmMJJF3kq sdQSEMCj1T+BSmLLmPEN7pJ+hSibHpcWf4Jz4fG4SHED5MK+ftNVQbj+aej5Zyb6NXzh qg8HyQLdEaQ3+DST4pGTJ4xK9tpnFwTy3t1N1UUvcepCH/VNealCZvLizDTEcmT9/8mF 2Wgrnf9R3+ixEsvMkExpouNMJ0mXEwnj3rnJsFuTSGH4sTaRlSrJUUt80v2um9lmbT7n /1CA== X-Received: by 10.180.207.10 with SMTP id ls10mr5968589wic.22.1396628692306; Fri, 04 Apr 2014 09:24:52 -0700 (PDT) Received: from localhost.localdomain (host90-15-dynamic.249-95-r.retail.telecomitalia.it. [95.249.15.90]) by mx.google.com with ESMTPSA id bc51sm20532271eeb.22.2014.04.04.09.24.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 09:24:51 -0700 (PDT) From: Andrea Merello To: linville@tuxdriver.com, kilroyd@googlemail.com Cc: linux-wireless@vger.kernel.org, Larry.Finger@lwfinger.net, bernhard@schiffner-limbach.de, dan.carpenter@oracle.com, andrea.merello@gmail.com Subject: [PATCH 3/4] rtl8180: add parentheses to REG_ADDR macros Date: Fri, 4 Apr 2014 18:24:36 +0200 Message-Id: <1396628676-14512-1-git-send-email-andrea.merello@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <533C63D6.5000109@gmail.com> References: <533C63D6.5000109@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Parentheses are missing around the macro argument, causing the macro possibly not to work passing certain expressions as arguments. This should not cause any issues with current code, however it's worth to add them, as a good practice, and to eventually avoid future bugs. Suggested-by: Dave Kilroy Signed-off-by: Andrea Merello --- drivers/net/wireless/rtl818x/rtl818x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/rtl818x/rtl818x.h b/drivers/net/wireless/rtl818x/rtl818x.h index 45ea4e1..7abef95 100644 --- a/drivers/net/wireless/rtl818x/rtl818x.h +++ b/drivers/net/wireless/rtl818x/rtl818x.h @@ -334,9 +334,9 @@ struct rtl818x_csr { * I don't like to introduce a ton of "reserved".. * They are for RTL8187SE */ -#define REG_ADDR1(addr) ((u8 __iomem *)priv->map + addr) -#define REG_ADDR2(addr) ((__le16 __iomem *)priv->map + (addr >> 1)) -#define REG_ADDR4(addr) ((__le32 __iomem *)priv->map + (addr >> 2)) +#define REG_ADDR1(addr) ((u8 __iomem *)priv->map + (addr)) +#define REG_ADDR2(addr) ((__le16 __iomem *)priv->map + ((addr) >> 1)) +#define REG_ADDR4(addr) ((__le32 __iomem *)priv->map + ((addr) >> 2)) #define FEMR_SE REG_ADDR2(0x1D4) #define ARFR REG_ADDR2(0x1E0)