Received: by 10.192.165.156 with SMTP id m28csp2751085imm; Sun, 15 Apr 2018 08:14:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/FUD/V0+gV162yKXP1u3H+4y31g5esn3yDAFeomXYmF7ABIeI3xUA9XjLzSKBG/VvG8Qhy X-Received: by 10.98.69.142 with SMTP id n14mr18463389pfi.42.1523805260963; Sun, 15 Apr 2018 08:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523805260; cv=none; d=google.com; s=arc-20160816; b=B9NRpaqpj+8bDnNGE72F1dJ/TLMAv9L1zmhvCfJAZWv6AAAzBoBymJkKd6EqDcXB81 FzCo2oldl5/8AXdnqc4J2Jd5IDhH4lOAQwE3o4UKdhFhCWzK+lfpHxjukAcx4ocV3RZ0 qBhnt9zitAVYPN/3I4vGOM8zsIeeCHn5Fg4/tAyW8FvX+7X3vSad5IqyQUyywM7TQSXF vy12Rrc7gN1BZBf7KN1CyfcXkXoYC6Q77vER9y/bM9dWbu1Y/SS6RF8/iW2i/4KYfYMT OwatAMplS0se15d/G44kqgyasBqHS1oEnqpdC5wsq3+0Qc1nNzSfNdQKZRmJmhiBhJCW P6Rg== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=dNX5W9iv1lep3JNW97753ALIhkglyBqVNWLk1ofE85Q=; b=SH457+PUCC5h1T74aSbYw/cr6mshliCIHLHtvsX7/XfSe16hPQJt9AFoXhPOYhFRJE OzkboeiUa4+8qUbVzjvpHXV11PyNawbJ3s5ypBQaaiJ7L4QQQulNtPhtil3HH7uk51VZ KlijZYm2OOm3YVtgkJmo9/Ee/pSwsMtCPpipLpwZFK5vdi9qTes0MMUvGuTSJsz1SBEN GuRObGyGrX7/au53nzA9Mmp4dEFMDlZAymOCl+DRzEVHW/vvh1ftJxb1Xf2ZasJvw46P c7oau3PQtnOkEKhjFRPAzv+GpqaUSDX91lL72Q9Ia3qTyp5y56cRwnnX8gatQz4uPsqU tUPQ== ARC-Authentication-Results: i=1; mx.google.com; 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 f9si4258178pgs.667.2018.04.15.08.14.07; Sun, 15 Apr 2018 08:14:20 -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; 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 S1752676AbeDOPNF convert rfc822-to-8bit (ORCPT + 99 others); Sun, 15 Apr 2018 11:13:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:38876 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751890AbeDOPND (ORCPT ); Sun, 15 Apr 2018 11:13:03 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 13E55206B2; Sun, 15 Apr 2018 15:13:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13E55206B2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jic23@kernel.org Date: Sun, 15 Apr 2018 16:12:57 +0100 From: Jonathan Cameron To: =?UTF-8?B?SGVybsOhbg==?= Gonzalez Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 07/14] staging: iio: ad7746: Remove unused defines Message-ID: <20180415161257.77769dc8@archlinux> In-Reply-To: <1523637411-8531-8-git-send-email-hernan@vanguardiasur.com.ar> References: <1523637411-8531-1-git-send-email-hernan@vanguardiasur.com.ar> <1523637411-8531-8-git-send-email-hernan@vanguardiasur.com.ar> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Apr 2018 13:36:44 -0300 Hernán Gonzalez wrote: > Signed-off-by: Hernán 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_SETUP) */ > #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 output */