lkml.org 
[lkml]   [2018]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/5] dma-direct: implement complete bus_dma_mask handling
From
Date
On 27/09/18 17:27, Christoph Hellwig wrote:
> On Thu, Sep 27, 2018 at 05:14:56PM +0100, Robin Murphy wrote:
>>> This just seemed more readable to me than min_not_zero, but if others
>>> prefer min_not_zero I can switch.
>>
>> Nah, just checking whether there were any intentionally different
>> assumptions compared to the couple of other places in the patch where
>> min_not_zero() *is* used. If it's purely a style thing then no worries
>> (personally I'd have written it yet another way anyway).
>
> I'm curious: how would you have written it?

Come to think of it, I actually already have, in iommu-dma:

if (dev->bus_dma_mask)
mask &= dev->bus_dma_mask;

but of course it's not so pretty for those cases where you don't already
have the local variable ready to go.

Robin.

\
 
 \ /
  Last update: 2018-09-27 18:42    [W:0.064 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site