lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180102175016.GA15928@localhost.localdomain>
Date:   Tue, 2 Jan 2018 09:50:18 -0800
From:   Eduardo Valentin <edubezval@...il.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Geert Uytterhoeven <geert@...ux-m68k.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Kevin Wangtao <kevin.wangtao@...aro.org>,
        linux-pm@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] thermal/drivers/hisi: Remove bogus const from function
 return type

On Tue, Jan 02, 2018 at 12:44:29PM +0100, Arnd Bergmann wrote:
> On Sun, Nov 19, 2017 at 12:04 PM, Geert Uytterhoeven
> <geert@...ux-m68k.org> 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 <geert@...ux-m68k.org>
> 
> 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

Yeah, this is correct. I do not see the same warn while using gcc-4.8.

> 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.

I agree.

> 
>          Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ