public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Michael Harris <michaelharriscode@gmail.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: iio: adt7316: remove unused macros
Date: Sat, 31 Jan 2026 15:54:13 +0000	[thread overview]
Message-ID: <20260131155413.28fcc701@jic23-huawei> (raw)
In-Reply-To: <20260130-adt7316-correct-macros-v1-1-8a71df1e42f1@gmail.com>

On Fri, 30 Jan 2026 23:38:27 -0800
Michael Harris <michaelharriscode@gmail.com> wrote:

> Delete macros that aren't in use
Hi Michael,

Why?  

I'm not against driver authors only introducing register defines they
are using, but I'm also not against them deciding on comprehensive defines
or at least making sure they cover all the fields in a given register.

Having only parts of a register defined sometimes makes people miss
that they can't just write the whole thing because there may be other
bits they do not indent to change. As such it can be useful to have them there.

Thanks,

Jonathan


> 
> Signed-off-by: Michael Harris <michaelharriscode@gmail.com>
> ---
>  drivers/staging/iio/addac/adt7316.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
> index 8a9a8262c2bec34f3c3e79d8174f492b9a23fb70..4173c8822fff495e8c69d9cf6c11be9e9227a8c1 100644
> --- a/drivers/staging/iio/addac/adt7316.c
> +++ b/drivers/staging/iio/addac/adt7316.c
> @@ -111,7 +111,6 @@
>  #define ADT7316_AD_SINGLE_CH_MODE	0x10
>  #define ADT7316_DISABLE_AVERAGING	0x20
>  #define ADT7316_EN_SMBUS_TIMEOUT	0x40
> -#define ADT7316_RESET			0x80
>  
>  /*
>   * ADT7316 config3
> @@ -154,7 +153,6 @@
>  /*
>   * ADT7316 value masks
>   */
> -#define ADT7316_VALUE_MASK		0xfff
>  #define ADT7316_T_VALUE_SIGN		0x400
>  #define ADT7316_T_VALUE_FLOAT_OFFSET	2
>  #define ADT7316_T_VALUE_FLOAT_MASK	0x2
> @@ -194,15 +192,6 @@ struct adt7316_chip_info {
>   * Logic interrupt mask for user application to enable
>   * interrupts.
>   */
> -#define ADT7316_IN_TEMP_HIGH_INT_MASK	0x1
> -#define ADT7316_IN_TEMP_LOW_INT_MASK	0x2
> -#define ADT7316_EX_TEMP_HIGH_INT_MASK	0x4
> -#define ADT7316_EX_TEMP_LOW_INT_MASK	0x8
> -#define ADT7316_EX_TEMP_FAULT_INT_MASK	0x10
> -#define ADT7516_AIN1_INT_MASK		0x4
> -#define ADT7516_AIN2_INT_MASK		0x20
> -#define ADT7516_AIN3_INT_MASK		0x40
> -#define ADT7516_AIN4_INT_MASK		0x80
>  #define ADT7316_VDD_INT_MASK		0x100
>  #define ADT7316_TEMP_INT_MASK		0x1F
>  #define ADT7516_AIN_INT_MASK		0xE0
> 


  reply	other threads:[~2026-01-31 15:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-31  7:38 [PATCH 0/2] correct macro issues Michael Harris
2026-01-31  7:38 ` [PATCH 1/2] staging: iio: adt7316: remove unused macros Michael Harris
2026-01-31 15:54   ` Jonathan Cameron [this message]
2026-01-31 19:12     ` Michael Harris
2026-01-31  7:38 ` [PATCH 2/2] staging: iio: adt7316: convert magic numbers to BIT() and GENMASK() Michael Harris
2026-01-31 16:21   ` Jonathan Cameron
2026-02-04  6:50     ` Michael Harris
2026-02-04 10:32     ` David Laight

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=20260131155413.28fcc701@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=michaelharriscode@gmail.com \
    --cc=nuno.sa@analog.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox