[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130122210029.GA13324@avionic-0098.adnet.avionic-design.de>
Date: Tue, 22 Jan 2013 22:00:29 +0100
From: Thierry Reding <thierry.reding@...onic-design.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Arnd Bergmann <arnd@...db.de>,
Wolfram Sang <w.sang@...gutronix.de>
Subject: Re: [PATCH 01/33] lib: devres: Introduce devm_ioremap_resource()
On Tue, Jan 22, 2013 at 09:40:43AM -0800, Greg Kroah-Hartman wrote:
> On Mon, Jan 21, 2013 at 11:08:54AM +0100, Thierry Reding wrote:
> > The devm_request_and_ioremap() function is very useful and helps avoid a
> > whole lot of boilerplate. However, one issue that keeps popping up is
> > its lack of a specific error code to determine which of the steps that
> > it performs failed. Furthermore, while the function gives an example and
> > suggests what error code to return on failure, a wide variety of error
> > codes are used throughout the tree.
> >
> > In an attempt to fix these problems, this patch adds a new function that
> > drivers can transition to. The devm_ioremap_resource() returns a pointer
> > to the remapped I/O memory on success or an ERR_PTR() encoded error code
> > on failure. Callers can check for failure using IS_ERR() and determine
> > its cause by extracting the error code using PTR_ERR().
> >
> > devm_request_and_ioremap() is implemented as a wrapper around the new
> > API and return NULL on failure as before. This ensures that backwards
> > compatibility is maintained until all users have been converted to the
> > new API, at which point the old devm_request_and_ioremap() function
> > should be removed. To help prevent new users from being added in the
> > meantime, devm_request_and_ioremap() is marked __deprecated.
>
> I've edited the patch and removed the __depreciated line as that's just
> going to cause a whole lot of noise in the kernel. I'd recommend just
> watching to ensure that we catch all users of the current function and
> convert them to the new one, and then we can drop it, no need to use
> __deprecated at all.
Okay, works for me. Both grep and the semantic patch can easily find
users of the current function.
Thierry
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists