From: Eduardo Valentin <edubezval@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Zhang Rui <rui.zhang@intel.com>,
Kevin Wangtao <kevin.wangtao@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: thermal/drivers/hisi: Remove bogus const from function return type
Date: Mon, 1 Jan 2018 10:21:26 -0800 [thread overview]
Message-ID: <20180101182123.GA3753@localhost.localdomain> (raw)
In-Reply-To: <1511089467-20525-1-git-send-email-geert@linux-m68k.org>
Hello Geert,
On Sun, Nov 19, 2017 at 12:04:27PM +0100, Geert Uytterhoeven wrote:
> With gcc-4.1.2:
>
> drivers/thermal/hisi_thermal.c: In function ‘hisi_thermal_probe’:
> drivers/thermal/hisi_thermal.c:530: warning: type qualifiers ignored on function return type
>
> Remove the "const" keyword to fix this.
Interesting.
I intentionally asked Daniel to include the modifier because sparse
pointed this to me:
This patch adds this issue to hisi driver (sparse)
drivers/thermal/hisi_thermal.c:398:24: warning: incorrect type in assignment (different modifiers)
drivers/thermal/hisi_thermal.c:398:24: expected int ( *platform_probe )( ... )
drivers/thermal/hisi_thermal.c:398:24: got void const *
which makes sense to me to be const, given that it is receiving the return
of a function which returns a const void *.
nclude/linux/of_device.h:extern const void *of_device_get_match_data(const struct device *dev);
Cheers,
next prev parent reply other threads:[~2018-01-01 18:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-19 11:04 [PATCH] thermal/drivers/hisi: Remove bogus const from function return type Geert Uytterhoeven
2018-01-01 18:21 ` Eduardo Valentin [this message]
2018-01-02 7:36 ` Geert Uytterhoeven
2018-01-02 11:44 ` [PATCH] " Arnd Bergmann
2018-01-02 17:50 ` Eduardo Valentin
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=20180101182123.GA3753@localhost.localdomain \
--to=edubezval@gmail.com \
--cc=arnd@arndb.de \
--cc=geert@linux-m68k.org \
--cc=kevin.wangtao@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
/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).