All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Himanshu Jha <himanshujha199640@gmail.com>
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 04/11] Staging: iio: accel: Rename few macro definitions
Date: Wed, 7 Mar 2018 20:42:10 +0000	[thread overview]
Message-ID: <20180307204210.748056eb@archlinux> (raw)
In-Reply-To: <1520236170-14668-5-git-send-email-himanshujha199640@gmail.com>

On Mon,  5 Mar 2018 13:19:23 +0530
Himanshu Jha <himanshujha199640@gmail.com> wrote:

> Rename few macros with appropriate names specifying their usage/function.
Most of these are obviously good, but for one I didn't understand your
reasoning.

Given there are only a few of them, I'd put some more description here
to explain why you changed each one.

Thanks,

Jonathan
> 
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> ---
>  drivers/staging/iio/accel/adis16201.c | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/iio/accel/adis16201.c b/drivers/staging/iio/accel/adis16201.c
> index 59c1166..445cb56 100644
> --- a/drivers/staging/iio/accel/adis16201.c
> +++ b/drivers/staging/iio/accel/adis16201.c
> @@ -20,9 +20,8 @@
>  #include <linux/iio/buffer.h>
>  #include <linux/iio/imu/adis.h>
>  
> -#define ADIS16201_STARTUP_DELAY		220
> -
> -#define ADIS16201_FLASH_CNT      0x00
> +#define ADIS16201_STARTUP_DELAY_MS	220
> +#define ADIS16201_FLASH_CNT		0x00
>  
>  /* Data Output Register Information */
>  #define ADIS16201_SUPPLY_OUT     0x02
> @@ -69,7 +68,7 @@
>  
>  #define ADIS16201_MSC_CTRL_DATA_RDY_EN	        BIT(2)
>  
> -#define ADIS16201_MSC_CTRL_ACTIVE_HIGH	        BIT(1)
> +#define ADIS16201_MSC_CTRL_ACTIVE_DATA_RDY_HIGH	        BIT(1)
>  
>  #define ADIS16201_MSC_CTRL_DATA_RDY_DIO1	BIT(0)
>  
> @@ -80,14 +79,14 @@
>  
>  #define ADIS16201_DIAG_STAT_SPI_FAIL_BIT   3
>  
> -#define ADIS16201_DIAG_STAT_FLASH_UPT_BIT  2
> +#define ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT  2
>  
>  #define ADIS16201_DIAG_STAT_POWER_HIGH_BIT 1
>  
>  #define ADIS16201_DIAG_STAT_POWER_LOW_BIT  0
>  
>  #define ADIS16201_GLOB_CMD_SW_RESET	BIT(7)
> -#define ADIS16201_GLOB_CMD_FACTORY_CAL	BIT(1)
> +#define ADIS16201_GLOB_CMD_FACTORY	BIT(1)
What was the logic behind this particular change?

>  
>  #define ADIS16201_ERROR_ACTIVE          BIT(14)
>  
> @@ -231,7 +230,7 @@ static const struct iio_info adis16201_info = {
>  
>  static const char * const adis16201_status_error_msgs[] = {
>  	[ADIS16201_DIAG_STAT_SPI_FAIL_BIT] = "SPI failure",
> -	[ADIS16201_DIAG_STAT_FLASH_UPT_BIT] = "Flash update failed",
> +	[ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT] = "Flash update failed",
>  	[ADIS16201_DIAG_STAT_POWER_HIGH_BIT] = "Power supply above 3.625V",
>  	[ADIS16201_DIAG_STAT_POWER_LOW_BIT] = "Power supply below 3.15V",
>  };
> @@ -244,11 +243,11 @@ static const struct adis_data adis16201_data = {
>  
>  	.self_test_mask = ADIS16201_MSC_CTRL_SELF_TEST_EN,
>  	.self_test_no_autoclear = true,
> -	.startup_delay = ADIS16201_STARTUP_DELAY,
> +	.startup_delay = ADIS16201_STARTUP_DELAY_MS,
>  
>  	.status_error_msgs = adis16201_status_error_msgs,
>  	.status_error_mask = BIT(ADIS16201_DIAG_STAT_SPI_FAIL_BIT) |
> -		BIT(ADIS16201_DIAG_STAT_FLASH_UPT_BIT) |
> +		BIT(ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT) |
>  		BIT(ADIS16201_DIAG_STAT_POWER_HIGH_BIT) |
>  		BIT(ADIS16201_DIAG_STAT_POWER_LOW_BIT),
>  };


WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Himanshu Jha <himanshujha199640@gmail.com>
Cc: devel@driverdev.osuosl.org, daniel.baluta@gmail.com,
	lars@metafoo.de, Michael.Hennerich@analog.com,
	linux-iio@vger.kernel.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, pmeerw@pmeerw.net, knaack.h@gmx.de
Subject: Re: [PATCH 04/11] Staging: iio: accel: Rename few macro definitions
Date: Wed, 7 Mar 2018 20:42:10 +0000	[thread overview]
Message-ID: <20180307204210.748056eb@archlinux> (raw)
In-Reply-To: <1520236170-14668-5-git-send-email-himanshujha199640@gmail.com>

On Mon,  5 Mar 2018 13:19:23 +0530
Himanshu Jha <himanshujha199640@gmail.com> wrote:

> Rename few macros with appropriate names specifying their usage/function.
Most of these are obviously good, but for one I didn't understand your
reasoning.

Given there are only a few of them, I'd put some more description here
to explain why you changed each one.

Thanks,

Jonathan
> 
> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> ---
>  drivers/staging/iio/accel/adis16201.c | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/iio/accel/adis16201.c b/drivers/staging/iio/accel/adis16201.c
> index 59c1166..445cb56 100644
> --- a/drivers/staging/iio/accel/adis16201.c
> +++ b/drivers/staging/iio/accel/adis16201.c
> @@ -20,9 +20,8 @@
>  #include <linux/iio/buffer.h>
>  #include <linux/iio/imu/adis.h>
>  
> -#define ADIS16201_STARTUP_DELAY		220
> -
> -#define ADIS16201_FLASH_CNT      0x00
> +#define ADIS16201_STARTUP_DELAY_MS	220
> +#define ADIS16201_FLASH_CNT		0x00
>  
>  /* Data Output Register Information */
>  #define ADIS16201_SUPPLY_OUT     0x02
> @@ -69,7 +68,7 @@
>  
>  #define ADIS16201_MSC_CTRL_DATA_RDY_EN	        BIT(2)
>  
> -#define ADIS16201_MSC_CTRL_ACTIVE_HIGH	        BIT(1)
> +#define ADIS16201_MSC_CTRL_ACTIVE_DATA_RDY_HIGH	        BIT(1)
>  
>  #define ADIS16201_MSC_CTRL_DATA_RDY_DIO1	BIT(0)
>  
> @@ -80,14 +79,14 @@
>  
>  #define ADIS16201_DIAG_STAT_SPI_FAIL_BIT   3
>  
> -#define ADIS16201_DIAG_STAT_FLASH_UPT_BIT  2
> +#define ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT  2
>  
>  #define ADIS16201_DIAG_STAT_POWER_HIGH_BIT 1
>  
>  #define ADIS16201_DIAG_STAT_POWER_LOW_BIT  0
>  
>  #define ADIS16201_GLOB_CMD_SW_RESET	BIT(7)
> -#define ADIS16201_GLOB_CMD_FACTORY_CAL	BIT(1)
> +#define ADIS16201_GLOB_CMD_FACTORY	BIT(1)
What was the logic behind this particular change?

>  
>  #define ADIS16201_ERROR_ACTIVE          BIT(14)
>  
> @@ -231,7 +230,7 @@ static const struct iio_info adis16201_info = {
>  
>  static const char * const adis16201_status_error_msgs[] = {
>  	[ADIS16201_DIAG_STAT_SPI_FAIL_BIT] = "SPI failure",
> -	[ADIS16201_DIAG_STAT_FLASH_UPT_BIT] = "Flash update failed",
> +	[ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT] = "Flash update failed",
>  	[ADIS16201_DIAG_STAT_POWER_HIGH_BIT] = "Power supply above 3.625V",
>  	[ADIS16201_DIAG_STAT_POWER_LOW_BIT] = "Power supply below 3.15V",
>  };
> @@ -244,11 +243,11 @@ static const struct adis_data adis16201_data = {
>  
>  	.self_test_mask = ADIS16201_MSC_CTRL_SELF_TEST_EN,
>  	.self_test_no_autoclear = true,
> -	.startup_delay = ADIS16201_STARTUP_DELAY,
> +	.startup_delay = ADIS16201_STARTUP_DELAY_MS,
>  
>  	.status_error_msgs = adis16201_status_error_msgs,
>  	.status_error_mask = BIT(ADIS16201_DIAG_STAT_SPI_FAIL_BIT) |
> -		BIT(ADIS16201_DIAG_STAT_FLASH_UPT_BIT) |
> +		BIT(ADIS16201_DIAG_STAT_FLASH_UPT_FAIL_BIT) |
>  		BIT(ADIS16201_DIAG_STAT_POWER_HIGH_BIT) |
>  		BIT(ADIS16201_DIAG_STAT_POWER_LOW_BIT),
>  };

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2018-03-07 20:42 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-05  7:49 [PATCH 00/11] staging: iio: accel: adis16201 driver cleanup Himanshu Jha
2018-03-05  7:49 ` Himanshu Jha
2018-03-05  7:49 ` [PATCH 01/11] Staging: iio: accel: Prefer alphabetical sequence of header files Himanshu Jha
2018-03-07 20:29   ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 02/11] Staging: iio: accel: Add a blank space before returns Himanshu Jha
2018-03-07 20:32   ` Jonathan Cameron
2018-03-07 20:32     ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 03/11] Staging: iio: accel: Remove unnecessary comments Himanshu Jha
2018-03-05  7:49   ` Himanshu Jha
2018-03-06 21:26   ` Shreeya Patel
2018-03-06 22:25     ` Himanshu Jha
2018-03-07 20:40   ` Jonathan Cameron
2018-03-07 20:40     ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 04/11] Staging: iio: accel: Rename few macro definitions Himanshu Jha
2018-03-05  7:49   ` Himanshu Jha
2018-03-07 20:42   ` Jonathan Cameron [this message]
2018-03-07 20:42     ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 05/11] Staging: iio: accel: Add _REG suffix to registers Himanshu Jha
2018-03-05  7:49   ` Himanshu Jha
2018-03-07 20:44   ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 06/11] Staging: iio: accel: Reverse christmas tree Himanshu Jha
2018-03-05  7:49   ` Himanshu Jha
2018-03-05  7:49 ` [PATCH 07/11] Staging: iio: accel: Adjust arguments to match open parentheses Himanshu Jha
2018-03-05  7:49   ` Himanshu Jha
2018-03-05 10:16   ` Dan Carpenter
2018-03-05 10:16     ` Dan Carpenter
2018-03-05  7:49 ` [PATCH 08/11] Staging: iio: accel: Use switch statement than if-else Himanshu Jha
2018-03-05  7:49   ` Himanshu Jha
2018-03-07 20:48   ` Jonathan Cameron
2018-03-07 20:48     ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 09/11] Staging: iio: accel: Use sign_extend32 function Himanshu Jha
2018-03-05  7:49   ` Himanshu Jha
2018-03-05  7:49 ` [PATCH 10/11] Staging: iio: accel: Add comments about units in data read function Himanshu Jha
2018-03-05  7:49   ` Himanshu Jha
2018-03-07 20:50   ` Jonathan Cameron
2018-03-07 20:50     ` Jonathan Cameron
2018-03-08  7:28     ` Himanshu Jha
2018-03-10 15:05       ` Jonathan Cameron
2018-03-10 15:05         ` Jonathan Cameron
2018-03-05  7:49 ` [PATCH 11/11] Staging: iio: accel: Move adis16201 driver out of staging subsystem Himanshu Jha
2018-03-05  7:49   ` Himanshu Jha
2018-03-07 20:58   ` Jonathan Cameron
2018-03-07 20:58     ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180307204210.748056eb@archlinux \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=daniel.baluta@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=himanshujha199640@gmail.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.