public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Remove devm_request_and_ioremap()
@ 2014-06-19 18:48 Wolfram Sang
  2014-06-19 18:48 ` [PATCH 1/3] DRM: Armada: Use devm_ioremap_resource Wolfram Sang
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Wolfram Sang @ 2014-06-19 18:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, dri-devel, linux-doc

Pretty much a year ago, Tushar cleaned up a lot of deprecated uses of
devm_request_and_ioremap, yet some remains are still left. Remove the last two
users, and let the function rest in peace. I'd suggest that this series is
picked up as a whole to have that case finally closed. Greg? Are you interested
in picking it up?

   Wolfram


Tushar Behera (2):
  DRM: Armada: Use devm_ioremap_resource
  lib: devres: Remove deprecated devm_request_and_ioremap

Wolfram Sang (1):
  bus: brcmstb_gisb: Use devm_ioremap_resource

 Documentation/driver-model/devres.txt |  1 -
 drivers/bus/brcmstb_gisb.c            |  6 +++---
 drivers/gpu/drm/armada/armada_crtc.c  |  8 +++-----
 include/linux/device.h                |  2 --
 lib/devres.c                          | 28 ----------------------------
 5 files changed, 6 insertions(+), 39 deletions(-)

-- 
2.0.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] DRM: Armada: Use devm_ioremap_resource
  2014-06-19 18:48 [PATCH 0/3] Remove devm_request_and_ioremap() Wolfram Sang
@ 2014-06-19 18:48 ` Wolfram Sang
  2014-06-19 18:49 ` [PATCH 2/3] bus: brcmstb_gisb: " Wolfram Sang
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2014-06-19 18:48 UTC (permalink / raw)
  To: linux-kernel
  Cc: Tushar Behera, Wolfram Sang, Russell King, David Airlie,
	dri-devel

From: Tushar Behera <tushar.behera@linaro.org>

While at it, propagate the error code.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/gpu/drm/armada/armada_crtc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
index 81c34f949dfc..3aedf9e993e6 100644
--- a/drivers/gpu/drm/armada/armada_crtc.c
+++ b/drivers/gpu/drm/armada/armada_crtc.c
@@ -1039,11 +1039,9 @@ int armada_drm_crtc_create(struct drm_device *dev, unsigned num,
 	if (ret)
 		return ret;
 
-	base = devm_request_and_ioremap(dev->dev, res);
-	if (!base) {
-		DRM_ERROR("failed to ioremap register\n");
-		return -ENOMEM;
-	}
+	base = devm_ioremap_resource(dev->dev, res);
+	if (IS_ERR(base))
+		return PTR_ERR(base);
 
 	dcrtc = kzalloc(sizeof(*dcrtc), GFP_KERNEL);
 	if (!dcrtc) {
-- 
2.0.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] bus: brcmstb_gisb: Use devm_ioremap_resource
  2014-06-19 18:48 [PATCH 0/3] Remove devm_request_and_ioremap() Wolfram Sang
  2014-06-19 18:48 ` [PATCH 1/3] DRM: Armada: Use devm_ioremap_resource Wolfram Sang
@ 2014-06-19 18:49 ` Wolfram Sang
  2014-06-19 18:49 ` [PATCH 3/3] lib: devres: Remove deprecated devm_request_and_ioremap Wolfram Sang
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2014-06-19 18:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Wolfram Sang

From: Wolfram Sang <wsa@sang-engineering.com>

devm_request_and_ioremap is deprecated.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/bus/brcmstb_gisb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/brcmstb_gisb.c b/drivers/bus/brcmstb_gisb.c
index 6159b7752a64..f2cd6a2d40b4 100644
--- a/drivers/bus/brcmstb_gisb.c
+++ b/drivers/bus/brcmstb_gisb.c
@@ -212,9 +212,9 @@ static int brcmstb_gisb_arb_probe(struct platform_device *pdev)
 	mutex_init(&gdev->lock);
 	INIT_LIST_HEAD(&gdev->next);
 
-	gdev->base = devm_request_and_ioremap(&pdev->dev, r);
-	if (!gdev->base)
-		return -ENOMEM;
+	gdev->base = devm_ioremap_resource(&pdev->dev, r);
+	if (IS_ERR(gdev->base))
+		return PTR_ERR(gdev->base);
 
 	err = devm_request_irq(&pdev->dev, timeout_irq,
 				brcmstb_gisb_timeout_handler, 0, pdev->name,
-- 
2.0.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] lib: devres: Remove deprecated devm_request_and_ioremap
  2014-06-19 18:48 [PATCH 0/3] Remove devm_request_and_ioremap() Wolfram Sang
  2014-06-19 18:48 ` [PATCH 1/3] DRM: Armada: Use devm_ioremap_resource Wolfram Sang
  2014-06-19 18:49 ` [PATCH 2/3] bus: brcmstb_gisb: " Wolfram Sang
@ 2014-06-19 18:49 ` Wolfram Sang
  2014-06-19 18:50 ` [PATCH 0/3] Remove devm_request_and_ioremap() Wolfram Sang
  2014-06-20  2:36 ` Jingoo Han
  4 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2014-06-19 18:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Tushar Behera, Wolfram Sang, Randy Dunlap, linux-doc

From: Tushar Behera <tushar.behera@linaro.org>

Now that all the users of devm_request_and_ioremap have been converted
to use devm_ioremap_resource, remove it. Also remove the entries from
Documentation.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 Documentation/driver-model/devres.txt |  1 -
 include/linux/device.h                |  2 --
 lib/devres.c                          | 28 ----------------------------
 3 files changed, 31 deletions(-)

diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index 1525e30483fd..de6bc8c325e9 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -278,7 +278,6 @@ IOMAP
   devm_ioremap_nocache()
   devm_iounmap()
   devm_ioremap_resource() : checks resource, requests memory region, ioremaps
-  devm_request_and_ioremap() : obsoleted by devm_ioremap_resource()
   pcim_iomap()
   pcim_iounmap()
   pcim_iomap_table()	: array of mapped addresses indexed by BAR
diff --git a/include/linux/device.h b/include/linux/device.h
index af424acd393d..921fa0a74df6 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -631,8 +631,6 @@ extern unsigned long devm_get_free_pages(struct device *dev,
 extern void devm_free_pages(struct device *dev, unsigned long addr);
 
 void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res);
-void __iomem *devm_request_and_ioremap(struct device *dev,
-			struct resource *res);
 
 /* allows to add/remove a custom action to devres stack */
 int devm_add_action(struct device *dev, void (*action)(void *), void *data);
diff --git a/lib/devres.c b/lib/devres.c
index f562bf6ff71d..6a4aee8a3a7e 100644
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -142,34 +142,6 @@ void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res)
 }
 EXPORT_SYMBOL(devm_ioremap_resource);
 
-/**
- * devm_request_and_ioremap() - Check, request region, and ioremap resource
- * @dev: Generic device to handle the resource for
- * @res: resource to be handled
- *
- * Takes all necessary steps to ioremap a mem resource. Uses managed device, so
- * everything is undone on driver detach. Checks arguments, so you can feed
- * it the result from e.g. platform_get_resource() directly. Returns the
- * remapped pointer or NULL on error. Usage example:
- *
- *	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- *	base = devm_request_and_ioremap(&pdev->dev, res);
- *	if (!base)
- *		return -EADDRNOTAVAIL;
- */
-void __iomem *devm_request_and_ioremap(struct device *dev,
-				       struct resource *res)
-{
-	void __iomem *dest_ptr;
-
-	dest_ptr = devm_ioremap_resource(dev, res);
-	if (IS_ERR(dest_ptr))
-		return NULL;
-
-	return dest_ptr;
-}
-EXPORT_SYMBOL(devm_request_and_ioremap);
-
 #ifdef CONFIG_HAS_IOPORT_MAP
 /*
  * Generic iomap devres
-- 
2.0.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] Remove devm_request_and_ioremap()
  2014-06-19 18:48 [PATCH 0/3] Remove devm_request_and_ioremap() Wolfram Sang
                   ` (2 preceding siblings ...)
  2014-06-19 18:49 ` [PATCH 3/3] lib: devres: Remove deprecated devm_request_and_ioremap Wolfram Sang
@ 2014-06-19 18:50 ` Wolfram Sang
  2014-06-20  2:36 ` Jingoo Han
  4 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2014-06-19 18:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: dri-devel, linux-doc, Greg KH

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

On Thu, Jun 19, 2014 at 08:48:58PM +0200, Wolfram Sang wrote:
> Pretty much a year ago, Tushar cleaned up a lot of deprecated uses of
> devm_request_and_ioremap, yet some remains are still left. Remove the last two
> users, and let the function rest in peace. I'd suggest that this series is
> picked up as a whole to have that case finally closed. Greg? Are you interested
> in picking it up?

Note to self: Add Greg to CC list when asking him...


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] Remove devm_request_and_ioremap()
  2014-06-19 18:48 [PATCH 0/3] Remove devm_request_and_ioremap() Wolfram Sang
                   ` (3 preceding siblings ...)
  2014-06-19 18:50 ` [PATCH 0/3] Remove devm_request_and_ioremap() Wolfram Sang
@ 2014-06-20  2:36 ` Jingoo Han
  2014-06-20  2:59   ` 'Greg Kroah-Hartman'
  4 siblings, 1 reply; 10+ messages in thread
From: Jingoo Han @ 2014-06-20  2:36 UTC (permalink / raw)
  To: 'Wolfram Sang', linux-kernel
  Cc: linux-doc, dri-devel, 'Greg Kroah-Hartman',
	'Jingoo Han'

On Friday, June 20, 2014 3:49 AM, Wolfram Sang wrote:
> 
> Pretty much a year ago, Tushar cleaned up a lot of deprecated uses of
> devm_request_and_ioremap, yet some remains are still left. Remove the last two
> users, and let the function rest in peace. I'd suggest that this series is
> picked up as a whole to have that case finally closed. Greg? Are you interested
> in picking it up?

(+cc Greg Kroah-Hartman)

I already sent the same patch as one single patch to Greg Kroah-Hartman. [1]
Also, it was accepted by Greg Kroah-Hartman. [2] Thank you.

[1] https://lkml.org/lkml/2014/6/11/26
[2] https://lkml.org/lkml/2014/6/11/649

Best regards,
Jingoo Han

> 
>    Wolfram
> 
> 
> Tushar Behera (2):
>   DRM: Armada: Use devm_ioremap_resource
>   lib: devres: Remove deprecated devm_request_and_ioremap
> 
> Wolfram Sang (1):
>   bus: brcmstb_gisb: Use devm_ioremap_resource
> 
>  Documentation/driver-model/devres.txt |  1 -
>  drivers/bus/brcmstb_gisb.c            |  6 +++---
>  drivers/gpu/drm/armada/armada_crtc.c  |  8 +++-----
>  include/linux/device.h                |  2 --
>  lib/devres.c                          | 28 ----------------------------
>  5 files changed, 6 insertions(+), 39 deletions(-)
> 
> --
> 2.0.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] Remove devm_request_and_ioremap()
  2014-06-20  2:36 ` Jingoo Han
@ 2014-06-20  2:59   ` 'Greg Kroah-Hartman'
  2014-06-20  6:47     ` Wolfram Sang
  2014-06-20  8:45     ` Wolfram Sang
  0 siblings, 2 replies; 10+ messages in thread
From: 'Greg Kroah-Hartman' @ 2014-06-20  2:59 UTC (permalink / raw)
  To: Jingoo Han; +Cc: 'Wolfram Sang', linux-kernel, linux-doc, dri-devel

On Fri, Jun 20, 2014 at 11:36:03AM +0900, Jingoo Han wrote:
> On Friday, June 20, 2014 3:49 AM, Wolfram Sang wrote:
> > 
> > Pretty much a year ago, Tushar cleaned up a lot of deprecated uses of
> > devm_request_and_ioremap, yet some remains are still left. Remove the last two
> > users, and let the function rest in peace. I'd suggest that this series is
> > picked up as a whole to have that case finally closed. Greg? Are you interested
> > in picking it up?
> 
> (+cc Greg Kroah-Hartman)
> 
> I already sent the same patch as one single patch to Greg Kroah-Hartman. [1]
> Also, it was accepted by Greg Kroah-Hartman. [2] Thank you.
> 
> [1] https://lkml.org/lkml/2014/6/11/26
> [2] https://lkml.org/lkml/2014/6/11/649

Yeah, I'll go apply that right now while I'm remembering it :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] Remove devm_request_and_ioremap()
  2014-06-20  2:59   ` 'Greg Kroah-Hartman'
@ 2014-06-20  6:47     ` Wolfram Sang
  2014-06-20  8:45     ` Wolfram Sang
  1 sibling, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2014-06-20  6:47 UTC (permalink / raw)
  To: 'Greg Kroah-Hartman'
  Cc: Jingoo Han, linux-kernel, linux-doc, dri-devel

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

> > I already sent the same patch as one single patch to Greg Kroah-Hartman. [1]
> > Also, it was accepted by Greg Kroah-Hartman. [2] Thank you.
> > 
> > [1] https://lkml.org/lkml/2014/6/11/26
> > [2] https://lkml.org/lkml/2014/6/11/649
> 
> Yeah, I'll go apply that right now while I'm remembering it :)

Yay, great! Thank you both!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] Remove devm_request_and_ioremap()
  2014-06-20  2:59   ` 'Greg Kroah-Hartman'
  2014-06-20  6:47     ` Wolfram Sang
@ 2014-06-20  8:45     ` Wolfram Sang
  2014-06-20  8:51       ` Tushar Behera
  1 sibling, 1 reply; 10+ messages in thread
From: Wolfram Sang @ 2014-06-20  8:45 UTC (permalink / raw)
  To: 'Greg Kroah-Hartman'
  Cc: Jingoo Han, linux-kernel, linux-doc, dri-devel

[-- Attachment #1: Type: text/plain, Size: 987 bytes --]

On Thu, Jun 19, 2014 at 07:59:57PM -0700, 'Greg Kroah-Hartman' wrote:
> On Fri, Jun 20, 2014 at 11:36:03AM +0900, Jingoo Han wrote:
> > On Friday, June 20, 2014 3:49 AM, Wolfram Sang wrote:
> > > 
> > > Pretty much a year ago, Tushar cleaned up a lot of deprecated uses of
> > > devm_request_and_ioremap, yet some remains are still left. Remove the last two
> > > users, and let the function rest in peace. I'd suggest that this series is
> > > picked up as a whole to have that case finally closed. Greg? Are you interested
> > > in picking it up?
> > 
> > (+cc Greg Kroah-Hartman)
> > 
> > I already sent the same patch as one single patch to Greg Kroah-Hartman. [1]
> > Also, it was accepted by Greg Kroah-Hartman. [2] Thank you.
> > 
> > [1] https://lkml.org/lkml/2014/6/11/26
> > [2] https://lkml.org/lkml/2014/6/11/649
> 
> Yeah, I'll go apply that right now while I'm remembering it :)

For the patch above:

Reviewed-by: Wolfram Sang <wsa@the-dreams.de>


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] Remove devm_request_and_ioremap()
  2014-06-20  8:45     ` Wolfram Sang
@ 2014-06-20  8:51       ` Tushar Behera
  0 siblings, 0 replies; 10+ messages in thread
From: Tushar Behera @ 2014-06-20  8:51 UTC (permalink / raw)
  To: Wolfram Sang, 'Greg Kroah-Hartman'
  Cc: Jingoo Han, linux-kernel, linux-doc, dri-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/20/2014 02:15 PM, Wolfram Sang wrote:
> On Thu, Jun 19, 2014 at 07:59:57PM -0700, 'Greg Kroah-Hartman'
> wrote:
>> On Fri, Jun 20, 2014 at 11:36:03AM +0900, Jingoo Han wrote:
>>> On Friday, June 20, 2014 3:49 AM, Wolfram Sang wrote:
>>>> 
>>>> Pretty much a year ago, Tushar cleaned up a lot of deprecated
>>>> uses of devm_request_and_ioremap, yet some remains are still
>>>> left. Remove the last two users, and let the function rest in
>>>> peace. I'd suggest that this series is picked up as a whole
>>>> to have that case finally closed. Greg? Are you interested in
>>>> picking it up?
>>> 
>>> (+cc Greg Kroah-Hartman)
>>> 
>>> I already sent the same patch as one single patch to Greg
>>> Kroah-Hartman. [1] Also, it was accepted by Greg Kroah-Hartman.
>>> [2] Thank you.
>>> 
>>> [1] https://lkml.org/lkml/2014/6/11/26 [2]
>>> https://lkml.org/lkml/2014/6/11/649
>> 
>> Yeah, I'll go apply that right now while I'm remembering it :)
> 
> For the patch above:
> 
> Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
> 

If it is still not late,

Acked-by: Tushar Behera <trblinux@gmail.com>

- -- 
Tushar Behera
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTo/YpAAoJELqclMPPkq4NOsIIAIkN+lOgWTIo3IBw7oQ9yO76
Hjn6fR2kjWOdrXrTdW3KQRzElw8hMKdPF5++GkgAkreoLSxRBLnyHdGc0jPdmxXw
gIu4O0WNQYRKYN+fkHPkl/5z10SNmZrnwcq37FK8EMCqpph7JywYOu5WyNVjMKOh
gTJ9zME+iCAzE+KlzBr7pRLySkFvgtITqBRT/lsRmGGpjH+kphSmYuY2kvz2VVLI
DE6Zy8kOyZEEDwDsm62qhoZNtzKcGoZgSqNFKU8fM9duonRhAwUQKImUnKB1H1CD
FQcmZI/4WA/6OLypUSBj/AIciK1MW/Gu6IpILjNVwQA/q3CKEaUkiHf+2HNVohU=
=FBDs
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-06-20  8:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-19 18:48 [PATCH 0/3] Remove devm_request_and_ioremap() Wolfram Sang
2014-06-19 18:48 ` [PATCH 1/3] DRM: Armada: Use devm_ioremap_resource Wolfram Sang
2014-06-19 18:49 ` [PATCH 2/3] bus: brcmstb_gisb: " Wolfram Sang
2014-06-19 18:49 ` [PATCH 3/3] lib: devres: Remove deprecated devm_request_and_ioremap Wolfram Sang
2014-06-19 18:50 ` [PATCH 0/3] Remove devm_request_and_ioremap() Wolfram Sang
2014-06-20  2:36 ` Jingoo Han
2014-06-20  2:59   ` 'Greg Kroah-Hartman'
2014-06-20  6:47     ` Wolfram Sang
2014-06-20  8:45     ` Wolfram Sang
2014-06-20  8:51       ` Tushar Behera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox