Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1546483img; Sat, 23 Mar 2019 05:54:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfcxo06gf1gc3lNisd2VW+7v+JshfL6eFyG0ZMIcE8MHhj9GRdlHXhhPDOcywWstqLEVip X-Received: by 2002:a17:902:7103:: with SMTP id a3mr14958171pll.214.1553345695707; Sat, 23 Mar 2019 05:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553345695; cv=none; d=google.com; s=arc-20160816; b=oBUZmf0NTyvKi1wdpnnZHX2NaR+hG0FG0whxFeUfrb+x2i7jwKtVfA1GznfxEGvZ8T zPxDTySjkLrfNwTMI8Jbediz7bgfL7QylyPdflOI2Ez+DwNs35mUgMtfOOTAReH7PDCf 2ZPxGMAWiFHPm4Cz7AfXXMy6gAvScM9gWM5VNyuqCsBf0+l9MkC2JAeImDhRiMSBA02q MAqljbm65WeBQSpW9nG0wG95bmwZROUdDpU5gDg1qWPbSX9dBNPV5fUp57Jq+pZdaqBy IcaHdAx/d0QnZDcTxPAhD+3wcMt0XMLWEctHHfw9MrKVD1KDC/IqvpYXQZwW0qgkZcQ8 +/SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FJUzo17mizqgSIFXopeV0NTSnrdioOo9EKUBALEoNaY=; b=iq2DLLa6RG3VDqVIqxihlo0CwTxk3R3PWoZ/Rtsy7i0t1lQjyjyHAszF8dINluG4mX MQ9KwLX3emWbQQKJs8z6WCvI2B0SsY+OPqXgl5YDv5zJDicBXjupmALZcNwE/db0xtVN RA2hbSYl1j8Rb8zWRWwmnaaA8C+HtqmPIdktFAP4qHkzO7UhCKpFyWqFee4eX9PTEoSE tpUF+LymVIVzGdYNiBekRk1xPs/3KIHPUm5ODnRDsn2RlOzyhJ+xGEaRSAMnNajxmc/W qR5VEG0ssQ1orW2OopkZ30/VfStxpA118S7iRfuGFaPMhctVxD+MdkxacBv8PfFO9Wcq yZIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pKRE65fZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi9si9172752plb.174.2019.03.23.05.54.41; Sat, 23 Mar 2019 05:54:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pKRE65fZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727544AbfCWMx7 (ORCPT + 99 others); Sat, 23 Mar 2019 08:53:59 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37637 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbfCWMx7 (ORCPT ); Sat, 23 Mar 2019 08:53:59 -0400 Received: by mail-wr1-f65.google.com with SMTP id w10so5170319wrm.4; Sat, 23 Mar 2019 05:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FJUzo17mizqgSIFXopeV0NTSnrdioOo9EKUBALEoNaY=; b=pKRE65fZFWLovROK6GzwPILO1mNbZsll4oiTc389+zOUUeXS0scSCfLCy7n0M9VKnd /hfXsCJL6TI2sPuBUBlDJR6AMkcQQa5Z8FVU8uaMrUTVRj5XkiG7SkDadTB8lU+fOL72 WLjVbiSXGlbRLqClLuga26dvK3sDSaLrS2SG+nDj6XWcPI9rEGoRjeP1ZChx//nuG75x g47BcOcoQp8KiE46+OQ9YM1j25iN1fwqWp0eKhsQA3p58cKqggNrIW9KMkkR6ySLGVyT VIhGlaXCuHXy1Drn9Cv8qmtojwSLXM2+IEvq08FNKPRCruno0GPHBiAN1/oGN5W9v6Ap xeHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FJUzo17mizqgSIFXopeV0NTSnrdioOo9EKUBALEoNaY=; b=rSu7MMwLUp/bp3ipSf0bar1Lwxa8TBfm1osM2b7ZeDWEt+IfydBijF3k5vs81NSU/z xIS0nTmu/OI1zIebTfOnlPZFWNTmlLYtcaqzNgyTZdm3SbKwaOkcuSZ7XiCp6fUlEeEC wjeI5QQ8ViGNdqhkcxKtjwD9XOMBrq38HONTAR+cB2Lkj4SaNz2b4587HYTcVXmNxQp2 1C8ykj7OD7U7rORX/HR43B5OfwjVYYiWIFxOEUTQ/r7R/ZoTCkGhQA1qLr0YY6rfY86+ FqskRFE4xfiFGBBpYIUxJQSIJVFsU4uoSdWyHCO0z1PTE+bQTYeOVzI50mqvC5zajaPm NJcw== X-Gm-Message-State: APjAAAVrx5qX7HHi+xpgyESHa5YwMTnn22JjZr8hGtIVDN8dc95O7tl/ VBwIncA2ngFQLaR5/U3U/QE= X-Received: by 2002:adf:ea88:: with SMTP id s8mr9849399wrm.300.1553345637113; Sat, 23 Mar 2019 05:53:57 -0700 (PDT) Received: from peano ([87.19.116.42]) by smtp.gmail.com with ESMTPSA id k9sm9989017wru.55.2019.03.23.05.53.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Mar 2019 05:53:56 -0700 (PDT) Date: Sat, 23 Mar 2019 13:53:55 +0100 From: Cristian Sicilia To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman Cc: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] staging: iio: adc: Avoid precedence issues in macro Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enclosing parameter with parenthesis due to avoid possible precedence issue. Signed-off-by: Cristian Sicilia --- drivers/staging/iio/adc/ad7280a.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c index 55b5879..d81a5bd 100644 --- a/drivers/staging/iio/adc/ad7280a.c +++ b/drivers/staging/iio/adc/ad7280a.c @@ -97,9 +97,10 @@ #define AD7280A_NUM_CH (AD7280A_AUX_ADC_6 - \ AD7280A_CELL_VOLTAGE_1 + 1) -#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) ((d * AD7280A_CELLS_PER_DEV) + c) -#define AD7280A_CALC_TEMP_CHAN_NUM(d, c) ((d * AD7280A_CELLS_PER_DEV) + \ - c - AD7280A_CELLS_PER_DEV) +#define AD7280A_CALC_VOLTAGE_CHAN_NUM(d, c) (((d) * AD7280A_CELLS_PER_DEV) + \ + (c)) +#define AD7280A_CALC_TEMP_CHAN_NUM(d, c) (((d) * AD7280A_CELLS_PER_DEV) + \ + (c) - AD7280A_CELLS_PER_DEV) #define AD7280A_DEVADDR_MASTER 0 #define AD7280A_DEVADDR_ALL 0x1F -- 2.7.4