[staging:staging-testing 383/386] drivers//tty/tty_io.c:348:11: warning: assignment discards 'const' qualifier from pointer target type
kbuild test robot
fengguang.wu at intel.com
Sun Jun 25 17:24:43 UTC 2017
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head: 2a38eb6552c934a13e1f1b8c579147fac9c94efb
commit: 9a71d0257f1f63d64015f7d2c25485272df4d535 [383/386] tty: add function to convert device name to number
config: blackfin-allyesconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 9a71d0257f1f63d64015f7d2c25485272df4d535
# save the attached .config to linux build tree
make.cross ARCH=blackfin
All warnings (new ones prefixed by >>):
drivers//tty/tty_io.c: In function 'tty_dev_name_to_number':
>> drivers//tty/tty_io.c:348:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
for (str = name; *str && !isdigit(*str); str++)
^
vim +/const +348 drivers//tty/tty_io.c
332 *
333 * This function converts device names like ttyS0 or ttyUSB1 into dev_t
334 * like (4, 64) or (188, 1). If no corresponding driver is registered then
335 * the function returns -ENODEV.
336 *
337 * Locking: this acquires tty_mutex to protect the tty_drivers list from
338 * being modified while we are traversing it, and makes sure to
339 * release it before exiting.
340 */
341 int tty_dev_name_to_number(const char *name, dev_t *number)
342 {
343 struct tty_driver *p;
344 int ret;
345 int index, prefix_length = 0;
346 char *str;
347
> 348 for (str = name; *str && !isdigit(*str); str++)
349 ;
350
351 if (!*str)
352 return -EINVAL;
353
354 ret = kstrtoint(str, 10, &index);
355 if (ret)
356 return ret;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 44974 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20170626/da017829/attachment-0001.bin>
More information about the devel
mailing list