From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [jirislaby:devel 67/107] drivers/tty/mxser.c:1401:5: warning: no previous prototype for function 'mxser_ioctl_op_mode'
Date: Sat, 20 Mar 2021 00:56:06 +0800 [thread overview]
Message-ID: <202103200001.Q5Kdtzef-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3300 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: ab00d8ca266aab3b71f64266a2351dfce6baadfb
commit: 998695ea4c020601bfa37c3cb6559e48c420b286 [67/107] extract mxser_ioctl_op_mode
config: x86_64-randconfig-a006-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project fcc1ce00931751ac02498986feb37744e9ace8de)
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/jirislaby/linux.git/commit/?id=998695ea4c020601bfa37c3cb6559e48c420b286
git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
git fetch --no-tags jirislaby devel
git checkout 998695ea4c020601bfa37c3cb6559e48c420b286
# 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/mxser.c:1401:5: warning: no previous prototype for function 'mxser_ioctl_op_mode' [-Wmissing-prototypes]
int mxser_ioctl_op_mode(struct mxser_port *port, int index, bool set,
^
drivers/tty/mxser.c:1401:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mxser_ioctl_op_mode(struct mxser_port *port, int index, bool set,
^
static
1 warning generated.
vim +/mxser_ioctl_op_mode +1401 drivers/tty/mxser.c
1399
1400 /* We should likely switch to TIOCGRS485/TIOCSRS485. */
> 1401 int mxser_ioctl_op_mode(struct mxser_port *port, int index, bool set,
1402 int __user *u_opmode)
1403 {
1404 static const unsigned char ModeMask[] = { 0xfc, 0xf3, 0xcf, 0x3f };
1405 int opmode, p = index % 4;
1406 int shiftbit = p * 2;
1407 unsigned char val, mask;
1408
1409 if (port->board->chip_flag != MOXA_MUST_MU860_HWID)
1410 return -EFAULT;
1411
1412 if (set) {
1413 if (get_user(opmode, u_opmode))
1414 return -EFAULT;
1415
1416 if (opmode != RS232_MODE && opmode != RS485_2WIRE_MODE &&
1417 opmode != RS422_MODE &&
1418 opmode != RS485_4WIRE_MODE)
1419 return -EFAULT;
1420
1421 mask = ModeMask[p];
1422
1423 spin_lock_irq(&port->slock);
1424 val = inb(port->opmode_ioaddr);
1425 val &= mask;
1426 val |= (opmode << shiftbit);
1427 outb(val, port->opmode_ioaddr);
1428 spin_unlock_irq(&port->slock);
1429 } else {
1430 spin_lock_irq(&port->slock);
1431 opmode = inb(port->opmode_ioaddr) >> shiftbit;
1432 spin_unlock_irq(&port->slock);
1433
1434 opmode &= OP_MODE_MASK;
1435 if (put_user(opmode, u_opmode))
1436 return -EFAULT;
1437 }
1438
1439 return 0;
1440 }
1441
---
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: 30252 bytes --]
reply other threads:[~2021-03-19 16:56 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=202103200001.Q5Kdtzef-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.