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]
Message-Id: <1387815830-8794-8-git-send-email-pawel.moll@arm.com>
Date:	Mon, 23 Dec 2013 16:23:39 +0000
From:	Pawel Moll <pawel.moll@....com>
To:	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Cc:	Samuel Ortiz <sameo@...ux.intel.com>,
	Arnd Bergmann <arnd@...db.de>, Jon Medhurst <tixy@...aro.org>,
	arm@...nel.org, Olof Johansson <olof@...om.net>,
	Pawel Moll <pawel.moll@....com>,
	Mark Brown <broonie@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [RFC 07/18] regmap: debugfs: Always create "registers" & "access" files

When a map covers a single register, max_register is equal
to 0, so the "registers" & "access" files were not created.

This patch is removing this restriction. It should be save,
as the maps not without register 0 should return false
for regmap_readable(map, 0).

Signed-off-by: Pawel Moll <pawel.moll@....com>
Cc: Mark Brown <broonie@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
 drivers/base/regmap/regmap-debugfs.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index c5471cd..17cd35a 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -511,12 +511,10 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
 	debugfs_create_file("range", 0400, map->debugfs,
 			    map, &regmap_reg_ranges_fops);
 
-	if (map->max_register) {
-		debugfs_create_file("registers", 0400, map->debugfs,
-				    map, &regmap_map_fops);
-		debugfs_create_file("access", 0400, map->debugfs,
-				    map, &regmap_access_fops);
-	}
+	debugfs_create_file("registers", 0400, map->debugfs,
+			map, &regmap_map_fops);
+	debugfs_create_file("access", 0400, map->debugfs,
+			map, &regmap_access_fops);
 
 	if (map->cache_type) {
 		debugfs_create_bool("cache_only", 0400, map->debugfs,
-- 
1.8.3.2


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