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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <765c6c8053679c45eb370255a110f7bc680a8f25.1209824033.git.monstr@monstr.eu>
Date:	Sat,  3 May 2008 16:22:11 +0200
From:	monstr@...nam.cz
To:	paulus@...ba.org
Cc:	arnd@...db.de, linux-kernel@...r.kernel.org,
	linux-arch@...r.kernel.org, Michal Simek <monstr@...str.eu>
Subject: [PATCH 1/2] OF: Fix coding style violation in of_device.c and of_platform.c

From: Michal Simek <monstr@...str.eu>


Signed-off-by: Michal Simek <monstr@...str.eu>
---
 arch/powerpc/kernel/of_device.c   |   25 ++++++++++++++-----------
 arch/powerpc/kernel/of_platform.c |    5 ++++-
 2 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index 5748ddb..db9ed02 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -8,7 +8,10 @@
 #include <linux/of_device.h>
 
 #include <asm/errno.h>
+
+#ifdef CONFIG_PPC_PSERIES
 #include <asm/dcr.h>
+#endif
 
 static void of_device_make_bus_id(struct of_device *dev)
 {
@@ -106,7 +109,7 @@ ssize_t of_device_get_modalias(struct of_device *ofdev,
 		return csize;
 
 	/* Find true end (we tolerate multiple \0 at the end */
-	for (i=(cplen-1); i>=0 && !compat[i]; i--)
+	for (i = (cplen-1); i >= 0 && !compat[i]; i--)
 		cplen--;
 	if (!cplen)
 		return csize;
@@ -116,26 +119,27 @@ ssize_t of_device_get_modalias(struct of_device *ofdev,
 	tsize = csize + cplen;
 	repend = tsize;
 
-	if (csize>=len)		/* @ the limit, all is already filled */
+	if (csize >= len)	/* @ the limit, all is already filled */
 		return tsize;
 
-	if (tsize>=len) {		/* limit compat list */
-		cplen = len-csize-1;
+	if (tsize >= len) {	/* limit compat list */
+		cplen = len - csize - 1;
 		repend = len;
 	}
 
 	/* Copy and do char replacement */
 	memcpy(&str[csize+1], compat, cplen);
-	for (i=csize; i<repend; i++) {
+	for (i = csize; i < repend; i++) {
 		char c = str[i];
-		if (c=='\0')
+		if (c == '\0')
 			str[i] = 'C';
-		else if (c==' ')
+		else if (c == ' ')
 			str[i] = '_';
 	}
 
 	return tsize;
 }
+EXPORT_SYMBOL(of_device_get_modalias);
 
 int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
 {
@@ -154,9 +158,9 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
 	if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type))
 		return -ENOMEM;
 
-        /* Since the compatible field can contain pretty much anything
-         * it's not really legal to split it out with commas. We split it
-         * up using a number of environment variables instead. */
+	/* Since the compatible field can contain pretty much anything
+	 * it's not really legal to split it out with commas. We split it
+	 * up using a number of environment variables instead. */
 
 	compat = of_get_property(ofdev->node, "compatible", &cplen);
 	while (compat && *compat && cplen > 0) {
@@ -184,4 +188,3 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
 	return 0;
 }
 EXPORT_SYMBOL(of_device_uevent);
-EXPORT_SYMBOL(of_device_get_modalias);
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index e79ad8a..cd9336e 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -26,9 +26,12 @@
 #include <asm/errno.h>
 #include <asm/topology.h>
 #include <asm/pci-bridge.h>
-#include <asm/ppc-pci.h>
 #include <asm/atomic.h>
 
+#ifdef CONFIG_PPC_PSERIES
+#include <asm/ppc-pci.h>
+#endif
+
 /*
  * The list of OF IDs below is used for matching bus types in the
  * system whose devices are to be exposed as of_platform_devices.
-- 
1.5.4.GIT

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