Received: by 10.192.165.156 with SMTP id m28csp731313imm; Mon, 16 Apr 2018 07:52:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx48883TqhzE1fZ95+/XymF0jEt0PDdRQJdI3VA1IWMhNoP8Vn1ah9EUvdz+8ueV+J9g1UySO X-Received: by 10.101.85.140 with SMTP id j12mr10967016pgs.262.1523890349936; Mon, 16 Apr 2018 07:52:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523890349; cv=none; d=google.com; s=arc-20160816; b=KCW+fgKk5fAw8jJAg1YOTBHMH8Pf5A0OYHJUZSB4Ylhjynowh3DutOJRoexx4BYLQ3 6VbNvDkNSqD7k6O2SI1WRV/pkawHnwEwl+T47iUFuiBjCPaikvU3HrKV8cge63EVAlsI xgtQKr5D7Z07B+P8eC3uoa1FRbBS7mddRDo7IYkf65Na12aDaN+Gt72zjDTE2jFJnAMn uvmOHmK7AnOzOMnZ7J7TyQdiVTMrj75FSTZaPWYUIAaIZbi18pGiCxdqUg2oEkD1Dmyq /90BY77F+pnEglAkeYvMzdpRwsHrK/XhRWg/ekAonlTw098FTcXxHrKfhV8XlriKhWz9 lo/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=1ujDvRoPkUViYIK3q0qkbfjzFLfSPsUioNIbBq08yvA=; b=uv6N6IIIIewxNifhmDBdrZynP+iaMTfVcw5bUdzRevzVwM6lNlvVrUeyMoXn5nKUeC Z/gpqEsrQwKI1Kl77PDd2lX7FoTdPLL5drnAxsIe82PpCI0OG7bBaU5vohQ9VJ/VY8AH bUXXbZauzmZxmclCKbu6b2ia7U1OBhmRzzzMUCsGWBZwqm7jH1GLHTYIHL78bKc/AUWL Z8pjLpySlGObkBObI6PYpH0FncG8gm8rPFyohZHLUzb2bWO7KS/1gSc6QW80giUj0g42 9MkXIkbxDtD0q7P8d45Gd8tN8mnbJiEqRHzFFnV2YuLPsXGQl3M9S8sWKDGkbqbWRXmD 8RvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=cACEufE2; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7si11111140pfm.106.2018.04.16.07.52.16; Mon, 16 Apr 2018 07:52:29 -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=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=cACEufE2; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752958AbeDPOuo (ORCPT + 99 others); Mon, 16 Apr 2018 10:50:44 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:36554 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750884AbeDPOul (ORCPT ); Mon, 16 Apr 2018 10:50:41 -0400 Received: by mail-io0-f196.google.com with SMTP id c26so5766803iob.3 for ; Mon, 16 Apr 2018 07:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1ujDvRoPkUViYIK3q0qkbfjzFLfSPsUioNIbBq08yvA=; b=cACEufE2JQWedl5pmPF4NIPKm1H+RqGdDZXwjGNBf+fez48xl5zZ3ddBqRbmVBDKoo SaaQBl3BikZRS3B0E91mwkdQNakarazVlASDQFlN630OJ5VkNoRuwNLwFcS/tftwLve0 28t0ntoKUokF20JqfVMn7Eqa8/iENRS3nLi0/xKSxbl8jlLIBsobz3ZzC7fabjCS8FXB RsRsrVEj+Arh/Go7fgw4o8TmPFh9qFG00FJW3/tDUaAas4v4PY8xxYjqrCKQLc64HrrS 3YN+F86Z9PW1zz94B8j9p76WaLdrSn9bzvEsd/stVCmk1PKb140E3HSqHKJ4c67cH53z e5/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1ujDvRoPkUViYIK3q0qkbfjzFLfSPsUioNIbBq08yvA=; b=pMDxs6t7jyDEbr1pPdvMf/v5oV2sTRraaivjR8ZeAmi00ekuL3vtQvuYfI9/E/Lz/6 FA16UhS6QNT2Ezxi/8eultBgUaVyqxFKvohd6MXfc2NW78HkKV2OB8bnt5i3Onw+o2CV 4WEb+SVnLabBsR6b61uzjkPMHQOEX8e6x/P9ucT3kMCOpQ2qAH02gv9O1S3CCN1KsUvM VcPQjMMh2jBYPdpCGH97i5wvG50eoBjBGSsL8ONcTn52iTZQELT5eKNEberju1POizVD c+QToIspW6OmpDYDh3We6Q1vn3sWgZWg+jRCUetGzaOmvHmM8dCo8p6rk5wtKMZwBe/i Z5Lg== X-Gm-Message-State: ALQs6tAdnBdSBGu2GnNZ9efzxiIzgkjo++DQ63bsZzHNpQwDQseRYyDf qCs0CKacKHkFQwG2SHH4ohEvENG+E210KTAEJtBtfA== X-Received: by 10.107.53.99 with SMTP id c96mr23087026ioa.87.1523890240758; Mon, 16 Apr 2018 07:50:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.63.196 with HTTP; Mon, 16 Apr 2018 07:50:20 -0700 (PDT) In-Reply-To: <20180415161257.77769dc8@archlinux> References: <1523637411-8531-1-git-send-email-hernan@vanguardiasur.com.ar> <1523637411-8531-8-git-send-email-hernan@vanguardiasur.com.ar> <20180415161257.77769dc8@archlinux> From: =?UTF-8?Q?Hern=C3=A1n_Gonzalez?= Date: Mon, 16 Apr 2018 11:50:20 -0300 Message-ID: Subject: Re: [PATCH v2 07/14] staging: iio: ad7746: Remove unused defines To: Jonathan Cameron Cc: knaack.h@gmx.de, lars@metafoo.de, Peter Meerwald-Stadler , gregkh@linuxfoundation.org, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org You're right, got confused from the macro defined in the .c file. I'll leave this alone on the next series Thanks! On Sun, Apr 15, 2018 at 12:12 PM, Jonathan Cameron wrote= : > On Fri, 13 Apr 2018 13:36:44 -0300 > Hern=C3=A1n Gonzalez wrote: > >> Signed-off-by: Hern=C3=A1n Gonzalez >> --- >> drivers/staging/iio/cdc/ad7746.c | 7 ------- >> drivers/staging/iio/cdc/ad7746.h | 5 ----- >> 2 files changed, 12 deletions(-) >> >> diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/= ad7746.c >> index f53612a..d39ab34 100644 >> --- a/drivers/staging/iio/cdc/ad7746.c >> +++ b/drivers/staging/iio/cdc/ad7746.c >> @@ -25,7 +25,6 @@ >> * AD7746 Register Definition >> */ >> >> -#define AD7746_REG_STATUS 0 >> #define AD7746_REG_CAP_DATA_HIGH 1 >> #define AD7746_REG_VT_DATA_HIGH 4 >> #define AD7746_REG_CAP_SETUP 7 >> @@ -38,12 +37,6 @@ >> #define AD7746_REG_CAP_GAINH 15 >> #define AD7746_REG_VOLT_GAINH 17 >> >> -/* Status Register Bit Designations (AD7746_REG_STATUS) */ >> -#define AD7746_STATUS_EXCERR BIT(3) >> -#define AD7746_STATUS_RDY BIT(2) >> -#define AD7746_STATUS_RDYVT BIT(1) >> -#define AD7746_STATUS_RDYCAP BIT(0) >> - > There is a pretty strong argument that the driver 'should' be > checking the status register... > > I would leave it the defines here. When they are acting > as 'documentation' of the register layout of a device, they > do little harm and can be very useful. > >> /* Capacitive Channel Setup Register Bit Designations (AD7746_REG_CAP_S= ETUP) */ >> #define AD7746_CAPSETUP_CAPEN BIT(7) >> #define AD7746_CAPSETUP_CIN2 BIT(6) /* AD7746 only */ >> diff --git a/drivers/staging/iio/cdc/ad7746.h b/drivers/staging/iio/cdc/= ad7746.h >> index ea8572d..2fbcee8 100644 >> --- a/drivers/staging/iio/cdc/ad7746.h >> +++ b/drivers/staging/iio/cdc/ad7746.h >> @@ -13,11 +13,6 @@ >> * TODO: struct ad7746_platform_data needs to go into include/linux/iio >> */ >> >> -#define AD7466_EXCLVL_0 0 /* +-VDD/8 */ >> -#define AD7466_EXCLVL_1 1 /* +-VDD/4 */ >> -#define AD7466_EXCLVL_2 2 /* +-VDD * 3/8 */ >> -#define AD7466_EXCLVL_3 3 /* +-VDD/2 */ >> - > > Think about what these are for.... They aren't unused > if you are actually using platform data on a given oard. > >> struct ad7746_platform_data { >> unsigned char exclvl; /*Excitation Voltage Level */ >> bool exca_en; /* enables EXCA pin as the excitation outp= ut */ >