tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing head: 156c3df8d4db4e693c062978186f44079413d74d commit: 02211edc9a1f71942a67d545614f8c7382230de7 [704/736] staging: wilc1000: fix endianness warnings reported by sparse config: xtensa-allyesconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 8.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 02211edc9a1f71942a67d545614f8c7382230de7 # save the attached .config to linux build tree GCC_VERSION=8.1.0 make.cross ARCH=xtensa All warnings (new ones prefixed by >>): In file included from include/linux/byteorder/big_endian.h:5, from arch/xtensa/include/uapi/asm/byteorder.h:8, from arch/xtensa/include/asm/bitops.h:23, from include/linux/bitops.h:38, from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/kobject.h:19, from include/linux/device.h:16, from include/linux/mmc/sdio_func.h:15, from drivers/staging//wilc1000/wilc_sdio.c:8: drivers/staging//wilc1000/wilc_sdio.c: In function 'sdio_read_reg': >> drivers/staging//wilc1000/wilc_sdio.c:566:15: warning: passing argument 1 of '__swab32s' makes pointer from integer without a cast [-Wint-conversion] le32_to_cpus(*data); include/uapi/linux/byteorder/big_endian.h:95:38: note: in definition of macro '__le32_to_cpus' #define __le32_to_cpus(x) __swab32s((x)) ^ drivers/staging//wilc1000/wilc_sdio.c:566:2: note: in expansion of macro 'le32_to_cpus' le32_to_cpus(*data); ^~~~~~~~~~~~ In file included from include/linux/swab.h:5, from include/uapi/linux/byteorder/big_endian.h:13, from include/linux/byteorder/big_endian.h:5, from arch/xtensa/include/uapi/asm/byteorder.h:8, from arch/xtensa/include/asm/bitops.h:23, from include/linux/bitops.h:38, from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/kobject.h:19, from include/linux/device.h:16, from include/linux/mmc/sdio_func.h:15, from drivers/staging//wilc1000/wilc_sdio.c:8: include/uapi/linux/swab.h:242:46: note: expected '__u32 *' {aka 'unsigned int *'} but argument is of type 'u32' {aka 'unsigned int'} static __always_inline void __swab32s(__u32 *p) ~~~~~~~^ -- In file included from include/linux/byteorder/big_endian.h:5, from arch/xtensa/include/uapi/asm/byteorder.h:8, from arch/xtensa/include/asm/bitops.h:23, from include/linux/bitops.h:38, from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/kobject.h:19, from include/linux/device.h:16, from include/linux/spi/spi.h:18, from drivers/staging//wilc1000/wilc_spi.c:8: drivers/staging//wilc1000/wilc_spi.c: In function 'spi_internal_read': >> drivers/staging//wilc1000/wilc_spi.c:702:15: warning: passing argument 1 of '__swab32s' makes pointer from integer without a cast [-Wint-conversion] le32_to_cpus(*data); include/uapi/linux/byteorder/big_endian.h:95:38: note: in definition of macro '__le32_to_cpus' #define __le32_to_cpus(x) __swab32s((x)) ^ drivers/staging//wilc1000/wilc_spi.c:702:2: note: in expansion of macro 'le32_to_cpus' le32_to_cpus(*data); ^~~~~~~~~~~~ In file included from include/linux/swab.h:5, from include/uapi/linux/byteorder/big_endian.h:13, from include/linux/byteorder/big_endian.h:5, from arch/xtensa/include/uapi/asm/byteorder.h:8, from arch/xtensa/include/asm/bitops.h:23, from include/linux/bitops.h:38, from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/kobject.h:19, from include/linux/device.h:16, from include/linux/spi/spi.h:18, from drivers/staging//wilc1000/wilc_spi.c:8: include/uapi/linux/swab.h:242:46: note: expected '__u32 *' {aka 'unsigned int *'} but argument is of type 'u32' {aka 'unsigned int'} static __always_inline void __swab32s(__u32 *p) ~~~~~~~^ In file included from include/linux/byteorder/big_endian.h:5, from arch/xtensa/include/uapi/asm/byteorder.h:8, from arch/xtensa/include/asm/bitops.h:23, from include/linux/bitops.h:38, from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/kobject.h:19, from include/linux/device.h:16, from include/linux/spi/spi.h:18, from drivers/staging//wilc1000/wilc_spi.c:8: drivers/staging//wilc1000/wilc_spi.c: In function 'wilc_spi_read_reg': drivers/staging//wilc1000/wilc_spi.c:781:15: warning: passing argument 1 of '__swab32s' makes pointer from integer without a cast [-Wint-conversion] le32_to_cpus(*data); include/uapi/linux/byteorder/big_endian.h:95:38: note: in definition of macro '__le32_to_cpus' #define __le32_to_cpus(x) __swab32s((x)) ^ drivers/staging//wilc1000/wilc_spi.c:781:2: note: in expansion of macro 'le32_to_cpus' le32_to_cpus(*data); ^~~~~~~~~~~~ In file included from include/linux/swab.h:5, from include/uapi/linux/byteorder/big_endian.h:13, from include/linux/byteorder/big_endian.h:5, from arch/xtensa/include/uapi/asm/byteorder.h:8, from arch/xtensa/include/asm/bitops.h:23, from include/linux/bitops.h:38, from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/kobject.h:19, from include/linux/device.h:16, from include/linux/spi/spi.h:18, from drivers/staging//wilc1000/wilc_spi.c:8: include/uapi/linux/swab.h:242:46: note: expected '__u32 *' {aka 'unsigned int *'} but argument is of type 'u32' {aka 'unsigned int'} static __always_inline void __swab32s(__u32 *p) ~~~~~~~^ vim +/__swab32s +566 drivers/staging//wilc1000/wilc_sdio.c 523 524 static int sdio_read_reg(struct wilc *wilc, u32 addr, u32 *data) 525 { 526 struct sdio_func *func = dev_to_sdio_func(wilc->dev); 527 int ret; 528 529 if (addr >= 0xf0 && addr <= 0xff) { 530 struct sdio_cmd52 cmd; 531 532 cmd.read_write = 0; 533 cmd.function = 0; 534 cmd.raw = 0; 535 cmd.address = addr; 536 ret = wilc_sdio_cmd52(wilc, &cmd); 537 if (ret) { 538 dev_err(&func->dev, 539 "Failed cmd 52, read reg (%08x) ...\n", addr); 540 goto fail; 541 } 542 *data = cmd.data; 543 } else { 544 struct sdio_cmd53 cmd; 545 546 if (!sdio_set_func0_csa_address(wilc, addr)) 547 goto fail; 548 549 cmd.read_write = 0; 550 cmd.function = 0; 551 cmd.address = 0x10f; 552 cmd.block_mode = 0; 553 cmd.increment = 1; 554 cmd.count = 4; 555 cmd.buffer = (u8 *)data; 556 557 cmd.block_size = g_sdio.block_size; 558 ret = wilc_sdio_cmd53(wilc, &cmd); 559 if (ret) { 560 dev_err(&func->dev, 561 "Failed cmd53, read reg (%08x)...\n", addr); 562 goto fail; 563 } 564 } 565 > 566 le32_to_cpus(*data); 567 568 return 1; 569 570 fail: 571 572 return 0; 573 } 574 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip
_______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel