On Mon, Apr 10, 2023 at 06:21:05PM +0800, Zhu Yanjun wrote: > From: Zhu Yanjun <yanjun.zhu@xxxxxxxxx> > > 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 <yanjun.zhu@xxxxxxxxx> > --- > drivers/infiniband/sw/rxe/rxe.h | 2 +- > drivers/infiniband/sw/rxe/rxe_queue.h | 12 ++++-------- > 2 files changed, 5 insertions(+), 9 deletions(-) > > diff --git a/drivers/infiniband/sw/rxe/rxe.h b/drivers/infiniband/sw/rxe/rxe.h > index 2415f3704f57..43742d2f32de 100644 > --- a/drivers/infiniband/sw/rxe/rxe.h > +++ b/drivers/infiniband/sw/rxe/rxe.h > @@ -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> > > diff --git a/drivers/infiniband/sw/rxe/rxe_queue.h b/drivers/infiniband/sw/rxe/rxe_queue.h > index c711cb98b949..5d6e17b00e60 100644 > --- a/drivers/infiniband/sw/rxe/rxe_queue.h > +++ b/drivers/infiniband/sw/rxe/rxe_queue.h > @@ -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