[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025060325-everyone-padlock-931a@gregkh>
Date: Tue, 3 Jun 2025 06:19:44 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: hsyemail2@...il.com
Cc: Johan Hovold <johan@...nel.org>, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, Sheng-Yuan Huang <syhuang3@...oton.com>
Subject: Re: [PATCH v1 1/1] USB: serial: nct_usb_serial: add support for
Nuvoton USB adapter
At quick glance, this looks good, but one thing overall stood out:
On Tue, Jun 03, 2025 at 11:20:57AM +0800, hsyemail2@...il.com wrote:
> + if (size > NCT_MAX_VENDOR_READ_SIZE)
> + dev_err(dev, NCT_DRVNAME ": %s - failed to read [%04x]: over size %d\n",
> + __func__, cmd.p.cmd, size);
When using dev_*() functions, you do not need a "driver prefix" here
like NCT_DRVNAME as it already is in the string that is sent to the
kernel log. So that all can be removed from all of these.
Also:
> + dev_dbg(&intf->dev, NCT_DRVNAME ": %s tty baud: 0x%X\n", __func__,
> + (cflag & CBAUD));
The __func__ is already in the dev_dbg() output, so no need to repeat it
again please.
This should be done for all of the calls like this in the driver.
> + dev_info(&intf->dev, NCT_DRVNAME ": %s Enabled devices mask:%X\n",
> + __func__, buf[0]);
When drivers are working properly, they are quiet, so no need for this
line at all.
thanks,
greg k-h
Powered by blists - more mailing lists