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-next>] [day] [month] [year] [list]
Date:	Wed, 4 Mar 2015 04:55:06 +0800
From:	Chen Gang <xili_gchen_5257@...mail.com>
To:	msalter@...hat.com, a-jacquiot@...com
CC:	robh@...nel.org,
	"linux-c6x-dev@...ux-c6x.org" <linux-c6x-dev@...ux-c6x.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] c6x: kernel: setup: Remove 'const' for local variables
 in machine_init

early_init_dt_scan() accepts "void *", the related warning:

    CC      arch/c6x/kernel/setup.o
  arch/c6x/kernel/setup.c: In function 'machine_init':
  arch/c6x/kernel/setup.c:290:21: warning: passing argument 1 of 'early_init_dt_scan' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    early_init_dt_scan(fdt);
                       ^
  In file included from arch/c6x/kernel/setup.c:19:0:
  include/linux/of_fdt.h:75:13: note: expected 'void *' but argument is of type 'const void *'
   extern bool early_init_dt_scan(void *params);
               ^

Signed-off-by: Chen Gang <gang.chen.5i5j@...il.com>
---
 arch/c6x/kernel/setup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c
index f016128..1d9f399 100644
--- a/arch/c6x/kernel/setup.c
+++ b/arch/c6x/kernel/setup.c
@@ -265,8 +265,8 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size)
  */
 notrace void __init machine_init(unsigned long dt_ptr)
 {
-	const void *dtb = __va(dt_ptr);
-	const void *fdt = _fdt_start;
+	void *dtb = __va(dt_ptr);
+	void *fdt = _fdt_start;
 
 	/* interrupts must be masked */
 	set_creg(IER, 2);
-- 
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ