Received: by 10.223.185.116 with SMTP id b49csp5513794wrg; Wed, 7 Mar 2018 13:07:49 -0800 (PST) X-Google-Smtp-Source: AG47ELtUXW5au3ZcsKXInCu+4TgTlBU5tp7Jxp/HidHWGZA1mEJvb1afYDjJSkwZJ14Jr/8B+Bfb X-Received: by 10.101.68.193 with SMTP id g1mr18900001pgs.302.1520456869236; Wed, 07 Mar 2018 13:07:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520456869; cv=none; d=google.com; s=arc-20160816; b=yYEsebpLzoExpKKrehSPijejNa/a+QfJkQo532PLavXBpqLbgDiWVlXsCNbjp35o1t aUnl9c48AS6PtD49JPE51/wHJxaeUBSc7kIiQk/jn88sqm6U3yM+rSj+HWWLkIin6nE4 dpCBX65TFLeSQ9YreHFXY4C9lTCzLcn2R+TBXdtx8baRQiyNrXgNy8nPuQL2co39TWlX FyG5N+TPCxuMQru2p/uQme4bgVpTjFC0xLzdcnxwFloYtV1mDAoHzYwNsH3qb/OnWRYQ Iu9t49TwGGwyRCNDRes4dc+BV6qU1YhGOxfbY2U74CdyhqG0hx2FXA/fvEvkgQau4MF2 TelQ== 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=Bxc+CJWvx2Yc9uf/Ezbj66eGI4qipOQ8MMHB/52txFQ=; b=qV0/g9PYrPEwqb4gb1PypAwGBaGVO3RidNK2w2lFLWgKPJuN/ZQLZS9yxwvikUWPHq my/WNuxCpk0NhBoM7VCXwWPBC2gYnSueOlcwnTcuQwFwxHSK8i40DSuUt1sK8r4klMy0 YRbBfO6YYjWRS3KEe5/hU5JaxXCtwqoqjnsjEOOdIGwp0qso6TylMxM89ia/RBaS6r70 CIVznaytKbujN4fJarFXPw1jeyXjyTnoQw+fyTKkmzJD80QyTzEcmI3vJr61S3GTfwad iBHxjHM9y39SzJvA9aq2UML+FYNRZ/wF/SCgbO59sNdon97sPDaxKCpjA6RGmBJuMmVc 94Lg== 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 o6-v6si10875587pls.583.2018.03.07.13.07.34; Wed, 07 Mar 2018 13:07:49 -0800 (PST) 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 S1754755AbeCGVGW (ORCPT + 99 others); Wed, 7 Mar 2018 16:06:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:37346 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754333AbeCGVGU (ORCPT ); Wed, 7 Mar 2018 16:06:20 -0500 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 006F72172D; Wed, 7 Mar 2018 21:06:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 006F72172D 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: Wed, 7 Mar 2018 21:06:15 +0000 From: Jonathan Cameron To: Shreeya Patel Cc: lars@metafoo.de, Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, daniel.baluta@gmail.com Subject: Re: [PATCH v3 2/4] Staging: iio: adis16209: Change some macro names Message-ID: <20180307210615.63768b5b@archlinux> In-Reply-To: <3880510489f196d93ccb3ef7551e0216009d4a10.1520164945.git.shreeya.patel23498@gmail.com> References: <3880510489f196d93ccb3ef7551e0216009d4a10.1520164945.git.shreeya.patel23498@gmail.com> 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=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 4 Mar 2018 18:11:17 +0530 Shreeya Patel wrote: > Make some of the macro names according to the names > given in the datasheet of the adis16209 driver. > > Signed-off-by: Shreeya Patel A small comment inline which we should clear up in a follow up patch. > --- > > Changes in v3 > -Introduce this new patch for v3 of the series. > > drivers/staging/iio/accel/adis16209.c | 48 +++++++++++++++++------------------ > 1 file changed, 24 insertions(+), 24 deletions(-) > > diff --git a/drivers/staging/iio/accel/adis16209.c b/drivers/staging/iio/accel/adis16209.c > index d8aef9c..eb5c878 100644 > --- a/drivers/staging/iio/accel/adis16209.c > +++ b/drivers/staging/iio/accel/adis16209.c > @@ -68,21 +68,21 @@ > #define ADIS16209_MSC_CTRL_ACTIVE_HIGH BIT(1) > #define ADIS16209_MSC_CTRL_DATA_RDY_DIO2 BIT(0) > > -#define ADIS16209_DIAG_STAT_REG 0x3C > -#define ADIS16209_DIAG_STAT_ALARM2 BIT(9) > -#define ADIS16209_DIAG_STAT_ALARM1 BIT(8) > -#define ADIS16209_DIAG_STAT_SELFTEST_FAIL_BIT 5 > -#define ADIS16209_DIAG_STAT_SPI_FAIL_BIT 3 > -#define ADIS16209_DIAG_STAT_FLASH_UPT_BIT 2 > +#define ADIS16209_STAT_REG 0x3C > +#define ADIS16209_STAT_ALARM2 BIT(9) > +#define ADIS16209_STAT_ALARM1 BIT(8) > +#define ADIS16209_STAT_SELFTEST_FAIL_BIT 5 > +#define ADIS16209_STAT_SPI_FAIL_BIT 3 > +#define ADIS16209_STAT_FLASH_UPT_FAIL_BIT 2 Given these are also fields of the STAT_REG, be it defined in a different fashion I think they should also have the small additional indent. > /* Power supply above 3.625 V */ > -#define ADIS16209_DIAG_STAT_POWER_HIGH_BIT 1 > +#define ADIS16209_STAT_POWER_HIGH_BIT 1 > /* Power supply below 3.15 V */ > -#define ADIS16209_DIAG_STAT_POWER_LOW_BIT 0 > +#define ADIS16209_STAT_POWER_LOW_BIT 0 > > -#define ADIS16209_GLOB_CMD_REG 0x3E > -#define ADIS16209_GLOB_CMD_SW_RESET BIT(7) > -#define ADIS16209_GLOB_CMD_CLEAR_STAT BIT(4) > -#define ADIS16209_GLOB_CMD_FACTORY_CAL BIT(1) > +#define ADIS16209_CMD_REG 0x3E > +#define ADIS16209_CMD_SW_RESET BIT(7) > +#define ADIS16209_CMD_CLEAR_STAT BIT(4) > +#define ADIS16209_CMD_FACTORY_CAL BIT(1) > > #define ADIS16209_ERROR_ACTIVE BIT(14) > > @@ -238,29 +238,29 @@ static const struct iio_info adis16209_info = { > }; > > static const char * const adis16209_status_error_msgs[] = { > - [ADIS16209_DIAG_STAT_SELFTEST_FAIL_BIT] = "Self test failure", > - [ADIS16209_DIAG_STAT_SPI_FAIL_BIT] = "SPI failure", > - [ADIS16209_DIAG_STAT_FLASH_UPT_BIT] = "Flash update failed", > - [ADIS16209_DIAG_STAT_POWER_HIGH_BIT] = "Power supply above 3.625V", > - [ADIS16209_DIAG_STAT_POWER_LOW_BIT] = "Power supply below 3.15V", > + [ADIS16209_STAT_SELFTEST_FAIL_BIT] = "Self test failure", > + [ADIS16209_STAT_SPI_FAIL_BIT] = "SPI failure", > + [ADIS16209_STAT_FLASH_UPT_FAIL_BIT] = "Flash update failed", > + [ADIS16209_STAT_POWER_HIGH_BIT] = "Power supply above 3.625V", > + [ADIS16209_STAT_POWER_LOW_BIT] = "Power supply below 3.15V", > }; > > static const struct adis_data adis16209_data = { > .read_delay = 30, > .msc_ctrl_reg = ADIS16209_MSC_CTRL_REG, > - .glob_cmd_reg = ADIS16209_GLOB_CMD_REG, > - .diag_stat_reg = ADIS16209_DIAG_STAT_REG, > + .glob_cmd_reg = ADIS16209_CMD_REG, > + .diag_stat_reg = ADIS16209_STAT_REG, > > .self_test_mask = ADIS16209_MSC_CTRL_SELF_TEST_EN, > .self_test_no_autoclear = true, > .startup_delay = ADIS16209_STARTUP_DELAY_MS, > > .status_error_msgs = adis16209_status_error_msgs, > - .status_error_mask = BIT(ADIS16209_DIAG_STAT_SELFTEST_FAIL_BIT) | > - BIT(ADIS16209_DIAG_STAT_SPI_FAIL_BIT) | > - BIT(ADIS16209_DIAG_STAT_FLASH_UPT_BIT) | > - BIT(ADIS16209_DIAG_STAT_POWER_HIGH_BIT) | > - BIT(ADIS16209_DIAG_STAT_POWER_LOW_BIT), > + .status_error_mask = BIT(ADIS16209_STAT_SELFTEST_FAIL_BIT) | > + BIT(ADIS16209_STAT_SPI_FAIL_BIT) | > + BIT(ADIS16209_STAT_FLASH_UPT_FAIL_BIT) | > + BIT(ADIS16209_STAT_POWER_HIGH_BIT) | > + BIT(ADIS16209_STAT_POWER_LOW_BIT), > }; > > static int adis16209_probe(struct spi_device *spi)