[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025090307-oversight-amaretto-4adc@gregkh>
Date: Wed, 3 Sep 2025 07:44:52 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: bhanuseshukumar <bhanuseshukumar@...il.com>
Cc: rydberg@...math.org, dmitry.torokhov@...il.com,
linux-input@...r.kernel.org, skhan@...uxfoundation.org,
linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH] Input: bcm5974 - Driver cleanup by replacing dprintk
with dev_dbg
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@...il.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
Powered by blists - more mailing lists