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 08:13:18 -0800 [thread overview]
Message-ID: <2f0a6217-3747-4493-90e6-8fb129cb6a34@roeck-us.net> (raw)
In-Reply-To: <87h6uu9nxn.fsf@intel.com>
On Thu, Mar 09, 2023 at 01:14:28PM +0200, Jani Nikula wrote:
> 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.
>
You also didn't test compile drivers/hwmon/hwmon.c.
I had wondered about that, and 0-day now confirmed it.
Guenter
> BR,
> Jani.
>
>
> >
> > Guenter
> >
> >> };
> >>
> >> /* hwmon_device_register() is deprecated */
> >> --
> >> 2.39.1
> >>
>
> --
> Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-03-09 16:24 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
2023-03-09 16:13 ` Guenter Roeck [this message]
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=2f0a6217-3747-4493-90e6-8fb129cb6a34@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).