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 <l...@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.pi...@linaro.org>
:::::: CC: Greg Kroah-Hartman <gre...@linuxfoundation.org>

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to