RDMA/rxe: Add function name to the logs
Subsystems (2)
PATCH 1/1 RDMA/rxe: Add function name to the logs
From: Zhu Yanjun <[email protected]>
Add the function names to the pr_ logs. As such, if some bugs occur, with function names, it is easy to locate the bugs.
--- drivers/infiniband/sw/rxe/rxe.h | 2 +- drivers/infiniband/sw/rxe/rxe_queue.h | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-)
drivers/infiniband/sw/rxe/rxe.h +1 -1
@@ -10,7 +10,7 @@#ifdef pr_fmt#undef pr_fmt#endif -#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#define pr_fmt (fmt) KBUILD_MODNAME ": %s: " fmt, __func__#include <linux/skbuff.h>
drivers/infiniband/sw/rxe/rxe_queue.h +4 -8
@@ -185,8 +185,7 @@ static inline void queue_advance_producer(struct rxe_queue *q,case QUEUE_TYPE_FROM_CLIENT :/* used by rxe, client owns the index */ if (WARN_ON (1 )) -pr_warn ("%s: attempt to advance client index\n" , - __func__); +pr_warn ("attempt to advance client index\n" );break ;case QUEUE_TYPE_TO_CLIENT :/* used by rxe which owns the index */
@@ -206,8 +205,7 @@ static inline void queue_advance_producer(struct rxe_queue *q,case QUEUE_TYPE_TO_ULP :/* used by ulp, rxe owns the index */ if (WARN_ON (1 )) -pr_warn ("%s: attempt to advance driver index\n" , - __func__); +pr_warn ("attempt to advance driver index\n" );break ; } }
@@ -228,14 +226,12 @@ static inline void queue_advance_consumer(struct rxe_queue *q,case QUEUE_TYPE_TO_CLIENT :/* used by rxe, client owns the index */ if (WARN_ON (1 )) -pr_warn ("%s: attempt to advance client index\n" , - __func__); +pr_warn ("attempt to advance client index\n" );break ;case QUEUE_TYPE_FROM_ULP :/* used by ulp, rxe owns the index */ if (WARN_ON (1 )) -pr_warn ("%s: attempt to advance driver index\n" , - __func__); +pr_warn ("attempt to advance driver index\n" );break ;case QUEUE_TYPE_TO_ULP :/* used by ulp which owns the index */
Signature · 1 line
2.27.0
Quoted 6 lines · Zhu Yanjun
From: Zhu Yanjun <[email protected]>
Add the function names to the
pr_logs. As such, if some bugs occur, with function names, it is easy to locate the bugs.Signed-off-by Zhu Yanjun <[email protected]>
Gently ping
Zhu Yanjun
Quoted 59 lines
--- drivers/infiniband/sw/rxe/rxe.h | 2 +- drivers/infiniband/sw/rxe/rxe_queue.h | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-)drivers/infiniband/sw/rxe/rxe.h +1
-1@@ -10,7 +10,7 @@#ifdef pr_fmt#undef pr_fmt#endif -#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#define pr_fmt (fmt) KBUILD_MODNAME ": %s: " fmt, __func__#include <linux/skbuff.h> drivers/infiniband/sw/rxe/rxe_queue.h +4
-8@@ -185,8 +185,7 @@ static inline void queue_advance_producer(struct rxe_queue *q,case QUEUE_TYPE_FROM_CLIENT :/* used by rxe, client owns the index */ if (WARN_ON (1 )) -pr_warn ("%s: attempt to advance client index\n" , - __func__); +pr_warn ("attempt to advance client index\n" );break ;case QUEUE_TYPE_TO_CLIENT :/* used by rxe which owns the index */ @@ -206,8 +205,7 @@ static inline void queue_advance_producer(struct rxe_queue *q,case QUEUE_TYPE_TO_ULP :/* used by ulp, rxe owns the index */ if (WARN_ON (1 )) -pr_warn ("%s: attempt to advance driver index\n" , - __func__); +pr_warn ("attempt to advance driver index\n" );break ; } }@@ -228,14 +226,12 @@ static inline void queue_advance_consumer(struct rxe_queue *q,case QUEUE_TYPE_TO_CLIENT :/* used by rxe, client owns the index */ if (WARN_ON (1 )) -pr_warn ("%s: attempt to advance client index\n" , - __func__); +pr_warn ("attempt to advance client index\n" );break ;case QUEUE_TYPE_FROM_ULP :/* used by ulp, rxe owns the index */ if (WARN_ON (1 )) -pr_warn ("%s: attempt to advance driver index\n" , - __func__); +pr_warn ("attempt to advance driver index\n" );break ;case QUEUE_TYPE_TO_ULP :/* used by ulp which owns the index */
Quoted 29 lines · Zhu Yanjun
From: Zhu Yanjun <[email protected]>
Add the function names to the
pr_logs. As such, if some bugs occur, with function names, it is easy to locate the bugs.Signed-off-by Zhu Yanjun <[email protected]>--- drivers/infiniband/sw/rxe/rxe.h | 2 +- drivers/infiniband/sw/rxe/rxe_queue.h | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-)drivers/infiniband/sw/rxe/rxe.h +1
-1@@ -10,7 +10,7 @@#ifdef pr_fmt#undef pr_fmt#endif -#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#define pr_fmt (fmt) KBUILD_MODNAME ": %s: " fmt, __func__#include <linux/skbuff.h> drivers/infiniband/sw/rxe/rxe_queue.h +0
-0
drivers/infiniband/sw/rxe/rxe_queue.h static inline void queue_advance_producer(struct rxe_queue *q, · line 188
Quoted 6 lines
drivers/infiniband/sw/rxe/rxe_queue.h +1
-2@@ -185,8 +185,7 @@ static inline void queue_advance_producer(struct rxe_queue *q,case QUEUE_TYPE_FROM_CLIENT :/* used by rxe, client owns the index */ if (WARN_ON (1 )) -pr_warn ("%s: attempt to advance client index\n" , - __func__); +pr_warn ("attempt to advance client index\n" );
Delete all if (WARN_ON(1)) pr_warn(...) in favour of plain WARN_ON(). It will give you all information which you need.
Thanks
Quoted 25 lines · Leon Romanovsky
Quoted 24 lines · Zhu Yanjun
From: Zhu Yanjun <[email protected]>
Add the function names to the
pr_logs. As such, if some bugs occur, with function names, it is easy to locate the bugs.Signed-off-by Zhu Yanjun <[email protected]>--- drivers/infiniband/sw/rxe/rxe.h | 2 +- drivers/infiniband/sw/rxe/rxe_queue.h | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-)drivers/infiniband/sw/rxe/rxe.h +1
-1@@ -10,7 +10,7 @@#ifdef pr_fmt#undef pr_fmt#endif -#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#define pr_fmt (fmt) KBUILD_MODNAME ": %s: " fmt, __func__#include <linux/skbuff.h>
Quoted 13 lines
drivers/infiniband/sw/rxe/rxe_queue.h static inline void queue_advance_producer(struct rxe_queue *q, · line 188
Quoted 11 lines
drivers/infiniband/sw/rxe/rxe_queue.h +1
-2@@ -185,8 +185,7 @@ static inline void queue_advance_producer(struct rxe_queue *q,case QUEUE_TYPE_FROM_CLIENT :/* used by rxe, client owns the index */ if (WARN_ON (1 )) -pr_warn ("%s: attempt to advance client index\n" , - __func__); +pr_warn ("attempt to advance client index\n" );Delete all if (
WARN_ON(1))pr_warn(...)in favour of plainWARN_ON(). It will give you all information which you need.
Got it. Thanks a lot. I will fix it ASAP.
Zhu Yanjun
Quoted 2 lines
Thanks