Re: [PATCH RFC 51/51] ARM: 7805/1: mm: change max*pfn to include the physical offset of memory

Russell King - ARM Linux
2013-08-06T08:51:49Z

On Mon, Aug 05, 2013 at 10:15:11PM -0500, Rob Herring wrote:
> On Thu, Aug 1, 2013 at 5:25 PM, Santosh Shilimkar
> <santosh.shilimkar@ti.com> wrote:
> > +/* The ARM override for dma_max_pfn() */
> > +static inline unsigned long dma_max_pfn(struct device *dev)
> > +{
> > + return PHYS_PFN_OFFSET + dma_to_pfn(dev, *dev->dma_mask);
>
> Do we need to handle dev == NULL case?

No, look at where it's used and the code it's replacing. You'll find
that its callsites handle the dev = NULL case.