From: Robin Murphy Subject: Re: [PATCH 4/5] dma-direct: implement complete bus_dma_mask handling Date: Thu, 27 Sep 2018 17:41:36 +0100 Message-ID: References: <20180920185247.20037-1-hch@lst.de> <20180920185247.20037-5-hch@lst.de> <20180927153252.GE10566@lst.de> <967e98b1-99ab-8f95-4c89-6156ce489b93@arm.com> <20180927162737.GA11974@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180927162737.GA11974-jcswGhMUV9g@public.gmane.org> Content-Language: en-GB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Christoph Hellwig Cc: Benjamin Herrenschmidt , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Greg Kroah-Hartman , linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: iommu@lists.linux-foundation.org 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.