Thread (35 messages) 35 messages, 8 authors, 2020-10-16

Re: [PATCH v3 3/8] of/address: Introduce of_dma_get_max_cpu_address()

From: Christoph Hellwig <hch@lst.de>
Date: 2020-10-15 05:42:50
Also in: linux-devicetree, linux-iommu, lkml

+phys_addr_t __init of_dma_get_max_cpu_address(struct device_node *np)
+{
+	phys_addr_t max_cpu_addr = PHYS_ADDR_MAX;
+	struct of_range_parser parser;
+	phys_addr_t subtree_max_addr;
+	struct device_node *child;
+	phys_addr_t cpu_end = 0;
+	struct of_range range;
+	const __be32 *ranges;
+	int len;
+
+	if (!np)
+		np = of_root;
Requiring of_root to be passed explicitly would seem more natural
to me than the magic NULL argument.  There doesn't seem to be any
precedent for that kind of calling convention either.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help