All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [driver-core:tty-test 13/13] drivers/tty/tty_baudrate.c:92:9: warning: no previous prototype for function 'tty_termios_input_baud_rate'
Date: Fri, 09 Apr 2021 01:24:34 +0800	[thread overview]
Message-ID: <202104090128.dDo0rdId-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5243 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git tty-test
head:   8a67b4c2f3f14e73a8ddfbef9c032d9f2fa6979a
commit: 8a67b4c2f3f14e73a8ddfbef9c032d9f2fa6979a [13/13] tty: clean include/linux/tty.h up
config: x86_64-randconfig-r013-20210408 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 56ea2e2fdd691136d5e6631fa0e447173694b82c)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?id=8a67b4c2f3f14e73a8ddfbef9c032d9f2fa6979a
        git remote add driver-core https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
        git fetch --no-tags driver-core tty-test
        git checkout 8a67b4c2f3f14e73a8ddfbef9c032d9f2fa6979a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/tty/tty_baudrate.c:92:9: warning: no previous prototype for function 'tty_termios_input_baud_rate' [-Wmissing-prototypes]
   speed_t tty_termios_input_baud_rate(struct ktermios *termios)
           ^
   drivers/tty/tty_baudrate.c:92:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   speed_t tty_termios_input_baud_rate(struct ktermios *termios)
   ^
   static 
   1 warning generated.


vim +/tty_termios_input_baud_rate +92 drivers/tty/tty_baudrate.c

fff0a2ca3a061c Nicolas Pitre  2017-04-12   79  
fff0a2ca3a061c Nicolas Pitre  2017-04-12   80  /**
fff0a2ca3a061c Nicolas Pitre  2017-04-12   81   *	tty_termios_input_baud_rate
fff0a2ca3a061c Nicolas Pitre  2017-04-12   82   *	@termios: termios structure
fff0a2ca3a061c Nicolas Pitre  2017-04-12   83   *
fff0a2ca3a061c Nicolas Pitre  2017-04-12   84   *	Convert termios baud rate data into a speed. This should be called
fff0a2ca3a061c Nicolas Pitre  2017-04-12   85   *	with the termios lock held if this termios is a terminal termios
fff0a2ca3a061c Nicolas Pitre  2017-04-12   86   *	structure. May change the termios data. Device drivers can call this
fff0a2ca3a061c Nicolas Pitre  2017-04-12   87   *	function but should use ->c_[io]speed directly as they are updated.
fff0a2ca3a061c Nicolas Pitre  2017-04-12   88   *
fff0a2ca3a061c Nicolas Pitre  2017-04-12   89   *	Locking: none
fff0a2ca3a061c Nicolas Pitre  2017-04-12   90   */
fff0a2ca3a061c Nicolas Pitre  2017-04-12   91  
fff0a2ca3a061c Nicolas Pitre  2017-04-12  @92  speed_t tty_termios_input_baud_rate(struct ktermios *termios)
fff0a2ca3a061c Nicolas Pitre  2017-04-12   93  {
fff0a2ca3a061c Nicolas Pitre  2017-04-12   94  #ifdef IBSHIFT
fff0a2ca3a061c Nicolas Pitre  2017-04-12   95  	unsigned int cbaud = (termios->c_cflag >> IBSHIFT) & CBAUD;
fff0a2ca3a061c Nicolas Pitre  2017-04-12   96  
fff0a2ca3a061c Nicolas Pitre  2017-04-12   97  	if (cbaud == B0)
fff0a2ca3a061c Nicolas Pitre  2017-04-12   98  		return tty_termios_baud_rate(termios);
fefe287e4bf6ee Johan Hovold   2018-07-15   99  #ifdef BOTHER
fff0a2ca3a061c Nicolas Pitre  2017-04-12  100  	/* Magic token for arbitrary speed via c_ispeed*/
fff0a2ca3a061c Nicolas Pitre  2017-04-12  101  	if (cbaud == BOTHER)
fff0a2ca3a061c Nicolas Pitre  2017-04-12  102  		return termios->c_ispeed;
fefe287e4bf6ee Johan Hovold   2018-07-15  103  #endif
fff0a2ca3a061c Nicolas Pitre  2017-04-12  104  	if (cbaud & CBAUDEX) {
fff0a2ca3a061c Nicolas Pitre  2017-04-12  105  		cbaud &= ~CBAUDEX;
fff0a2ca3a061c Nicolas Pitre  2017-04-12  106  
fff0a2ca3a061c Nicolas Pitre  2017-04-12  107  		if (cbaud < 1 || cbaud + 15 > n_baud_table)
fff0a2ca3a061c Nicolas Pitre  2017-04-12  108  			termios->c_cflag &= ~(CBAUDEX << IBSHIFT);
fff0a2ca3a061c Nicolas Pitre  2017-04-12  109  		else
fff0a2ca3a061c Nicolas Pitre  2017-04-12  110  			cbaud += 15;
fff0a2ca3a061c Nicolas Pitre  2017-04-12  111  	}
991a2519409700 H. Peter Anvin 2018-10-22  112  	return cbaud >= n_baud_table ? 0 : baud_table[cbaud];
fefe287e4bf6ee Johan Hovold   2018-07-15  113  #else	/* IBSHIFT */
fff0a2ca3a061c Nicolas Pitre  2017-04-12  114  	return tty_termios_baud_rate(termios);
fefe287e4bf6ee Johan Hovold   2018-07-15  115  #endif	/* IBSHIFT */
fff0a2ca3a061c Nicolas Pitre  2017-04-12  116  }
fff0a2ca3a061c Nicolas Pitre  2017-04-12  117  EXPORT_SYMBOL(tty_termios_input_baud_rate);
fff0a2ca3a061c Nicolas Pitre  2017-04-12  118  

:::::: The code at line 92 was first introduced by commit
:::::: fff0a2ca3a061c230b0e905e7586267a517538ac tty: move baudrate handling code to a file of its own

:::::: TO: Nicolas Pitre <nicolas.pitre@linaro.org>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36023 bytes --]

                 reply	other threads:[~2021-04-08 17:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202104090128.dDo0rdId-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.