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]
Date:	Thu, 20 Aug 2015 13:51:15 +0300
From:	Tomi Valkeinen <tomi.valkeinen@...com>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>,
	Rob Herring <robh@...nel.org>
CC:	<linux-kernel@...r.kernel.org>, <linux-fbdev@...r.kernel.org>,
	Nicolas Ferre <nicolas.ferre@...el.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>
Subject: Re: [PATCH] video: fbdev: atmel: fix warning for const return value


On 07/08/15 08:22, Sudip Mukherjee wrote:
> On Mon, Jul 27, 2015 at 10:41:41AM -0500, Rob Herring wrote:
>> A const on a return value is meaningless and generates a warning on some
>> versions of gcc:
>>
>> drivers/video/fbdev/atmel_lcdfb.c:1003: warning: type qualifiers ignored on function return type
> maybe this one should have been static instead of const.

I think that makes sense. I will apply the following patch instead of Rob's,
if no one complains.

Author: Tomi Valkeinen <tomi.valkeinen@...com>
Date:   Thu Aug 20 13:46:10 2015 +0300

    video: fbdev: atmel: fix warning for const return value
    
    A const on a return value is meaningless and generates a warning on some
    versions of gcc:
    
    drivers/video/fbdev/atmel_lcdfb.c:1003: warning: type qualifiers ignored on function return type
    
    The function in question is only used inside the .c file, so the author
    of the code most likely means "static" instead of "const".
    
    Change the const to static.
    
    Reported-by: Fengguang Wu <fengguang.wu@...el.com>
    Cc: Nicolas Ferre <nicolas.ferre@...el.com>
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@...com>

diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index abadc490fa1f..016cae1425a4 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -999,7 +999,7 @@ static const char *atmel_lcdfb_wiring_modes[] = {
 	[ATMEL_LCDC_WIRING_RGB]	= "RGB",
 };
 
-const int atmel_lcdfb_get_of_wiring_modes(struct device_node *np)
+static int atmel_lcdfb_get_of_wiring_modes(struct device_node *np)
 {
 	const char *mode;
 	int err, i;


Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ