Message ID | 20241203131727.9078-1-tklauser@distanz.ch |
---|---|
State | New |
Headers | show |
Series | [v2] serial: altera_jtaguart: Use KBUILD_MODNAME | expand |
Hi Tobias,
kernel test robot noticed the following build errors:
[auto build test ERROR on tty/tty-testing]
[also build test ERROR on tty/tty-next tty/tty-linus usb/usb-testing usb/usb-next usb/usb-linus linus/master v6.13-rc1 next-20241128]
[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/Tobias-Klauser/serial-altera_jtaguart-Use-KBUILD_MODNAME/20241203-211936
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link: https://lore.kernel.org/r/20241203131727.9078-1-tklauser%40distanz.ch
patch subject: [PATCH v2] serial: altera_jtaguart: Use KBUILD_MODNAME
config: i386-buildonly-randconfig-005-20241204 (https://download.01.org/0day-ci/archive/20241204/202412041159.YryCdguf-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412041159.YryCdguf-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/202412041159.YryCdguf-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/tty/serial/altera_jtaguart.c: In function 'altera_jtaguart_startup':
>> drivers/tty/serial/altera_jtaguart.c:174:25: error: 'DRV_NAME' undeclared (first use in this function)
174 | DRV_NAME, port);
| ^~~~~~~~
drivers/tty/serial/altera_jtaguart.c:174:25: note: each undeclared identifier is reported only once for each function it appears in
vim +/DRV_NAME +174 drivers/tty/serial/altera_jtaguart.c
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 167
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 168 static int altera_jtaguart_startup(struct uart_port *port)
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 169 {
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 170 unsigned long flags;
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 171 int ret;
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 172
9cfb5c05fee914c drivers/tty/serial/altera_jtaguart.c Yong Zhang 2011-09-22 173 ret = request_irq(port->irq, altera_jtaguart_interrupt, 0,
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 @174 DRV_NAME, port);
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 175 if (ret) {
3f356922d4cb9c7 drivers/tty/serial/altera_jtaguart.c Tobias Klauser 2024-11-13 176 dev_err(port->dev, "unable to attach Altera JTAG UART %d interrupt vector=%d\n",
3f356922d4cb9c7 drivers/tty/serial/altera_jtaguart.c Tobias Klauser 2024-11-13 177 port->line, port->irq);
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 178 return ret;
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 179 }
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 180
adcdb2c7f0b59a7 drivers/tty/serial/altera_jtaguart.c Thomas Gleixner 2023-09-14 181 uart_port_lock_irqsave(port, &flags);
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 182
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 183 /* Enable RX interrupts now */
4e2b16a62d9975c drivers/tty/serial/altera_jtaguart.c Jiri Slaby (SUSE 2022-11-15 184) port->read_status_mask = ALTERA_JTAGUART_CONTROL_RE_MSK;
4e2b16a62d9975c drivers/tty/serial/altera_jtaguart.c Jiri Slaby (SUSE 2022-11-15 185) writel(port->read_status_mask,
4e2b16a62d9975c drivers/tty/serial/altera_jtaguart.c Jiri Slaby (SUSE 2022-11-15 186) port->membase + ALTERA_JTAGUART_CONTROL_REG);
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 187
adcdb2c7f0b59a7 drivers/tty/serial/altera_jtaguart.c Thomas Gleixner 2023-09-14 188 uart_port_unlock_irqrestore(port, flags);
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 189
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 190 return 0;
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 191 }
5bcd601049c6b2a drivers/serial/altera_jtaguart.c Tobias Klauser 2010-05-05 192
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c index b9c3c3bed0c1..a9dd083d45d1 100644 --- a/drivers/tty/serial/altera_jtaguart.c +++ b/drivers/tty/serial/altera_jtaguart.c @@ -24,8 +24,6 @@ #include <linux/io.h> #include <linux/altera_jtaguart.h> -#define DRV_NAME "altera_jtaguart" - /* * Altera JTAG UART register definitions according to the Altera JTAG UART * datasheet: https://www.altera.com/literature/hb/nios2/n2cpu_nii51009.pdf @@ -365,7 +363,7 @@ OF_EARLYCON_DECLARE(juart, "altr,juart-1.0", altera_jtaguart_earlycon_setup); static struct uart_driver altera_jtaguart_driver = { .owner = THIS_MODULE, - .driver_name = "altera_jtaguart", + .driver_name = KBUILD_MODNAME, .dev_name = "ttyJ", .major = ALTERA_JTAGUART_MAJOR, .minor = ALTERA_JTAGUART_MINOR, @@ -451,7 +449,7 @@ static struct platform_driver altera_jtaguart_platform_driver = { .probe = altera_jtaguart_probe, .remove = altera_jtaguart_remove, .driver = { - .name = DRV_NAME, + .name = KBUILD_MODNAME, .of_match_table = of_match_ptr(altera_jtaguart_match), }, }; @@ -481,4 +479,4 @@ module_exit(altera_jtaguart_exit); MODULE_DESCRIPTION("Altera JTAG UART driver"); MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:" DRV_NAME); +MODULE_ALIAS("platform:" KBUILD_MODNAME);
There is no need to redefine the driver name. Use KBUILD_MODNAME and get rid of DRV_NAME altogether. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/linux-serial/2024120337-unending-renewed-8e7e@gregkh/ Signed-off-by: Tobias Klauser <tklauser@distanz.ch> --- v2: actually get rid of DRV_NAME definition drivers/tty/serial/altera_jtaguart.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)