drivers/spi/spi-pic32-sqi.c:749:34: warning: 'pic32_sqi_of_ids' defined but not used

From: kernel test robot
Date: Sun Nov 05 2023 - 02:30:33 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: aea6bf908d730b01bd264a8821159db9463c111c
commit: 3270ac230f660843a7f7d631746ee2c8ee63f347 spi: pic32-sqi: add SPI driver for PIC32 SQI controller.
date: 8 years ago
config: x86_64-buildonly-randconfig-001-20231101 (https://download.01.org/0day-ci/archive/20231105/202311051543.C4ewiBWU-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231105/202311051543.C4ewiBWU-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311051543.C4ewiBWU-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from include/linux/kobject.h:21,
from include/linux/device.h:17,
from include/linux/dma-mapping.h:6,
from drivers/spi/spi-pic32-sqi.c:18:
include/linux/sysfs.h: In function 'sysfs_get_dirent':
include/linux/sysfs.h:517:44: warning: pointer targets in passing argument 2 of 'kernfs_find_and_get' differ in signedness [-Wpointer-sign]
517 | return kernfs_find_and_get(parent, name);
| ^~~~
| |
| const unsigned char *
In file included from include/linux/sysfs.h:15:
include/linux/kernfs.h:437:57: note: expected 'const char *' but argument is of type 'const unsigned char *'
437 | kernfs_find_and_get(struct kernfs_node *kn, const char *name)
| ~~~~~~~~~~~~^~~~
drivers/spi/spi-pic32-sqi.c: At top level:
>> drivers/spi/spi-pic32-sqi.c:749:34: warning: 'pic32_sqi_of_ids' defined but not used [-Wunused-const-variable=]
749 | static const struct of_device_id pic32_sqi_of_ids[] = {
| ^~~~~~~~~~~~~~~~


vim +/pic32_sqi_of_ids +749 drivers/spi/spi-pic32-sqi.c

748
> 749 static const struct of_device_id pic32_sqi_of_ids[] = {
750 {.compatible = "microchip,pic32mzda-sqi",},
751 {},
752 };
753 MODULE_DEVICE_TABLE(of, pic32_sqi_of_ids);
754

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki