From: Greg KH <gregkh@linuxfoundation.org>
To: bhanuseshukumar <bhanuseshukumar@gmail.com>
Cc: rydberg@bitmath.org, dmitry.torokhov@gmail.com,
linux-input@vger.kernel.org, skhan@linuxfoundation.org,
linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH] Input: bcm5974 - Driver cleanup by replacing dprintk with dev_dbg
Date: Wed, 3 Sep 2025 07:44:52 +0200 [thread overview]
Message-ID: <2025090307-oversight-amaretto-4adc@gregkh> (raw)
In-Reply-To: <20250902164351.36828-1-bhanuseshukumar@gmail.com>
On Tue, Sep 02, 2025 at 10:13:51PM +0530, bhanuseshukumar wrote:
> Debug printk messages are converted to dev_dbg based logs
> for better control over debug messages using dynamic logging.
Why is this indented?
> Signed-off-by: bhanuseshukumar <bhanuseshukumar@gmail.com>
Please use your name, not your email alias.
> ---
> drivers/input/mouse/bcm5974.c | 21 ++++++++-------------
> 1 file changed, 8 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
> index dfdfb59cc8b5..2791fe0c1932 100644
> --- a/drivers/input/mouse/bcm5974.c
> +++ b/drivers/input/mouse/bcm5974.c
> @@ -156,13 +156,6 @@ MODULE_AUTHOR("Henrik Rydberg");
> MODULE_DESCRIPTION("Apple USB BCM5974 multitouch driver");
> MODULE_LICENSE("GPL");
>
> -#define dprintk(level, format, a...)\
> - { if (debug >= level) printk(KERN_DEBUG format, ##a); }
> -
> -static int debug = 1;
> -module_param(debug, int, 0644);
> -MODULE_PARM_DESC(debug, "Activate debugging output");
> -
> /* button data structure */
> struct bt_data {
> u8 unknown1; /* constant */
> @@ -547,11 +540,12 @@ static void setup_events_to_report(struct input_dev *input_dev,
> /* report button data as logical button state */
> static int report_bt_state(struct bcm5974 *dev, int size)
> {
> + struct usb_interface *intf = dev->intf;
No need for this variable.
> +
> if (size != sizeof(struct bt_data))
> return -EIO;
>
> - dprintk(7,
> - "bcm5974: button data: %x %x %x %x\n",
> + dev_dbg(&intf->dev, "bcm5974: button data: %x %x %x %x\n",
As you are using dev_dbg(), the prefix "bcm5974:" everywhere is not
needed at all. Just get rid of that.
As proof, look in the kernel log, now you have much more information
than before, right?
Same for the other changes in this patch, drop the prefix.
thanks,
greg k-h
prev parent reply other threads:[~2025-09-03 5:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 16:43 [PATCH] Input: bcm5974 - Driver cleanup by replacing dprintk with dev_dbg bhanuseshukumar
2025-09-03 5:44 ` Greg KH [this message]
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=2025090307-oversight-amaretto-4adc@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=bhanuseshukumar@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rydberg@bitmath.org \
--cc=skhan@linuxfoundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).