* [jirislaby:devel 35/59] net/nfc/nci/uart.c:253:37: warning: passing argument 3 of 'nu->ops.recv_buf' discards 'const' qualifier from pointer target type
@ 2021-01-24 17:40 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-24 17:40 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4102 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: 762f71019fe44ea4d7c7eb082b89631ca72c2fc9
commit: 19191c4b66e0e08abe286780faed0a6fceb818a5 [35/59] const fp of receive_buf
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/commit/?id=19191c4b66e0e08abe286780faed0a6fceb818a5
git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
git fetch --no-tags jirislaby devel
git checkout 19191c4b66e0e08abe286780faed0a6fceb818a5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 >>):
net/nfc/nci/uart.c: In function 'nci_uart_tty_receive':
>> net/nfc/nci/uart.c:253:37: warning: passing argument 3 of 'nu->ops.recv_buf' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
253 | nu->ops.recv_buf(nu, (void *)data, flags, count);
| ^~~~~
net/nfc/nci/uart.c:253:37: note: expected 'char *' but argument is of type 'const char *'
vim +253 net/nfc/nci/uart.c
9961127d4bce6325 Vincent Cuissard 2015-06-11 231
9961127d4bce6325 Vincent Cuissard 2015-06-11 232 /* nci_uart_tty_receive()
9961127d4bce6325 Vincent Cuissard 2015-06-11 233 *
9961127d4bce6325 Vincent Cuissard 2015-06-11 234 * Called by tty low level driver when receive data is
9961127d4bce6325 Vincent Cuissard 2015-06-11 235 * available.
9961127d4bce6325 Vincent Cuissard 2015-06-11 236 *
9961127d4bce6325 Vincent Cuissard 2015-06-11 237 * Arguments: tty pointer to tty isntance data
9961127d4bce6325 Vincent Cuissard 2015-06-11 238 * data pointer to received data
9961127d4bce6325 Vincent Cuissard 2015-06-11 239 * flags pointer to flags for data
9961127d4bce6325 Vincent Cuissard 2015-06-11 240 * count count of received data in bytes
9961127d4bce6325 Vincent Cuissard 2015-06-11 241 *
9961127d4bce6325 Vincent Cuissard 2015-06-11 242 * Return Value: None
9961127d4bce6325 Vincent Cuissard 2015-06-11 243 */
9961127d4bce6325 Vincent Cuissard 2015-06-11 244 static void nci_uart_tty_receive(struct tty_struct *tty, const u8 *data,
19191c4b66e0e08a Jiri Slaby 2021-01-22 245 const char *flags, int count)
9961127d4bce6325 Vincent Cuissard 2015-06-11 246 {
9961127d4bce6325 Vincent Cuissard 2015-06-11 247 struct nci_uart *nu = (void *)tty->disc_data;
9961127d4bce6325 Vincent Cuissard 2015-06-11 248
9961127d4bce6325 Vincent Cuissard 2015-06-11 249 if (!nu || tty != nu->tty)
9961127d4bce6325 Vincent Cuissard 2015-06-11 250 return;
9961127d4bce6325 Vincent Cuissard 2015-06-11 251
9961127d4bce6325 Vincent Cuissard 2015-06-11 252 spin_lock(&nu->rx_lock);
9961127d4bce6325 Vincent Cuissard 2015-06-11 @253 nu->ops.recv_buf(nu, (void *)data, flags, count);
9961127d4bce6325 Vincent Cuissard 2015-06-11 254 spin_unlock(&nu->rx_lock);
9961127d4bce6325 Vincent Cuissard 2015-06-11 255
9961127d4bce6325 Vincent Cuissard 2015-06-11 256 tty_unthrottle(tty);
9961127d4bce6325 Vincent Cuissard 2015-06-11 257 }
9961127d4bce6325 Vincent Cuissard 2015-06-11 258
:::::: The code at line 253 was first introduced by commit
:::::: 9961127d4bce6325e9a0b0fb105e0c85a6c62cb7 NFC: nci: add generic uart support
:::::: TO: Vincent Cuissard <cuissard@marvell.com>
:::::: CC: Samuel Ortiz <sameo@linux.intel.com>
---
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: 54277 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-24 17:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-24 17:40 [jirislaby:devel 35/59] net/nfc/nci/uart.c:253:37: warning: passing argument 3 of 'nu->ops.recv_buf' discards 'const' qualifier from pointer target type kernel test robot
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.