Re: [PATCH v1 1/1] USB: serial: nct_usb_serial: add support for Nuvoton USB adapter

From: Greg Kroah-Hartman
Date: Tue Jun 03 2025 - 00:19:59 EST


At quick glance, this looks good, but one thing overall stood out:

On Tue, Jun 03, 2025 at 11:20:57AM +0800, hsyemail2@xxxxxxxxx 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