[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqKyRby5tp2JS1COodYf7F7sB_DJivyAe7FqQivp4KM6OA@mail.gmail.com>
Date: Fri, 16 Oct 2020 08:19:47 -0500
From: Rob Herring <robh+dt@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
Catalin Marinas <catalin.marinas@....com>,
Ard Biesheuvel <ardb@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Frank Rowand <frowand.list@...il.com>,
Robin Murphy <robin.murphy@....com>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
"moderated list:BROADCOM BCM2835 ARM ARCHITECTURE"
<linux-rpi-kernel@...ts.infradead.org>,
Jeremy Linton <jeremy.linton@....com>,
Linux IOMMU <iommu@...ts.linux-foundation.org>,
devicetree@...r.kernel.org
Subject: Re: [PATCH v3 3/8] of/address: Introduce of_dma_get_max_cpu_address()
On Thu, Oct 15, 2020 at 12:42 AM Christoph Hellwig <hch@....de> wrote:
>
> > +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.
I prefer that of_root is not more widely exposed and NULL regularly
means 'the whole tree'.
Rob
Powered by blists - more mailing lists