Skip to contentSkip to conversation

s390/ap_bus: replace PTR_RET with PTR_ERR_OR_ZERO

PATCH Applied Gustavo A. R. Silva 3 participants 3 messages Jul 19, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390/ap_bus: replace PTR_RET with PTR_ERR_OR_ZERO

PTR_RET is deprecated, use PTR_ERR_OR_ZERO instead.

---
 drivers/s390/crypto/ap_bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/s390/crypto/ap_bus.c +2 -2
index c0a6723..bf27fc4 100644
@@ -474,7 +474,7 @@ static int ap_poll_thread_start(void)
 		return 0;
 	mutex_lock(&ap_poll_thread_mutex);
 	ap_poll_kthread = kthread_run(ap_poll_thread, NULL, "appoll");
-	rc = PTR_RET(ap_poll_kthread);
+	rc = PTR_ERR_OR_ZERO(ap_poll_kthread);
 	if (rc)
 		ap_poll_kthread = NULL;
 	mutex_unlock(&ap_poll_thread_mutex);
@@ -1242,7 +1242,7 @@ static int __init ap_module_init(void)
 
 	/* Create /sys/devices/ap. */
 	ap_root_device = root_device_register("ap");
-	rc = PTR_RET(ap_root_device);
+	rc = PTR_ERR_OR_ZERO(ap_root_device);
 	if (rc)
 		goto out_bus;
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 21 lines · On Wed, 18 Jul 2018 23:42:05 -0500 "Gustavo A. R. Silva"…

PTR_RET is deprecated, use PTR_ERR_OR_ZERO instead.

---
 drivers/s390/crypto/ap_bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/s390/crypto/ap_bus.c +1 -1
index c0a6723..bf27fc4 100644
@@ -474,7 +474,7 @@ static int ap_poll_thread_start(void)
 		return 0;
 	mutex_lock(&ap_poll_thread_mutex);
 	ap_poll_kthread = kthread_run(ap_poll_thread, NULL, "appoll");
-	rc = PTR_RET(ap_poll_kthread);
+	rc = PTR_ERR_OR_ZERO(ap_poll_kthread);
 	if (rc)
 		ap_poll_kthread = NULL;
 	mutex_unlock(&ap_poll_thread_mutex);

drivers/s390/crypto/ap_bus.c static int __init ap_module_init(void) · line 1248

Quoted 8 lines
drivers/s390/crypto/ap_bus.c +1 -1
@@ -1242,7 +1242,7 @@ static int __init ap_module_init(void)
 
 	/* Create /sys/devices/ap. */
 	ap_root_device = root_device_register("ap");
-	rc = PTR_RET(ap_root_device);
+	rc = PTR_ERR_OR_ZERO(ap_root_device);
 	if (rc)
 		goto out_bus;
 

Applied to the s390/linux tree for the next merge window. Thanks.

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 21 lines · Gustavo A. R. Silva

PTR_RET is deprecated, use PTR_ERR_OR_ZERO instead.

---
 drivers/s390/crypto/ap_bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/s390/crypto/ap_bus.c +1 -1
index c0a6723..bf27fc4 100644
@@ -474,7 +474,7 @@ static int ap_poll_thread_start(void)
 		return 0;
 	mutex_lock(&ap_poll_thread_mutex);
 	ap_poll_kthread = kthread_run(ap_poll_thread, NULL, "appoll");
-	rc = PTR_RET(ap_poll_kthread);
+	rc = PTR_ERR_OR_ZERO(ap_poll_kthread);
 	if (rc)
 		ap_poll_kthread = NULL;
 	mutex_unlock(&ap_poll_thread_mutex);

drivers/s390/crypto/ap_bus.c static int __init ap_module_init(void) · line 1248

Quoted 8 lines
drivers/s390/crypto/ap_bus.c +1 -1
@@ -1242,7 +1242,7 @@ static int __init ap_module_init(void)
 
 	/* Create /sys/devices/ap. */
 	ap_root_device = root_device_register("ap");
-	rc = PTR_RET(ap_root_device);
+	rc = PTR_ERR_OR_ZERO(ap_root_device);
 	if (rc)
 		goto out_bus;