linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Jani Nikula <jani.nikula@intel.com>
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, 9 Mar 2023 03:06:16 -0800	[thread overview]
Message-ID: <e0579cbe-cbd6-46cf-b425-234cfed4ff00@roeck-us.net> (raw)
In-Reply-To: <20230309082841.400118-1-jani.nikula@intel.com>

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.

Guenter

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

  parent reply	other threads:[~2023-03-09 11:12 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 [this message]
2023-03-09 11:14   ` Jani Nikula
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=e0579cbe-cbd6-46cf-b425-234cfed4ff00@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jani.nikula@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).