From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754268AbdJSPJZ (ORCPT ); Thu, 19 Oct 2017 11:09:25 -0400 Received: from verein.lst.de ([213.95.11.211]:43600 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbdJSPJX (ORCPT ); Thu, 19 Oct 2017 11:09:23 -0400 Date: Thu, 19 Oct 2017 17:09:21 +0200 From: Christoph Hellwig To: Mark Greer Cc: Huacai Chen , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Andrew Morton , Fuxin Zhang , linux-kernel@vger.kernel.org, Ralf Baechle , James Hogan , linux-mips@linux-mips.org, "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org, Tejun Heo , linux-ide@vger.kernel.org, stable@vger.kernel.org, "Michael S . Tsirkin" , Pawel Osciak , Kyungmin Park , Michael Chan , Benjamin Herrenschmidt , Ivan Mikhaylov , Tariq Toukan , Andy Gross , Robert Baldyga Subject: Re: [PATCH V8 1/5] dma-mapping: Rework dma_get_cache_alignment() Message-ID: <20171019150921.GB24204@lst.de> References: <1508227542-13165-1-git-send-email-chenhc@lemote.com> <20171018172336.GA29358@animalcreek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171018172336.GA29358@animalcreek.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 18, 2017 at 10:23:36AM -0700, Mark Greer wrote: > > #define MPSC_RXR_ENTRIES 32 > > -#define MPSC_RXRE_SIZE dma_get_cache_alignment() > > +#define MPSC_RXRE_SIZE dma_get_cache_alignment(dma_dev) > > I would much prefer that you add a parameter to the macro to avoid forcing > a non-flexible and non-obvious variable definition wherever it is used. > What I mean is something like: > > #define MPSC_RXRE_SIZE(d) dma_get_cache_alignment(d) > > Similarly for all of the other macros and where they're used. Agreed. Except for that the patch looks fine to me, though.