[PATCH 1/2] dma-mapping: introduce dma_get_seg_boundary_nr_pages()

Christoph Hellwig hch at lst.de
Fri Sep 4 02:12:52 AEST 2020


On Thu, Sep 03, 2020 at 01:57:39PM +0300, Andy Shevchenko wrote:
> > +{
> > +       if (!dev)
> > +               return (U32_MAX >> page_shift) + 1;
> > +       return (dma_get_seg_boundary(dev) >> page_shift) + 1;
> 
> Can it be better to do something like
>   unsigned long boundary = dev ? dma_get_seg_boundary(dev) : U32_MAX;
> 
>   return (boundary >> page_shift) + 1;
> 
> ?

I don't really see what that would buy us.


More information about the Linuxppc-dev mailing list