All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jean-François Dagenais" <jeff.dagenais@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Zhang Rui <rui.zhang@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Amit Kucheria <amitk@kernel.org>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Thara Gopinath <thara.gopinath@linaro.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] thermal: fix thermal_cooling_device_register() prototype
Date: Mon, 26 Jul 2021 10:00:18 -0400	[thread overview]
Message-ID: <ABDAFCAB-8DF5-41A7-B1E0-4953A9BF32B3@gmail.com> (raw)
In-Reply-To: <20210722090717.1116748-1-arnd@kernel.org>

Good job.

> On Jul 22, 2021, at 05:06, Arnd Bergmann <arnd@kernel.org> wrote:
> 
> From: Arnd Bergmann <arnd@arndb.de>
> 
> There are two pairs of declarations for thermal_cooling_device_register()
> and thermal_of_cooling_device_register(), and only one set was changed
> in a recent patch, so the other one now causes a compile-time warning:
> 
> drivers/net/wireless/mediatek/mt76/mt7915/init.c: In function 'mt7915_thermal_init':
> drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:48: error: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>  134 |         cdev = thermal_cooling_device_register(wiphy_name(wiphy), phy,
>      |                                                ^~~~~~~~~~~~~~~~~
> In file included from drivers/net/wireless/mediatek/mt76/mt7915/init.c:7:
> include/linux/thermal.h:407:39: note: expected 'char *' but argument is of type 'const char *'
>  407 | thermal_cooling_device_register(char *type, void *devdata,
>      |                                 ~~~~~~^~~~
> 
> Change the dummy helper functions to have the same arguments as the
> normal version.
> 
> Fixes: f991de53a8ab ("thermal: make device_register's type argument const")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
> ---
> include/linux/thermal.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index d296f3b88fb9..8050d929a5b4 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -404,12 +404,13 @@ static inline void thermal_zone_device_unregister(
> 	struct thermal_zone_device *tz)
> { }
> static inline struct thermal_cooling_device *
> -thermal_cooling_device_register(char *type, void *devdata,
> +thermal_cooling_device_register(const char *type, void *devdata,
> 	const struct thermal_cooling_device_ops *ops)
> { return ERR_PTR(-ENODEV); }
> static inline struct thermal_cooling_device *
> thermal_of_cooling_device_register(struct device_node *np,
> -	char *type, void *devdata, const struct thermal_cooling_device_ops *ops)
> +	const char *type, void *devdata,
> +	const struct thermal_cooling_device_ops *ops)
> { return ERR_PTR(-ENODEV); }
> static inline struct thermal_cooling_device *
> devm_thermal_of_cooling_device_register(struct device *dev,
> -- 
> 2.29.2
> 


WARNING: multiple messages have this Message-ID (diff)
From: "Jean-François Dagenais" <jeff.dagenais@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Zhang Rui <rui.zhang@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Amit Kucheria <amitk@kernel.org>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Thara Gopinath <thara.gopinath@linaro.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] thermal: fix thermal_cooling_device_register() prototype
Date: Mon, 26 Jul 2021 10:00:18 -0400	[thread overview]
Message-ID: <ABDAFCAB-8DF5-41A7-B1E0-4953A9BF32B3@gmail.com> (raw)
In-Reply-To: <20210722090717.1116748-1-arnd@kernel.org>

Good job.

> On Jul 22, 2021, at 05:06, Arnd Bergmann <arnd@kernel.org> wrote:
> 
> From: Arnd Bergmann <arnd@arndb.de>
> 
> There are two pairs of declarations for thermal_cooling_device_register()
> and thermal_of_cooling_device_register(), and only one set was changed
> in a recent patch, so the other one now causes a compile-time warning:
> 
> drivers/net/wireless/mediatek/mt76/mt7915/init.c: In function 'mt7915_thermal_init':
> drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:48: error: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>  134 |         cdev = thermal_cooling_device_register(wiphy_name(wiphy), phy,
>      |                                                ^~~~~~~~~~~~~~~~~
> In file included from drivers/net/wireless/mediatek/mt76/mt7915/init.c:7:
> include/linux/thermal.h:407:39: note: expected 'char *' but argument is of type 'const char *'
>  407 | thermal_cooling_device_register(char *type, void *devdata,
>      |                                 ~~~~~~^~~~
> 
> Change the dummy helper functions to have the same arguments as the
> normal version.
> 
> Fixes: f991de53a8ab ("thermal: make device_register's type argument const")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
> ---
> include/linux/thermal.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index d296f3b88fb9..8050d929a5b4 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -404,12 +404,13 @@ static inline void thermal_zone_device_unregister(
> 	struct thermal_zone_device *tz)
> { }
> static inline struct thermal_cooling_device *
> -thermal_cooling_device_register(char *type, void *devdata,
> +thermal_cooling_device_register(const char *type, void *devdata,
> 	const struct thermal_cooling_device_ops *ops)
> { return ERR_PTR(-ENODEV); }
> static inline struct thermal_cooling_device *
> thermal_of_cooling_device_register(struct device_node *np,
> -	char *type, void *devdata, const struct thermal_cooling_device_ops *ops)
> +	const char *type, void *devdata,
> +	const struct thermal_cooling_device_ops *ops)
> { return ERR_PTR(-ENODEV); }
> static inline struct thermal_cooling_device *
> devm_thermal_of_cooling_device_register(struct device *dev,
> -- 
> 2.29.2
> 


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: "Jean-François Dagenais" <jeff.dagenais@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Zhang Rui <rui.zhang@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Amit Kucheria <amitk@kernel.org>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Thara Gopinath <thara.gopinath@linaro.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] thermal: fix thermal_cooling_device_register() prototype
Date: Mon, 26 Jul 2021 10:00:18 -0400	[thread overview]
Message-ID: <ABDAFCAB-8DF5-41A7-B1E0-4953A9BF32B3@gmail.com> (raw)
In-Reply-To: <20210722090717.1116748-1-arnd@kernel.org>

Good job.

> On Jul 22, 2021, at 05:06, Arnd Bergmann <arnd@kernel.org> wrote:
> 
> From: Arnd Bergmann <arnd@arndb.de>
> 
> There are two pairs of declarations for thermal_cooling_device_register()
> and thermal_of_cooling_device_register(), and only one set was changed
> in a recent patch, so the other one now causes a compile-time warning:
> 
> drivers/net/wireless/mediatek/mt76/mt7915/init.c: In function 'mt7915_thermal_init':
> drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:48: error: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>  134 |         cdev = thermal_cooling_device_register(wiphy_name(wiphy), phy,
>      |                                                ^~~~~~~~~~~~~~~~~
> In file included from drivers/net/wireless/mediatek/mt76/mt7915/init.c:7:
> include/linux/thermal.h:407:39: note: expected 'char *' but argument is of type 'const char *'
>  407 | thermal_cooling_device_register(char *type, void *devdata,
>      |                                 ~~~~~~^~~~
> 
> Change the dummy helper functions to have the same arguments as the
> normal version.
> 
> Fixes: f991de53a8ab ("thermal: make device_register's type argument const")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
> ---
> include/linux/thermal.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index d296f3b88fb9..8050d929a5b4 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -404,12 +404,13 @@ static inline void thermal_zone_device_unregister(
> 	struct thermal_zone_device *tz)
> { }
> static inline struct thermal_cooling_device *
> -thermal_cooling_device_register(char *type, void *devdata,
> +thermal_cooling_device_register(const char *type, void *devdata,
> 	const struct thermal_cooling_device_ops *ops)
> { return ERR_PTR(-ENODEV); }
> static inline struct thermal_cooling_device *
> thermal_of_cooling_device_register(struct device_node *np,
> -	char *type, void *devdata, const struct thermal_cooling_device_ops *ops)
> +	const char *type, void *devdata,
> +	const struct thermal_cooling_device_ops *ops)
> { return ERR_PTR(-ENODEV); }
> static inline struct thermal_cooling_device *
> devm_thermal_of_cooling_device_register(struct device *dev,
> -- 
> 2.29.2
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-07-26 14:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22  9:06 [PATCH] thermal: fix thermal_cooling_device_register() prototype Arnd Bergmann
2021-07-22  9:06 ` Arnd Bergmann
2021-07-22  9:06 ` Arnd Bergmann
2021-07-26 14:00 ` Jean-François Dagenais [this message]
2021-07-26 14:00   ` Jean-François Dagenais
2021-07-26 14:00   ` Jean-François Dagenais
2021-09-09 14:38 ` [thermal: thermal/next] thermal/core: Fix " thermal-bot for Arnd Bergmann

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=ABDAFCAB-8DF5-41A7-B1E0-4953A9BF32B3@gmail.com \
    --to=jeff.dagenais@gmail.com \
    --cc=amitk@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=rui.zhang@intel.com \
    --cc=thara.gopinath@linaro.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.