Skip to contentSkip to conversation

err.h: remove deprecated PTR_RET for good

PATCH In review Lukas Bulwahn 3 participants 3 messages Mar 22, 2020 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 err.h: remove deprecated PTR_RET for good

Initially, commit fa9ee9c4b988 ("include/linux/err.h: add a function to cast error-pointers to a return value") from Uwe Kleine-König introduced PTR_RET in 03/2011. Then, in 07/2013, commit 6e8b8726ad50 ("PTR_RET is now PTR_ERR_OR_ZERO") from Rusty Russell renamed PTR_RET to PTR_ERR_OR_ZERO, and left PTR_RET as deprecated-marked alias.

After six years since the renaming and various repeated cleanups in the meantime, it is time to finally remove the deprecated PTR_RET for good.

---
Rusty, if you are still around, Acked-by is appreciated. Uwe, Acked-by is appreciated.
Kudos to Gustavo, Nicholas, Duan & Sachin for previous cleanups.

applies cleanly on current master and on next-20200320 Jiri, please pick this trival patch for the next merge window. Thanks.

 include/linux/err.h | 3 ---
 1 file changed, 3 deletions(-)
include/linux/err.h +0 -3
index 87be24350e91..a139c64aef2a 100644
@@ -62,9 +62,6 @@ static inline int __must_check PTR_ERR_OR_ZERO(__force const void *ptr)
 		return 0;
 }
 
-/* Deprecated */
-#define PTR_RET(p) PTR_ERR_OR_ZERO(p)
-
 #endif
 
 #endif /* _LINUX_ERR_H */
Signature · 1 line
2.17.1
#1 lore raw
Quoted 9 lines · Lukas Bulwahn

Initially, commit fa9ee9c4b988 ("include/linux/err.h: add a function to cast error-pointers to a return value") from Uwe Kleine-König introduced PTR_RET in 03/2011. Then, in 07/2013, commit 6e8b8726ad50 ("PTR_RET is now PTR_ERR_OR_ZERO") from Rusty Russell renamed PTR_RET to PTR_ERR_OR_ZERO, and left PTR_RET as deprecated-marked alias.

After six years since the renaming and various repeated cleanups in the meantime, it is time to finally remove the deprecated PTR_RET for good.

Quoted 8 lines

---
Rusty, if you are still around, Acked-by is appreciated. Uwe, Acked-by is appreciated.
Kudos to Gustavo, Nicholas, Duan & Sachin for previous cleanups.

applies cleanly on current master and on next-20200320 Jiri, please pick this trival patch for the next merge window. Thanks.

I am queuing it right away; it's been marked deprecated back in 2013, and it doesn't have any in-tree users anyway.

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw
Quoted 17 lines · Jiri Kosina
Quoted 15 lines · Lukas Bulwahn

Initially, commit fa9ee9c4b988 ("include/linux/err.h: add a function to cast error-pointers to a return value") from Uwe Kleine-König introduced PTR_RET in 03/2011. Then, in 07/2013, commit 6e8b8726ad50 ("PTR_RET is now PTR_ERR_OR_ZERO") from Rusty Russell renamed PTR_RET to PTR_ERR_OR_ZERO, and left PTR_RET as deprecated-marked alias.

After six years since the renaming and various repeated cleanups in the meantime, it is time to finally remove the deprecated PTR_RET for good.

---
Rusty, if you are still around, Acked-by is appreciated. Uwe, Acked-by is appreciated.
Kudos to Gustavo, Nicholas, Duan & Sachin for previous cleanups.

Quoted 5 lines
Quoted 2 lines

applies cleanly on current master and on next-20200320 Jiri, please pick this trival patch for the next merge window. Thanks.

I am queuing it right away; it's been marked deprecated back in 2013, and it doesn't have any in-tree users anyway.

in case it's not in a tree already that is not supposed to be changed any more.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |