[tty:tty-next 61/65] drivers/tty/serial/serial_base_bus.c:267:9: error: call to undeclared function 'serial_base_add_one_prefcon'; ISO C99 and later do not support implicit function declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
head:   1b743485e27f3d874695434cc8103f557dfdf4b9
commit: 4547cd76f08a6f301f6ad563f5d0e4566924ec6b [61/65] serial: 8250: Fix add preferred console for serial8250_isa_init_ports()
config: mips-mtx1_defconfig (https://download.01.org/0day-ci/archive/20240413/202404131416.VJljwvkS-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240413/202404131416.VJljwvkS-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404131416.VJljwvkS-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/tty/serial/serial_base_bus.c:267:9: error: call to undeclared function 'serial_base_add_one_prefcon'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   ret = serial_base_add_one_prefcon(nmbr_match, name, idx);
                         ^
   drivers/tty/serial/serial_base_bus.c:267:9: note: did you mean 'serial_base_add_prefcon'?
   drivers/tty/serial/serial_base_bus.c:254:12: note: 'serial_base_add_prefcon' declared here
   static int serial_base_add_prefcon(const char *name, int idx)
              ^
   drivers/tty/serial/serial_base_bus.c:282:9: error: call to undeclared function 'serial_base_add_one_prefcon'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           return serial_base_add_one_prefcon(char_match, name, idx);
                  ^
   drivers/tty/serial/serial_base_bus.c:303:5: error: redefinition of 'serial_base_add_preferred_console'
   int serial_base_add_preferred_console(struct uart_driver *drv,
       ^
   drivers/tty/serial/serial_base.h:57:5: note: previous definition is here
   int serial_base_add_preferred_console(struct uart_driver *drv,
       ^
   drivers/tty/serial/serial_base_bus.c:319:9: error: call to undeclared function 'serial_base_add_one_prefcon'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           return serial_base_add_one_prefcon(port_match, drv->dev_name, port->line);
                  ^
   4 errors generated.


vim +/serial_base_add_one_prefcon +267 drivers/tty/serial/serial_base_bus.c

a0f32e2dd99867 Tony Lindgren 2024-03-27  253  
787a1cabac01c9 Tony Lindgren 2024-03-27  254  static int serial_base_add_prefcon(const char *name, int idx)
787a1cabac01c9 Tony Lindgren 2024-03-27  255  {
787a1cabac01c9 Tony Lindgren 2024-03-27  256  	const char *char_match __free(kfree) = NULL;
a0f32e2dd99867 Tony Lindgren 2024-03-27  257  	const char *nmbr_match __free(kfree) = NULL;
a0f32e2dd99867 Tony Lindgren 2024-03-27  258  	int ret;
a0f32e2dd99867 Tony Lindgren 2024-03-27  259  
a0f32e2dd99867 Tony Lindgren 2024-03-27  260  	/* Handle ttyS specific options */
a0f32e2dd99867 Tony Lindgren 2024-03-27  261  	if (strstarts(name, "ttyS")) {
a0f32e2dd99867 Tony Lindgren 2024-03-27  262  		/* No name, just a number */
a0f32e2dd99867 Tony Lindgren 2024-03-27  263  		nmbr_match = kasprintf(GFP_KERNEL, "%i", idx);
a0f32e2dd99867 Tony Lindgren 2024-03-27  264  		if (!nmbr_match)
a0f32e2dd99867 Tony Lindgren 2024-03-27  265  			return -ENODEV;
a0f32e2dd99867 Tony Lindgren 2024-03-27  266  
a0f32e2dd99867 Tony Lindgren 2024-03-27 @267  		ret = serial_base_add_one_prefcon(nmbr_match, name, idx);
a0f32e2dd99867 Tony Lindgren 2024-03-27  268  		if (ret)
a0f32e2dd99867 Tony Lindgren 2024-03-27  269  			return ret;
a0f32e2dd99867 Tony Lindgren 2024-03-27  270  
a0f32e2dd99867 Tony Lindgren 2024-03-27  271  		/* Sparc ttya and ttyb */
a0f32e2dd99867 Tony Lindgren 2024-03-27  272  		ret = serial_base_add_sparc_console(name, idx);
a0f32e2dd99867 Tony Lindgren 2024-03-27  273  		if (ret)
a0f32e2dd99867 Tony Lindgren 2024-03-27  274  			return ret;
a0f32e2dd99867 Tony Lindgren 2024-03-27  275  	}
787a1cabac01c9 Tony Lindgren 2024-03-27  276  
787a1cabac01c9 Tony Lindgren 2024-03-27  277  	/* Handle the traditional character device name style console=ttyS0 */
787a1cabac01c9 Tony Lindgren 2024-03-27  278  	char_match = kasprintf(GFP_KERNEL, "%s%i", name, idx);
787a1cabac01c9 Tony Lindgren 2024-03-27  279  	if (!char_match)
787a1cabac01c9 Tony Lindgren 2024-03-27  280  		return -ENOMEM;
787a1cabac01c9 Tony Lindgren 2024-03-27  281  
787a1cabac01c9 Tony Lindgren 2024-03-27  282  	return serial_base_add_one_prefcon(char_match, name, idx);
787a1cabac01c9 Tony Lindgren 2024-03-27  283  }
787a1cabac01c9 Tony Lindgren 2024-03-27  284  

:::::: The code at line 267 was first introduced by commit
:::::: a0f32e2dd99867b164bfebcf36729c2a0d41b30b serial: core: Handle serial console options

:::::: TO: Tony Lindgren <tony@xxxxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux