tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git const_driver head: 8e41ff96c9c6e36d7f4887ad6f6224fcd889ac38 commit: 8e41ff96c9c6e36d7f4887ad6f6224fcd889ac38 [8/8] driver core: have match() callback in struct bus_type take a const * config: s390-allnoconfig (https://download.01.org/0day-ci/archive/20240611/202406111607.3OiraQK0-lkp@xxxxxxxxx/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 4403cdbaf01379de96f8d0d6ea4f51a085e37766) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240611/202406111607.3OiraQK0-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/202406111607.3OiraQK0-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from drivers/s390/cio/device.c:21: In file included from include/linux/device.h:32: In file included from include/linux/device/driver.h:21: In file included from include/linux/module.h:19: In file included from include/linux/elf.h:6: In file included from arch/s390/include/asm/elf.h:173: In file included from arch/s390/include/asm/mmu_context.h:11: In file included from arch/s390/include/asm/pgalloc.h:18: In file included from include/linux/mm.h:2253: include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ In file included from drivers/s390/cio/device.c:27: In file included from include/linux/dma-mapping.h:11: In file included from include/linux/scatterlist.h:9: In file included from arch/s390/include/asm/io.h:93: include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 548 | val = __raw_readb(PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 561 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) | ^ include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16' 102 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) | ^ In file included from drivers/s390/cio/device.c:27: In file included from include/linux/dma-mapping.h:11: In file included from include/linux/scatterlist.h:9: In file included from arch/s390/include/asm/io.h:93: include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 574 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu' 35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) | ^ include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32' 115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) | ^ In file included from drivers/s390/cio/device.c:27: In file included from include/linux/dma-mapping.h:11: In file included from include/linux/scatterlist.h:9: In file included from arch/s390/include/asm/io.h:93: include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 585 | __raw_writeb(value, PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 595 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 605 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:693:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 693 | readsb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:701:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 701 | readsw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:709:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 709 | readsl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:718:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 718 | writesb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:727:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 727 | writesw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:736:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 736 | writesl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ >> drivers/s390/cio/device.c:64:21: error: initializing 'struct ccw_driver *' with an expression of type 'const struct ccw_driver *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] 64 | struct ccw_driver *cdrv = to_ccwdrv(drv); | ^ ~~~~~~~~~~~~~~ 13 warnings and 1 error generated. vim +64 drivers/s390/cio/device.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 55 ^1da177e4c3f41 Linus Torvalds 2005-04-16 56 /* The Linux driver model distinguishes between a bus type and ^1da177e4c3f41 Linus Torvalds 2005-04-16 57 * the bus itself. Of course we only have one channel ^1da177e4c3f41 Linus Torvalds 2005-04-16 58 * subsystem driver and one channel system per machine, but ^1da177e4c3f41 Linus Torvalds 2005-04-16 59 * we still use the abstraction. T.R. says it's a good idea. */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 60 static int 8e41ff96c9c6e3 Greg Kroah-Hartman 2024-06-10 61 ccw_bus_match (struct device * dev, const struct device_driver * drv) ^1da177e4c3f41 Linus Torvalds 2005-04-16 62 { ^1da177e4c3f41 Linus Torvalds 2005-04-16 63 struct ccw_device *cdev = to_ccwdev(dev); ^1da177e4c3f41 Linus Torvalds 2005-04-16 @64 struct ccw_driver *cdrv = to_ccwdrv(drv); ^1da177e4c3f41 Linus Torvalds 2005-04-16 65 const struct ccw_device_id *ids = cdrv->ids, *found; ^1da177e4c3f41 Linus Torvalds 2005-04-16 66 ^1da177e4c3f41 Linus Torvalds 2005-04-16 67 if (!ids) ^1da177e4c3f41 Linus Torvalds 2005-04-16 68 return 0; ^1da177e4c3f41 Linus Torvalds 2005-04-16 69 ^1da177e4c3f41 Linus Torvalds 2005-04-16 70 found = ccw_device_id_match(ids, &cdev->id); ^1da177e4c3f41 Linus Torvalds 2005-04-16 71 if (!found) ^1da177e4c3f41 Linus Torvalds 2005-04-16 72 return 0; ^1da177e4c3f41 Linus Torvalds 2005-04-16 73 ^1da177e4c3f41 Linus Torvalds 2005-04-16 74 cdev->id.driver_info = found->driver_info; ^1da177e4c3f41 Linus Torvalds 2005-04-16 75 ^1da177e4c3f41 Linus Torvalds 2005-04-16 76 return 1; ^1da177e4c3f41 Linus Torvalds 2005-04-16 77 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 78 :::::: The code at line 64 was first introduced by commit :::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2 :::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx> :::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel