All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Cosmin Tanislav <demonsingur@gmail.com>
Cc: cosmin.tanislav@analog.com, Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/7] hwmon: (adt7x10) Use devm_hwmon_device_register_with_info
Date: Tue, 21 Dec 2021 19:08:56 -0800	[thread overview]
Message-ID: <ff8b73b0-0c28-e1f3-d254-ea03fb594ffc@roeck-us.net> (raw)
In-Reply-To: <20211221215841.2641417-4-demonsingur@gmail.com>

On 12/21/21 1:58 PM, Cosmin Tanislav wrote:
> From: Cosmin Tanislav <cosmin.tanislav@analog.com>
> 
[ ... ]

> +
> +static int adt7x10_read(struct device *dev, enum hwmon_sensor_types type,
> +			u32 attr, int channel, long *val)
> +{
> +	struct adt7x10_data *data = dev_get_drvdata(dev);
> +
> +	switch (attr) {
> +	case hwmon_temp_input:
> +		return adt7x10_temp_read(data, 0, val);
> +	case hwmon_temp_max:
> +		return adt7x10_temp_read(data, 1, val);
> +	case hwmon_temp_min:
> +		return adt7x10_temp_read(data, 2, val);
> +	case hwmon_temp_crit:
> +		return adt7x10_temp_read(data, 3, val);

Ok, so you want to keep using the internal "index" to indicate the
array position in the register cache. I _did_ specifically ask
to use defines for index values in this case. You did not explain
why you ignored this. So now you'll have to explain 1) why you
ignored my request and 2) why you want to keep the code as is.

And, _please_, add a To: recipient to your patches. I am getting
tired having to handle the fallout.

Guenter

  reply	other threads:[~2021-12-22  3:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 21:58 [PATCH v3 0/7] Refactor ADT7X10 Cosmin Tanislav
2021-12-21 21:58 ` [PATCH v3 1/7] hwmon: (adt7x10) Store bus_dev in private data Cosmin Tanislav
2021-12-21 21:58 ` [PATCH v3 2/7] hwmon: (adt7x10) Add device managed action for restoring config Cosmin Tanislav
2021-12-21 21:58 ` [PATCH v3 3/7] hwmon: (adt7x10) Use devm_hwmon_device_register_with_info Cosmin Tanislav
2021-12-22  3:08   ` Guenter Roeck [this message]
2021-12-22  6:35     ` Cosmin Tanislav
2021-12-22 17:07       ` Guenter Roeck
2021-12-21 21:58 ` [PATCH v3 4/7] hwmon: (adt7x10) Use devm_request_threaded_irq Cosmin Tanislav
2021-12-21 21:58 ` [PATCH v3 5/7] hwmon: (adt7x10) Remove empty driver removal callback Cosmin Tanislav
2021-12-21 21:58 ` [PATCH v3 6/7] hwmon: (adt7x10) Pass hwinfo dev to irq handler Cosmin Tanislav
2021-12-21 21:58 ` [PATCH v3 7/7] hwmon: (adt7x10) Use hwmon_notify_event Cosmin Tanislav

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=ff8b73b0-0c28-e1f3-d254-ea03fb594ffc@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=cosmin.tanislav@analog.com \
    --cc=demonsingur@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.