lkml.org 
[lkml]   [2013]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/33] lib: devres: Introduce devm_ioremap_resource()
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.

thanks,

greg k-h


\
 
 \ /
  Last update: 2013-01-22 19:21    [W:1.489 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site