* [PATCH] ARM: OMAP2+: gpmc: fix: replace PTR_RET with PTR_ERR_OR_ZERO
@ 2014-04-11 10:03 Duan Jiong
2014-04-18 22:49 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Duan Jiong @ 2014-04-11 10:03 UTC (permalink / raw)
To: khilman, tony, linux; +Cc: linux-omap, Duan Jiong
PTR_RET is deprecated. Do not recommend its usage anymore.
Use PTR_ERR_OR_ZERO instead.
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
---
arch/arm/mach-omap2/gpmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index ab43755..6a11bda 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1772,7 +1772,7 @@ static int __init omap_gpmc_init(void)
pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0);
WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
- return PTR_RET(pdev);
+ return PTR_ERR_OR_ZERO(pdev);
}
omap_postcore_initcall(omap_gpmc_init);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: OMAP2+: gpmc: fix: replace PTR_RET with PTR_ERR_OR_ZERO
2014-04-11 10:03 [PATCH] ARM: OMAP2+: gpmc: fix: replace PTR_RET with PTR_ERR_OR_ZERO Duan Jiong
@ 2014-04-18 22:49 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2014-04-18 22:49 UTC (permalink / raw)
To: Duan Jiong; +Cc: khilman, linux, linux-omap
* Duan Jiong <duanj.fnst@cn.fujitsu.com> [140411 03:10]:
> PTR_RET is deprecated. Do not recommend its usage anymore.
> Use PTR_ERR_OR_ZERO instead.
>
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
> ---
> arch/arm/mach-omap2/gpmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
> index ab43755..6a11bda 100644
> --- a/arch/arm/mach-omap2/gpmc.c
> +++ b/arch/arm/mach-omap2/gpmc.c
> @@ -1772,7 +1772,7 @@ static int __init omap_gpmc_init(void)
> pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0);
> WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
>
> - return PTR_RET(pdev);
> + return PTR_ERR_OR_ZERO(pdev);
> }
> omap_postcore_initcall(omap_gpmc_init);
OK looks like we have #define PTR_RET(p) PTR_ERR_OR_ZERO(p).
But what about the others? How about a single patch to deal
with them all?
$ git grep PTR_RET arch/arm/*omap*
arch/arm/mach-omap2/devices.c: return PTR_RET(pdev);
arch/arm/mach-omap2/devices.c: return PTR_RET(pdev);
arch/arm/mach-omap2/fb.c: return PTR_RET(pdev);
arch/arm/mach-omap2/pmu.c: return PTR_RET(omap_pmu_dev);
Regards,
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-18 22:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-11 10:03 [PATCH] ARM: OMAP2+: gpmc: fix: replace PTR_RET with PTR_ERR_OR_ZERO Duan Jiong
2014-04-18 22:49 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).