* [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
@ 2024-04-13 7:03 kernel test robot
2024-04-13 9:31 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-04-13 7:03 UTC (permalink / raw)
To: Tony Lindgren; +Cc: llvm, oe-kbuild-all, linux-serial, Greg Kroah-Hartman
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@intel.com/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@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/202404131416.VJljwvkS-lkp@intel.com/
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@atomide.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [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
2024-04-13 7:03 [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 kernel test robot
@ 2024-04-13 9:31 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2024-04-13 9:31 UTC (permalink / raw)
To: kernel test robot; +Cc: llvm, oe-kbuild-all, linux-serial, Greg Kroah-Hartman
* kernel test robot <lkp@intel.com> [240413 07:04]:
> 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@intel.com/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@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/202404131416.VJljwvkS-lkp@intel.com/
Thanks fix coming for the ifdef issues. I'll run make randconfig on it
for a while before sending though.
Regards,
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-13 9:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-13 7:03 [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 kernel test robot
2024-04-13 9:31 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox