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]
Date:	Tue,  8 Nov 2011 11:44:26 +0000
From:	Andy Whitcroft <apw@...onical.com>
To:	Grant Likely <grant.likely@...retlab.ca>,
	Rob Herring <rob.herring@...xeda.com>,
	devicetree-discuss@...ts.ozlabs.org
Cc:	linux-kernel@...r.kernel.org,
	Linux Torvalds <torvalds@...ux-foundation.org>,
	Andy Whitcroft <apw@...onical.com>
Subject: [PATCH 1/1] of: define NO_IRQ globally when not supplied by the architecture

Since the application of the commit below the PATA OF platform driver
may now be built on x86 systems:

  ata: Make pata_of_platform.c compile again and work on non-PPC platforms

This leads to the following build failure on 32bit x86 builds:

  .../drivers/ata/pata_of_platform.c: In function 'pata_of_platform_probe':
  .../drivers/ata/pata_of_platform.c:55: error: 'NO_IRQ' undeclared
					(first use in this function)

This occurs because x86 does not supply a definition for NO_IRQ.
However if we examine drivers/of/irq.c we already supply a default value
for NO_IRQ where not specified by the architecture.  Fix the build failure
by pulling this default value up to include/linux/of_irq.h.

Signed-off-by: Andy Whitcroft <apw@...onical.com>
---
 drivers/of/irq.c       |    5 -----
 include/linux/of_irq.h |    5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 6d3dd39..0208e27 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -26,11 +26,6 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 
-/* For archs that don't support NO_IRQ (such as x86), provide a dummy value */
-#ifndef NO_IRQ
-#define NO_IRQ 0
-#endif
-
 /**
  * irq_of_parse_and_map - Parse and map an interrupt into linux virq space
  * @device: Device node of the device whose interrupt is to be mapped
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index d0307ee..8b2369f 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -77,6 +77,11 @@ extern struct device_node *of_irq_find_parent(struct device_node *child);
 
 extern void of_irq_init(const struct of_device_id *matches);
 
+/* For archs that don't support NO_IRQ (such as x86), provide a dummy value */
+#ifndef NO_IRQ
+#define NO_IRQ 0
+#endif
+
 #endif /* CONFIG_OF_IRQ */
 #endif /* CONFIG_OF */
 #endif /* __OF_IRQ_H */
-- 
1.7.5.4

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