From mboxrd@z Thu Jan 1 00:00:00 1970 From: Esben Haabendal Subject: Re: [PATCH 40/41] drivers: tty: serial: helper for setting mmio range Date: Mon, 29 Apr 2019 09:03:16 +0200 Message-ID: <87ef5lz423.fsf@haabendal.dk> References: <1556369542-13247-1-git-send-email-info@metux.net> <1556369542-13247-41-git-send-email-info@metux.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1556369542-13247-41-git-send-email-info@metux.net> (Enrico Weigelt's message of "Sat, 27 Apr 2019 14:52:21 +0200") Sender: linux-kernel-owner@vger.kernel.org To: "Enrico Weigelt, metux IT consult" Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, andrew@aj.id.au, andriy.shevchenko@linux.intel.com, macro@linux-mips.org, vz@mleia.com, slemieux.tyco@gmail.com, khilman@baylibre.com, liviu.dudau@arm.com, sudeep.holla@arm.com, lorenzo.pieralisi@arm.com, davem@davemloft.net, jacmet@sunsite.dk, linux@prisktech.co.nz, matthias.bgg@gmail.com, linux-mips@vger.kernel.org, linux-serial@vger.kernel.org, linux-ia64@vger.kernel.org, linux-amlogic@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org List-Id: linux-serial@vger.kernel.org "Enrico Weigelt, metux IT consult" writes: > Introduce a little helpers for settings the mmio range from an > struct resource or start/len parameters with less code. > (also setting iotype to UPIO_MEM) > > Also converting drivers to use these new helpers as well as > fetching mapsize field instead of using hardcoded values. > (the runtime overhead of that should be negligible) > > The idea is moving to a consistent scheme, so later common > calls like request+ioremap combination can be done by generic > helpers. Why not simply replace iobase, mapbase and mapsize with a struct resource value instead? Incidentally, that would allow to specify a memory resource with a parent memory resource :) /Esben