Hi Anil, I love your patch! Perhaps something to improve: [auto build test WARNING on scsi/for-next] [also build test WARNING on next-20171106] [cannot apply to v4.14-rc8] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-FC-NVMe-Target-support/20171107-153645 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next config: i386-randconfig-x001-201745 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): drivers/scsi//qla2xxx/qla_target.c: In function 'qlt_send_els_resp': >> drivers/scsi//qla2xxx/qla_target.c:399:36: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 7 has type 'dma_addr_t {aka unsigned int}' [-Wformat=] "sp: %p, purex: %p, udam: %#llx, loop_id: 0x%x\n", ^ drivers/scsi//qla2xxx/qla_target.c: In function 'qlt_nvme_els_done': drivers/scsi//qla2xxx/qla_target.c:444:50: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 8 has type 'dma_addr_t {aka unsigned int}' [-Wformat=] "sp: %p vha: %p, dma_ptr: %p, dma_addr: %#llx, len: %#x\n", ^ drivers/scsi//qla2xxx/qla_target.c: In function 'qlt_send_plogi_resp': drivers/scsi//qla2xxx/qla_target.c:474:63: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 8 has type 'dma_addr_t {aka unsigned int}' [-Wformat=] "sp: %p, vha: %p, plogi_ack_buf: %p, plogi_ack_udma: %#llx\n", ^ >> drivers/scsi//qla2xxx/qla_target.c:488:40: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = qla2x00_get_plogi_template(vha, (uint64_t)tmp, (116/4 - 1)); ^ drivers/scsi//qla2xxx/qla_target.c: In function 'qlt_process_logo': drivers/scsi//qla2xxx/qla_target.c:688:60: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 8 has type 'dma_addr_t {aka unsigned int}' [-Wformat=] "sp: %p, vha: %p, logo_ack_buf: %p, logo_ack_buf: %#llx\n", ^ drivers/scsi//qla2xxx/qla_target.c: In function 'qlt_process_prli': drivers/scsi//qla2xxx/qla_target.c:753:61: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 8 has type 'dma_addr_t {aka unsigned int}' [-Wformat=] "sp: %p, vha: %p, prli_ack_buf: %p, prli_ack_udma: %#llx\n", ^ vim +399 drivers/scsi//qla2xxx/qla_target.c 375 376 /* Send an ELS response */ 377 int qlt_send_els_resp(srb_t *sp, struct __els_pt *els_pkt) 378 { 379 struct purex_entry_24xx *purex = (struct purex_entry_24xx *) 380 sp->u.snvme_els.ptr; 381 dma_addr_t udma = sp->u.snvme_els.dma_addr; 382 struct fc_port *fcport; 383 port_id_t port_id; 384 uint16_t loop_id; 385 386 port_id.b.domain = purex->s_id[2]; 387 port_id.b.area = purex->s_id[1]; 388 port_id.b.al_pa = purex->s_id[0]; 389 port_id.b.rsvd_1 = 0; 390 391 fcport = qla2x00_find_fcport_by_nportid(sp->vha, &port_id, 1); 392 if (fcport) 393 /* There is no session with the swt */ 394 loop_id = fcport->loop_id; 395 else 396 loop_id = 0xFFFF; 397 398 ql_log(ql_log_info, sp->vha, 0xfff9, > 399 "sp: %p, purex: %p, udam: %#llx, loop_id: 0x%x\n", 400 sp, purex, udma, loop_id); 401 402 els_pkt->entry_type = ELS_IOCB_TYPE; 403 els_pkt->entry_count = 1; 404 405 els_pkt->handle = sp->handle; 406 els_pkt->nphdl = cpu_to_le16(loop_id); 407 els_pkt->tx_dsd_cnt = cpu_to_le16(1); 408 els_pkt->vp_index = purex->vp_idx; 409 els_pkt->sof = EST_SOFI3; 410 els_pkt->rcv_exchg_id = cpu_to_le32(purex->rx_xchg_addr); 411 els_pkt->op_code = sp->cmd_type; 412 els_pkt->did_lo = cpu_to_le16(purex->s_id[0] | (purex->s_id[1] << 8)); 413 els_pkt->did_hi = purex->s_id[2]; 414 els_pkt->sid_hi = purex->d_id[2]; 415 els_pkt->sid_lo = cpu_to_le16(purex->d_id[0] | (purex->d_id[1] << 8)); 416 417 if (sp->gen2 == ELS_ACC) 418 els_pkt->cntl_flags = cpu_to_le16(EPD_ELS_ACC); 419 else 420 els_pkt->cntl_flags = cpu_to_le16(EPD_ELS_RJT); 421 422 els_pkt->tx_bc = cpu_to_le32(sp->gen1); 423 els_pkt->tx_dsd[0] = cpu_to_le32(LSD(udma)); 424 els_pkt->tx_dsd[1] = cpu_to_le32(MSD(udma)); 425 els_pkt->tx_dsd_len = cpu_to_le32(sp->gen1); 426 /* Memory Barrier */ 427 wmb(); 428 429 ql_log(ql_log_info, sp->vha, 0x11030, "Dumping PLOGI ELS\n"); 430 ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, sp->vha, 0xffff, 431 (uint8_t *)els_pkt, sizeof(*els_pkt)); 432 433 return 0; 434 } 435 436 static void qlt_nvme_els_done(void *s, int res) 437 { 438 struct srb *sp = s; 439 440 ql_log(ql_log_info, sp->vha, 0x11031, 441 "Done with NVME els command\n"); 442 443 ql_log(ql_log_info, sp->vha, 0x11032, > 444 "sp: %p vha: %p, dma_ptr: %p, dma_addr: %#llx, len: %#x\n", 445 sp, sp->vha, sp->u.snvme_els.dma_ptr, sp->u.snvme_els.dma_addr, 446 sp->gen1); 447 448 qla2x00_rel_sp(sp); 449 } 450 451 static int qlt_send_plogi_resp(struct scsi_qla_host *vha, uint8_t op_code, 452 struct purex_entry_24xx *purex, struct fc_port *fcport) 453 { 454 int ret, rval, i; 455 dma_addr_t plogi_ack_udma = vha->vha_tgt.qla_tgt->nvme_els_rsp; 456 void *plogi_ack_buf = vha->vha_tgt.qla_tgt->nvme_els_ptr; 457 uint8_t *tmp; 458 uint32_t *opcode; 459 srb_t *sp; 460 461 /* Alloc SRB structure */ 462 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL); 463 if (!sp) { 464 ql_log(ql_log_info, vha, 0x11033, 465 "Failed to allocate SRB\n"); 466 return -ENOMEM; 467 } 468 469 sp->type = SRB_NVME_ELS_RSP; 470 sp->done = qlt_nvme_els_done; 471 sp->vha = vha; 472 473 ql_log(ql_log_info, vha, 0x11034, 474 "sp: %p, vha: %p, plogi_ack_buf: %p, plogi_ack_udma: %#llx\n", 475 sp, vha, plogi_ack_buf, plogi_ack_udma); 476 477 sp->u.snvme_els.dma_addr = plogi_ack_udma; 478 sp->u.snvme_els.dma_ptr = plogi_ack_buf; 479 sp->gen1 = 116; 480 sp->gen2 = ELS_ACC; 481 sp->u.snvme_els.ptr = (struct purex_entry_24xx *)purex; 482 sp->cmd_type = ELS_PLOGI; 483 484 tmp = (uint8_t *)plogi_ack_udma; 485 486 tmp += 4; /* fw doesn't return 1st 4 bytes where opcode goes */ 487 > 488 ret = qla2x00_get_plogi_template(vha, (uint64_t)tmp, (116/4 - 1)); 489 if (ret) { 490 ql_log(ql_log_warn, vha, 0x11035, 491 "Failed to get plogi template\n"); 492 return -ENOMEM; 493 } 494 495 opcode = (uint32_t *) plogi_ack_buf; 496 *opcode = cpu_to_be32(ELS_ACC << 24); 497 498 for (i = 0; i < 0x1c; i++) { 499 ++opcode; 500 *opcode = cpu_to_be32(*opcode); 501 } 502 503 ql_dbg(ql_dbg_disc + ql_dbg_verbose, vha, 0xfff3, 504 "Dumping the PLOGI from fw\n"); 505 ql_dump_buffer(ql_dbg_disc + ql_dbg_verbose, vha, 0x70cf, 506 (uint8_t *)plogi_ack_buf, 116); 507 508 rval = qla2x00_start_sp(sp); 509 if (rval != QLA_SUCCESS) 510 qla2x00_rel_sp(sp); 511 512 return 0; 513 } 514 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip