[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023110752-headset-gains-41a7@gregkh>
Date: Tue, 7 Nov 2023 07:31:27 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Yuran Pereira <yuran.pereira@...mail.com>
Cc: linux-bluetooth@...r.kernel.org, johan.hedberg@...il.com,
marcel@...tmann.org, linux-kernel@...r.kernel.org,
luiz.dentz@...il.com,
linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH 2/2] Bluetooth: Replaces printk with pr_debug in bt_dbg
On Tue, Nov 07, 2023 at 03:56:08AM +0530, Yuran Pereira wrote:
> bt_dbg() uses printk, as opposed to other functions in this file
> which use pr_* family of logging functions.
>
> This patch changes that by replacing `printk(KERN_DEBUG` with
> the equivalent pr_debug() call which makes the overall file
> look more uniform and cleaner.
>
> Signed-off-by: Yuran Pereira <yuran.pereira@...mail.com>
> ---
> net/bluetooth/lib.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
> index 063032fe9c68..96ba39f8b461 100644
> --- a/net/bluetooth/lib.c
> +++ b/net/bluetooth/lib.c
> @@ -329,7 +329,7 @@ void bt_dbg(const char *format, ...)
> vaf.fmt = format;
> vaf.va = &args;
>
> - printk(KERN_DEBUG pr_fmt("%pV"), &vaf);
> + pr_debug("%pV", &vaf);
You might have just changed the functionality here, are you SURE this is
identical to the original code? How was it tested?
I'm not saying this is a bad idea to do, just be aware of the
consequences for this change and document it properly (hint, the
changelog does not document the user-visible change that just happened.)
Note, pr_debug() is NOT identical to printk(), look at the source for
the full details.
thanks,
greg k-h
Powered by blists - more mailing lists