All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/rds: Use PTR_ERR instead of IS_ERR for rdsdebug()
@ 2022-07-27 15:03 Li Qiong
  2022-08-01 10:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Li Qiong @ 2022-07-27 15:03 UTC (permalink / raw)
  To: Santosh Shilimkar, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-rdma, rds-devel, linux-kernel, yuzhe, renyu,
	jiaming, Li Qiong

If 'local_odp_mr->r_trans_private' is a error code,
it is better to print the error code than to print
the value of IS_ERR().

Signed-off-by: Li Qiong <liqiong@nfschina.com>
---
 net/rds/rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 6f1a50d50d06..fba82d36593a 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -742,7 +742,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
 					NULL, 0, rs, &local_odp_mr->r_key, NULL,
 					iov->addr, iov->bytes, ODP_VIRTUAL);
 			if (IS_ERR(local_odp_mr->r_trans_private)) {
-				ret = IS_ERR(local_odp_mr->r_trans_private);
+				ret = PTR_ERR(local_odp_mr->r_trans_private);
 				rdsdebug("get_mr ret %d %p\"", ret,
 					 local_odp_mr->r_trans_private);
 				kfree(local_odp_mr);
-- 
2.11.0


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

* Re: [PATCH] net/rds: Use PTR_ERR instead of IS_ERR for rdsdebug()
  2022-07-27 15:03 [PATCH] net/rds: Use PTR_ERR instead of IS_ERR for rdsdebug() Li Qiong
@ 2022-08-01 10:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-08-01 10:50 UTC (permalink / raw)
  To: Li Qiong
  Cc: santosh.shilimkar, davem, edumazet, kuba, pabeni, netdev,
	linux-rdma, rds-devel, linux-kernel, yuzhe, renyu, jiaming

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Wed, 27 Jul 2022 23:03:41 +0800 you wrote:
> If 'local_odp_mr->r_trans_private' is a error code,
> it is better to print the error code than to print
> the value of IS_ERR().
> 
> Signed-off-by: Li Qiong <liqiong@nfschina.com>
> ---
>  net/rds/rdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - net/rds: Use PTR_ERR instead of IS_ERR for rdsdebug()
    https://git.kernel.org/netdev/net/c/5121db6afb99

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-08-01 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 15:03 [PATCH] net/rds: Use PTR_ERR instead of IS_ERR for rdsdebug() Li Qiong
2022-08-01 10:50 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.