All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-kernel@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH] hwmon: constify struct hwmon_chip_info info member harder
Date: Thu, 09 Mar 2023 13:14:28 +0200	[thread overview]
Message-ID: <87h6uu9nxn.fsf@intel.com> (raw)
In-Reply-To: <e0579cbe-cbd6-46cf-b425-234cfed4ff00@roeck-us.net>

On Thu, 09 Mar 2023, Guenter Roeck <linux@roeck-us.net> wrote:
> On Thu, Mar 09, 2023 at 10:28:41AM +0200, Jani Nikula wrote:
>> Let the struct hwmon_chip_info info member be a pointer to a const array
>> of const pointers, rather than mutable array of const pointers.
>> 
>> Cc: Jean Delvare <jdelvare@suse.com>
>> Cc: Guenter Roeck <linux@roeck-us.net>
>> Cc: linux-hwmon@vger.kernel.org
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  include/linux/hwmon.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h
>> index c1b62384b6ee..492dd27a5dd8 100644
>> --- a/include/linux/hwmon.h
>> +++ b/include/linux/hwmon.h
>> @@ -430,7 +430,7 @@ struct hwmon_channel_info {
>>   */
>>  struct hwmon_chip_info {
>>  	const struct hwmon_ops *ops;
>> -	const struct hwmon_channel_info **info;
>> +	const struct hwmon_channel_info * const *info;
>
> As pointed out by 0-day, you's also have to change each
> instance where this is is assigned to another variable.

Ah, sorry, I had THERMAL_OF=n.

BR,
Jani.


>
> Guenter
>
>>  };
>>  
>>  /* hwmon_device_register() is deprecated */
>> -- 
>> 2.39.1
>> 

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-03-09 11:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09  8:28 [PATCH] hwmon: constify struct hwmon_chip_info info member harder Jani Nikula
2023-03-09 10:53 ` kernel test robot
2023-03-09 11:06 ` Guenter Roeck
2023-03-09 11:14   ` Jani Nikula [this message]
2023-03-09 16:13     ` Guenter Roeck
2023-03-09 16:41       ` Jani Nikula
2023-03-09 11:44 ` kernel test robot

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=87h6uu9nxn.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.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.