[lkml]   [2018]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] thermal/drivers/hisi: Remove bogus const from function return type
On Sun, Nov 19, 2017 at 12:04 PM, 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.
> Fixes: a160a465297362c5 ("thermal/drivers/hisi: Prepare to add support for other hisi platforms")
> Signed-off-by: Geert Uytterhoeven <>

For future reference, this kind of warning shows up with gcc-4.2 as
well, but not with
gcc-4.3 or higher. I think in this case, both gcc and sparse fail to
provide helpful
feedback, but the code is probably better done using either a typedef
for the function
type, or with a structure containing the function pointer.


 \ /
  Last update: 2018-01-02 12:45    [W:0.052 / U:0.416 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site