diff mbox series

serial: sc16is7xx: set driver name

Message ID 20240531101959.181457-1-daniel@zonque.org
State New
Headers show
Series serial: sc16is7xx: set driver name | expand

Commit Message

Daniel Mack May 31, 2024, 10:19 a.m. UTC
Set the drv_name field of the driver struct so that the tty core
registers a procfs entry for it. This is useful for debugging.

Signed-off-by: Daniel Mack <daniel@zonque.org>
---
 drivers/tty/serial/sc16is7xx.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Greg KH May 31, 2024, 10:27 a.m. UTC | #1
On Fri, May 31, 2024 at 12:19:59PM +0200, Daniel Mack wrote:
> Set the drv_name field of the driver struct so that the tty core
> registers a procfs entry for it. This is useful for debugging.
> 
> Signed-off-by: Daniel Mack <daniel@zonque.org>
> ---
>  drivers/tty/serial/sc16is7xx.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
> index bf0065d1c8e9..308edbacda7b 100644
> --- a/drivers/tty/serial/sc16is7xx.c
> +++ b/drivers/tty/serial/sc16is7xx.c
> @@ -351,6 +351,7 @@ static struct uart_driver sc16is7xx_uart = {
>  	.owner		= THIS_MODULE,
>  	.driver_name    = SC16IS7XX_NAME,
>  	.dev_name	= "ttySC",
> +	.driver_name	= SC16IS7XX_NAME,

Are you sure this patch is correct?  Look 2 lines up :)
Daniel Mack May 31, 2024, 3:12 p.m. UTC | #2
On 5/31/24 12:27, Greg KH wrote:
> On Fri, May 31, 2024 at 12:19:59PM +0200, Daniel Mack wrote:
>> Set the drv_name field of the driver struct so that the tty core
>> registers a procfs entry for it. This is useful for debugging.
>>
>> Signed-off-by: Daniel Mack <daniel@zonque.org>
>> ---
>>  drivers/tty/serial/sc16is7xx.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
>> index bf0065d1c8e9..308edbacda7b 100644
>> --- a/drivers/tty/serial/sc16is7xx.c
>> +++ b/drivers/tty/serial/sc16is7xx.c
>> @@ -351,6 +351,7 @@ static struct uart_driver sc16is7xx_uart = {
>>  	.owner		= THIS_MODULE,
>>  	.driver_name    = SC16IS7XX_NAME,
>>  	.dev_name	= "ttySC",
>> +	.driver_name	= SC16IS7XX_NAME,
> 
> Are you sure this patch is correct?  Look 2 lines up :)
> 

Oh, Hugo did that already. Sorry for the noise.


Daniel
kernel test robot June 1, 2024, 9:26 a.m. UTC | #3
Hi Daniel,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tty/tty-testing]
[also build test WARNING on tty/tty-next tty/tty-linus usb/usb-testing usb/usb-next usb/usb-linus linus/master v6.10-rc1 next-20240531]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Daniel-Mack/serial-sc16is7xx-set-driver-name/20240531-182824
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link:    https://lore.kernel.org/r/20240531101959.181457-1-daniel%40zonque.org
patch subject: [PATCH] serial: sc16is7xx: set driver name
config: x86_64-randconfig-123-20240601 (https://download.01.org/0day-ci/archive/20240601/202406011748.tHQQJ8TB-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240601/202406011748.tHQQJ8TB-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406011748.tHQQJ8TB-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/tty/serial/sc16is7xx.c:352:10: sparse: sparse: Initializer entry defined twice
   drivers/tty/serial/sc16is7xx.c:354:10: sparse:   also defined here

vim +352 drivers/tty/serial/sc16is7xx.c

c64349722d1417 Jakub Kicinski  2015-07-31  349  
c64349722d1417 Jakub Kicinski  2015-07-31  350  static struct uart_driver sc16is7xx_uart = {
c64349722d1417 Jakub Kicinski  2015-07-31  351  	.owner		= THIS_MODULE,
d9ffadaf9df1c8 Hugo Villeneuve 2023-12-21 @352  	.driver_name    = SC16IS7XX_NAME,
c64349722d1417 Jakub Kicinski  2015-07-31  353  	.dev_name	= "ttySC",
cb1c18ea6be1d7 Daniel Mack     2024-05-31  354  	.driver_name	= SC16IS7XX_NAME,
c64349722d1417 Jakub Kicinski  2015-07-31  355  	.nr		= SC16IS7XX_MAX_DEVS,
c64349722d1417 Jakub Kicinski  2015-07-31  356  };
c64349722d1417 Jakub Kicinski  2015-07-31  357
diff mbox series

Patch

diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index bf0065d1c8e9..308edbacda7b 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -351,6 +351,7 @@  static struct uart_driver sc16is7xx_uart = {
 	.owner		= THIS_MODULE,
 	.driver_name    = SC16IS7XX_NAME,
 	.dev_name	= "ttySC",
+	.driver_name	= SC16IS7XX_NAME,
 	.nr		= SC16IS7XX_MAX_DEVS,
 };