From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [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
Date: Mon, 25 Jan 2021 01:40:21 +0800 [thread overview]
Message-ID: <202101250110.VFbUjPfK-lkp@intel.com> (raw)
[-- 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 --]
reply other threads:[~2021-01-24 17:40 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=202101250110.VFbUjPfK-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.