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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 26 Dec 2017 12:03:10 +0530
From:   Arvind Yadav <arvind.yadav.cs@...il.com>
To:     nsekhar@...com, khilman@...nel.org, linux@...linux.org.uk,
        kaloz@...nwrt.org, khalasa@...p.pl, aaro.koskinen@....fi,
        tony@...mide.com, jason@...edaemon.net, andrew@...n.ch,
        sebastian.hesselbarth@...il.com,
        gregory.clement@...e-electrons.com, daniel@...que.org,
        haojian.zhuang@...il.com, marek.vasut@...il.com,
        slapin@...fans.org, jic23@....ac.uk, kgene@...nel.org,
        krzk@...nel.org, ralf@...ux-mips.org, ysato@...rs.sourceforge.jp,
        dalias@...c.org, tglx@...utronix.de, mingo@...hat.com,
        hpa@...or.com, linux-mips@...ux-mips.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH 03/11 v2] MIPS: TXX9: constify gpio_led

gpio_led are not supposed to change at runtime.
struct gpio_led_platform_data working with const gpio_led
provided by <linux/leds.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
changes in v2:
              The GPIO LED driver can be built as a module, it can
              be loaded after the init sections have gone away.
              So removed '__initconst'.

 arch/mips/txx9/rbtx4927/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/txx9/rbtx4927/setup.c b/arch/mips/txx9/rbtx4927/setup.c
index f5b367e..31955c1 100644
--- a/arch/mips/txx9/rbtx4927/setup.c
+++ b/arch/mips/txx9/rbtx4927/setup.c
@@ -319,7 +319,7 @@ static void __init rbtx4927_mtd_init(void)
 
 static void __init rbtx4927_gpioled_init(void)
 {
-	static struct gpio_led leds[] = {
+	static const struct gpio_led leds[] = {
 		{ .name = "gpioled:green:0", .gpio = 0, .active_low = 1, },
 		{ .name = "gpioled:green:1", .gpio = 1, .active_low = 1, },
 	};
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ