All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: Leon Romanovsky <leon@kernel.org>, Zhu Yanjun <yanjun.zhu@intel.com>
Cc: zyjzyj2000@gmail.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org
Subject: Re: [PATCH 1/1] RDMA/rxe: Add function name to the logs
Date: Tue, 18 Apr 2023 18:36:54 +0800	[thread overview]
Message-ID: <4cdbda13-3de2-8643-ff4b-1213321bd3a4@linux.dev> (raw)
In-Reply-To: <20230418080807.GD9740@unreal>


在 2023/4/18 16:08, Leon Romanovsky 写道:
> On Mon, Apr 10, 2023 at 06:21:05PM +0800, Zhu Yanjun wrote:
>> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>>
>> 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@linux.dev>
>> ---
>>   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.

Got it. Thanks a lot. I will fix it ASAP.

Zhu Yanjun

>
> Thanks

  reply	other threads:[~2023-04-18 10:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10 10:21 [PATCH 1/1] RDMA/rxe: Add function name to the logs Zhu Yanjun
2023-04-16 14:43 ` Zhu Yanjun
2023-04-18  8:08 ` Leon Romanovsky
2023-04-18 10:36   ` Zhu Yanjun [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-04-18 12:26 Zhu Yanjun
2023-04-21 15:27 ` Jason Gunthorpe
2023-04-21 15:51   ` Zhu Yanjun
2023-04-28 13:24     ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4cdbda13-3de2-8643-ff4b-1213321bd3a4@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yanjun.zhu@intel.com \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.