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>] [day] [month] [year] [list]
Message-ID: <20111124072207.GD14122@elgon.mountain>
Date:	Thu, 24 Nov 2011 10:22:08 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Greg Kroah-Hartman <gregkh@...e.de>,
	Alessandro Rubini <rubini@...dd.com>
Cc:	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] debugfs: remove unneeded cast in debugfs_print_regs32()

The cast here causes a Sparse warning:
fs/debugfs/file.c:561:42: warning: cast removes address space of expression
fs/debugfs/file.c:561:42: warning: incorrect type in argument 1 (different address spaces)
fs/debugfs/file.c:561:42:    expected void const volatile [noderef] <asn:2>*addr
fs/debugfs/file.c:561:42:    got void *<noident>

It's redundant to cast it to a (void *) anyway when it is already a
(void __iomem *).

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index e0a3a59..989f07f 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -558,7 +558,7 @@ int debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs,
 		if (prefix)
 			ret += seq_printf(s, "%s", prefix);
 		ret += seq_printf(s, "%s = 0x%08x\n", regs->name,
-				  readl((void *)(base + regs->offset)));
+				  readl(base + regs->offset));
 	}
 	return ret;
 }
--
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