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]
Message-Id: <20210523022807.5193-1-rdunlap@infradead.org>
Date:   Sat, 22 May 2021 19:28:07 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     linux-kernel@...r.kernel.org
Cc:     Randy Dunlap <rdunlap@...radead.org>,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        devicetree@...r.kernel.org,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>
Subject: [PATCH] OF: of_address: clean up OF stub functions

Adjust <linux/of_address.h> so that stubs are present when
CONFIG_OF is not set *or* OF is set but OF_ADDRESS is not set.

This eliminates 2 build errors on arch/s390/ when HAS_IOMEM
is not set (so OF_ADDRESS is not set).
I.e., it provides a stub for of_iomap() when one was previously
not provided as well as removing some duplicate stubs.

s390-linux-ld: drivers/irqchip/irq-al-fic.o: in function `al_fic_init_dt':
irq-al-fic.c:(.init.text+0x7a): undefined reference to `of_iomap'
s390-linux-ld: drivers/clocksource/timer-of.o: in function `timer_of_init':
timer-of.c:(.init.text+0xa4): undefined reference to `of_iomap'

Tested with many randconfig builds, but there could still be some
hidden problem here.

Fixes: 4acf4b9cd453 ("of: move of_address_to_resource and of_iomap declarations from sparc")
Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
Cc: Rob Herring <robh+dt@...nel.org>
Cc: Frank Rowand <frowand.list@...il.com>
Cc: devicetree@...r.kernel.org
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>
---
 include/linux/of_address.h |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- linux-next-20210521.orig/include/linux/of_address.h
+++ linux-next-20210521/include/linux/of_address.h
@@ -106,11 +106,7 @@ static inline bool of_dma_is_coherent(st
 }
 #endif /* CONFIG_OF_ADDRESS */
 
-#ifdef CONFIG_OF
-extern int of_address_to_resource(struct device_node *dev, int index,
-				  struct resource *r);
-void __iomem *of_iomap(struct device_node *node, int index);
-#else
+#if defined(CONFIG_OF) && !defined(CONFIG_OF_ADDRESS) || !defined(CONFIG_OF)
 static inline int of_address_to_resource(struct device_node *dev, int index,
 					 struct resource *r)
 {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ