Hi James, I love your patch! Perhaps something to improve: [auto build test WARNING on mkp-scsi/for-next] [also build test WARNING on scsi/for-next linus/master v5.5-rc3 next-20191220] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/James-Smart/efct-Broadcom-Emulex-FC-Target-driver/20191224-054519 base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next config: i386-allyesconfig (attached as .config) compiler: gcc-7 (Debian 7.5.0-3) 7.5.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): In file included from include/linux/pci.h:37:0, from drivers/scsi/elx/efct/efct_driver.h:23, from drivers/scsi/elx/efct/efct_driver.c:7: drivers/scsi/elx/efct/efct_driver.c: In function 'efct_request_firmware_update': >> drivers/scsi/elx/efct/efct_driver.c:530:10: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t {aka const unsigned int}' [-Wformat=] "Invalid FW image found Magic: 0x%x Size: %ld\n", ^ include/linux/device.h:1691:22: note: in definition of macro 'dev_fmt' #define dev_fmt(fmt) fmt ^~~ >> drivers/scsi/elx/efct/../include/efc_common.h:32:3: note: in expansion of macro 'dev_warn' dev_warn(&((efc)->pcidev)->dev, fmt, ##args) ^~~~~~~~ >> drivers/scsi/elx/efct/efct_driver.c:529:3: note: in expansion of macro 'efc_log_warn' efc_log_warn(efct, ^~~~~~~~~~~~ -- In file included from include/linux/pci.h:37:0, from drivers/scsi/elx/efct/efct_driver.h:23, from drivers/scsi/elx/efct/efct_scsi.c:7: drivers/scsi/elx/efct/efct_scsi.c: In function 'efct_scsi_build_sgls': >> drivers/scsi/elx/efct/efct_scsi.c:346:13: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'size_t {aka unsigned int}' [-Wformat=] "sgl[%d] len of %ld is not multiple of blocksize\n", ^ include/linux/device.h:1691:22: note: in definition of macro 'dev_fmt' #define dev_fmt(fmt) fmt ^~~ >> drivers/scsi/elx/efct/../include/efc_common.h:38:3: note: in expansion of macro 'dev_dbg' dev_dbg(&((efc)->pcidev)->dev, fmt, ##args) ^~~~~~~ >> drivers/scsi/elx/efct/efct_scsi.c:345:6: note: in expansion of macro 'efc_log_test' efc_log_test(efct, ^~~~~~~~~~~~ -- In file included from include/linux/pci.h:37:0, from drivers/scsi/elx/libefc_sli/sli4.h:15, from drivers/scsi/elx/libefc_sli/sli4.c:11: drivers/scsi/elx/libefc_sli/sli4.c: In function 'sli_cmd_read_topology': >> drivers/scsi/elx/libefc_sli/sli4.c:3753:23: warning: format '%jd' expects argument of type 'intmax_t', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=] efc_log_info(sli4, "loop map buffer too small %jd\n", ^ include/linux/device.h:1691:22: note: in definition of macro 'dev_fmt' #define dev_fmt(fmt) fmt ^~~ >> drivers/scsi/elx/libefc_sli/../include/efc_common.h:35:3: note: in expansion of macro 'dev_info' dev_info(&((efc)->pcidev)->dev, fmt, ##args) ^~~~~~~~ >> drivers/scsi/elx/libefc_sli/sli4.c:3753:4: note: in expansion of macro 'efc_log_info' efc_log_info(sli4, "loop map buffer too small %jd\n", ^~~~~~~~~~~~ vim +530 drivers/scsi/elx/efct/efct_driver.c 3bd67f890edb8f James Smart 2019-12-20 507 3bd67f890edb8f James Smart 2019-12-20 508 static int 3bd67f890edb8f James Smart 2019-12-20 509 efct_request_firmware_update(struct efct *efct) 3bd67f890edb8f James Smart 2019-12-20 510 { 3bd67f890edb8f James Smart 2019-12-20 511 int rc = 0; 3bd67f890edb8f James Smart 2019-12-20 512 u8 file_name[256], fw_change_status = 0; 3bd67f890edb8f James Smart 2019-12-20 513 const struct firmware *fw; 3bd67f890edb8f James Smart 2019-12-20 514 struct efct_hw_grp_hdr *fw_image; 3bd67f890edb8f James Smart 2019-12-20 515 3bd67f890edb8f James Smart 2019-12-20 516 snprintf(file_name, 256, "%s.grp", efct->model); 3bd67f890edb8f James Smart 2019-12-20 517 rc = request_firmware(&fw, file_name, &efct->pcidev->dev); 3bd67f890edb8f James Smart 2019-12-20 518 if (rc) { 3bd67f890edb8f James Smart 2019-12-20 519 efc_log_err(efct, "Firmware file(%s) not found.\n", file_name); 3bd67f890edb8f James Smart 2019-12-20 520 return rc; 3bd67f890edb8f James Smart 2019-12-20 521 } 3bd67f890edb8f James Smart 2019-12-20 522 fw_image = (struct efct_hw_grp_hdr *)fw->data; 3bd67f890edb8f James Smart 2019-12-20 523 3bd67f890edb8f James Smart 2019-12-20 524 /* Check if firmware provided is compatible with this particular 3bd67f890edb8f James Smart 2019-12-20 525 * Adapter of not 3bd67f890edb8f James Smart 2019-12-20 526 */ 3bd67f890edb8f James Smart 2019-12-20 527 if ((be32_to_cpu(fw_image->magic_number) != EFCT_HW_OBJECT_G5) && 3bd67f890edb8f James Smart 2019-12-20 528 (be32_to_cpu(fw_image->magic_number) != EFCT_HW_OBJECT_G6)) { 3bd67f890edb8f James Smart 2019-12-20 @529 efc_log_warn(efct, 3bd67f890edb8f James Smart 2019-12-20 @530 "Invalid FW image found Magic: 0x%x Size: %ld\n", 3bd67f890edb8f James Smart 2019-12-20 531 be32_to_cpu(fw_image->magic_number), fw->size); 3bd67f890edb8f James Smart 2019-12-20 532 rc = -1; 3bd67f890edb8f James Smart 2019-12-20 533 goto exit; 3bd67f890edb8f James Smart 2019-12-20 534 } 3bd67f890edb8f James Smart 2019-12-20 535 3bd67f890edb8f James Smart 2019-12-20 536 if (!strncmp(efct->fw_version, fw_image->revision, 3bd67f890edb8f James Smart 2019-12-20 537 strnlen(fw_image->revision, 16))) { 3bd67f890edb8f James Smart 2019-12-20 538 efc_log_debug(efct, 3bd67f890edb8f James Smart 2019-12-20 539 "No update req. Firmware is already up to date.\n"); 3bd67f890edb8f James Smart 2019-12-20 540 rc = 0; 3bd67f890edb8f James Smart 2019-12-20 541 goto exit; 3bd67f890edb8f James Smart 2019-12-20 542 } 3bd67f890edb8f James Smart 2019-12-20 543 rc = efct_firmware_write(efct, fw->data, fw->size, &fw_change_status); 3bd67f890edb8f James Smart 2019-12-20 544 if (rc) { 3bd67f890edb8f James Smart 2019-12-20 545 efc_log_err(efct, 3bd67f890edb8f James Smart 2019-12-20 546 "Firmware update failed. Return code = %d\n", rc); 3bd67f890edb8f James Smart 2019-12-20 547 } else { 3bd67f890edb8f James Smart 2019-12-20 548 efc_log_info(efct, "Firmware updated successfully\n"); 3bd67f890edb8f James Smart 2019-12-20 549 switch (fw_change_status) { 3bd67f890edb8f James Smart 2019-12-20 550 case 0x00: 3bd67f890edb8f James Smart 2019-12-20 551 efc_log_debug(efct, 3bd67f890edb8f James Smart 2019-12-20 552 "No reset needed, new firmware is active.\n"); 3bd67f890edb8f James Smart 2019-12-20 553 break; 3bd67f890edb8f James Smart 2019-12-20 554 case 0x01: 3bd67f890edb8f James Smart 2019-12-20 555 efc_log_warn(efct, 3bd67f890edb8f James Smart 2019-12-20 556 "A physical device reset (host reboot) is needed to activate the new firmware\n"); 3bd67f890edb8f James Smart 2019-12-20 557 break; 3bd67f890edb8f James Smart 2019-12-20 558 case 0x02: 3bd67f890edb8f James Smart 2019-12-20 559 case 0x03: 3bd67f890edb8f James Smart 2019-12-20 560 efc_log_debug(efct, 3bd67f890edb8f James Smart 2019-12-20 561 "firmware is resetting to activate the new firmware\n"); 3bd67f890edb8f James Smart 2019-12-20 562 efct_fw_reset(efct); 3bd67f890edb8f James Smart 2019-12-20 563 break; 3bd67f890edb8f James Smart 2019-12-20 564 default: 3bd67f890edb8f James Smart 2019-12-20 565 efc_log_debug(efct, 3bd67f890edb8f James Smart 2019-12-20 566 "Unexected value change_status: %d\n", 3bd67f890edb8f James Smart 2019-12-20 567 fw_change_status); 3bd67f890edb8f James Smart 2019-12-20 568 break; 3bd67f890edb8f James Smart 2019-12-20 569 } 3bd67f890edb8f James Smart 2019-12-20 570 } 3bd67f890edb8f James Smart 2019-12-20 571 3bd67f890edb8f James Smart 2019-12-20 572 exit: 3bd67f890edb8f James Smart 2019-12-20 573 release_firmware(fw); 3bd67f890edb8f James Smart 2019-12-20 574 3bd67f890edb8f James Smart 2019-12-20 575 return rc; 3bd67f890edb8f James Smart 2019-12-20 576 } 3bd67f890edb8f James Smart 2019-12-20 577 :::::: The code at line 530 was first introduced by commit :::::: 3bd67f890edb8fd4fc7c9902b8f11e2041571d9a elx: efct: Driver initialization routines :::::: TO: James Smart <jsmart2021@xxxxxxxxx> :::::: CC: 0day robot <lkp@xxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation
Attachment:
.config.gz
Description: application/gzip