public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tony Lindgren <tony@atomide.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-serial@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [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: Sat, 13 Apr 2024 15:03:48 +0800	[thread overview]
Message-ID: <202404131416.VJljwvkS-lkp@intel.com> (raw)

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

             reply	other threads:[~2024-04-13  7:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-13  7:03 kernel test robot [this message]
2024-04-13  9:31 ` [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 Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202404131416.VJljwvkS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox