On Fri, Dec 20, 2019 at 02:37:23PM -0800, James Smart wrote: > This final patch ties the efct driver into the kernel Kconfig > and build linkages in the drivers/scsi directory. > > Signed-off-by: Ram Vegesna <ram.vegesna@xxxxxxxxxxxx> > Signed-off-by: James Smart <jsmart2021@xxxxxxxxx> Hi James, The 0day bot reported a few new clang warnings with this series. Would you mind fixing them in the next version? I've attached how I would resolve them inline, feel free to use them or fix the warnings in a different way. On Wed, Dec 25, 2019 at 04:31:56AM +0800, kbuild test robot wrote: > CC: kbuild-all@xxxxxxxxxxxx > In-Reply-To: <20191220223723.26563-33-jsmart2021@xxxxxxxxx> > References: <20191220223723.26563-33-jsmart2021@xxxxxxxxx> > TO: James Smart <jsmart2021@xxxxxxxxx> > CC: linux-scsi@xxxxxxxxxxxxxxx > CC: maier@xxxxxxxxxxxxx, dwagner@xxxxxxx, bvanassche@xxxxxxx, James Smart <jsmart2021@xxxxxxxxx>, Ram Vegesna <ram.vegesna@xxxxxxxxxxxx> > > 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-20191219] > [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: x86_64-allyesconfig (attached as .config) > compiler: clang version 10.0.0 (git://gitmirror/llvm_project e5a743c4f6e3639ba3bee778c894a996ef96391a) > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot <lkp@xxxxxxxxx> > > All warnings (new ones prefixed by >>): > > >> drivers/scsi/elx/efct/efct_els.c:1736:32: warning: implicit conversion from enumeration type 'enum efct_els_role' to different enumeration type 'enum efct_scsi_io_role' [-Wenum-conversion] > io = efct_scsi_io_alloc(node, EFCT_ELS_ROLE_RESPONDER); > ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~ > 1 warning generated. diff --git a/drivers/scsi/elx/efct/efct_els.c b/drivers/scsi/elx/efct/efct_els.c index 9c964302505b..10e60128a527 100644 --- a/drivers/scsi/elx/efct/efct_els.c +++ b/drivers/scsi/elx/efct/efct_els.c @@ -1733,7 +1733,7 @@ efct_bls_send_acc_hdr(struct efc *efc, struct efc_node *node, u16 rx_id = be16_to_cpu(hdr->fh_rx_id); u32 d_id = ntoh24(hdr->fh_d_id); - io = efct_scsi_io_alloc(node, EFCT_ELS_ROLE_RESPONDER); + io = efct_scsi_io_alloc(node, EFCT_SCSI_IO_ROLE_RESPONDER); if (!io) { efc_log_err(efc, "els IO alloc failed\n"); return io; > >> drivers/scsi/elx/efct/efct_hw.c:5270:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] > if (!sli_cmd_common_nop(&hw->sli, ctx->cmd, > ^ > drivers/scsi/elx/efct/efct_hw.c:5270:6: note: add parentheses after the '!' to evaluate the comparison first > if (!sli_cmd_common_nop(&hw->sli, ctx->cmd, > ^ > ( > drivers/scsi/elx/efct/efct_hw.c:5270:6: note: add parentheses around left hand side expression to silence this warning > if (!sli_cmd_common_nop(&hw->sli, ctx->cmd, > ^ > ( > drivers/scsi/elx/efct/efct_hw.c:5619:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] > if (!sli_cmd_reg_vpi(&hw->sli, data, SLI4_BMBX_SIZE, > ^ > drivers/scsi/elx/efct/efct_hw.c:5619:6: note: add parentheses after the '!' to evaluate the comparison first > if (!sli_cmd_reg_vpi(&hw->sli, data, SLI4_BMBX_SIZE, > ^ > ( > drivers/scsi/elx/efct/efct_hw.c:5619:6: note: add parentheses around left hand side expression to silence this warning > if (!sli_cmd_reg_vpi(&hw->sli, data, SLI4_BMBX_SIZE, > ^ > ( > drivers/scsi/elx/efct/efct_hw.c:5962:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] > if (!sli_cmd_reg_vfi(&hw->sli, data, SLI4_BMBX_SIZE, > ^ > drivers/scsi/elx/efct/efct_hw.c:5962:6: note: add parentheses after the '!' to evaluate the comparison first > if (!sli_cmd_reg_vfi(&hw->sli, data, SLI4_BMBX_SIZE, > ^ > ( > drivers/scsi/elx/efct/efct_hw.c:5962:6: note: add parentheses around left hand side expression to silence this warning > if (!sli_cmd_reg_vfi(&hw->sli, data, SLI4_BMBX_SIZE, > ^ > ( > 3 warnings generated. diff --git a/drivers/scsi/elx/efct/efct_hw.c b/drivers/scsi/elx/efct/efct_hw.c index 23d55d0d26c3..8428c7ff9d72 100644 --- a/drivers/scsi/elx/efct/efct_hw.c +++ b/drivers/scsi/elx/efct/efct_hw.c @@ -5267,8 +5267,8 @@ efct_hw_async_call(struct efct_hw *hw, ctx->arg = arg; /* Build and send a NOP mailbox command */ - if (!sli_cmd_common_nop(&hw->sli, ctx->cmd, - sizeof(ctx->cmd), 0) == 0) { + if (sli_cmd_common_nop(&hw->sli, ctx->cmd, + sizeof(ctx->cmd), 0)) { efc_log_err(hw->os, "COMMON_NOP format failure\n"); kfree(ctx); rc = -1; @@ -5616,10 +5616,10 @@ efct_hw_port_attach_reg_vpi(struct efc_sli_port *sport, void *data) struct efct_hw *hw = sport->hw; int rc; - if (!sli_cmd_reg_vpi(&hw->sli, data, SLI4_BMBX_SIZE, + if (sli_cmd_reg_vpi(&hw->sli, data, SLI4_BMBX_SIZE, sport->fc_id, sport->sli_wwpn, sport->indicator, sport->domain->indicator, - false) == 0) { + false)) { efc_log_err(hw->os, "REG_VPI format failure\n"); efct_hw_port_free_resources(sport, EFC_HW_PORT_ATTACH_FAIL, data); @@ -5959,11 +5959,11 @@ efct_hw_domain_attach_reg_vfi(struct efc_domain *domain, void *data) struct efct_hw *hw = domain->hw; int rc; - if (!sli_cmd_reg_vfi(&hw->sli, data, SLI4_BMBX_SIZE, + if (sli_cmd_reg_vfi(&hw->sli, data, SLI4_BMBX_SIZE, domain->indicator, domain->fcf_indicator, domain->dma, domain->sport->indicator, domain->sport->sli_wwpn, - domain->sport->fc_id) == 0) { + domain->sport->fc_id)) { efc_log_err(hw->os, "REG_VFI format failure\n"); goto cleanup; } > >> drivers/scsi/elx/libefc_sli/sli4.c:202:6: warning: variable 'ver' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] > if (sli4->if_type == SLI4_INTF_IF_TYPE_6) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/scsi/elx/libefc_sli/sli4.c:206:5: note: uninitialized use occurs here > ver, CFG_RQST_PYLD_LEN(cmn_create_eq)); > ^~~ > drivers/scsi/elx/libefc_sli/sli4.c:202:2: note: remove the 'if' if its condition is always true > if (sli4->if_type == SLI4_INTF_IF_TYPE_6) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/scsi/elx/libefc_sli/sli4.c:195:24: note: initialize the variable 'ver' to silence this warning > u32 dw6_flags = 0, ver; > ^ > = 0 > 1 warning generated. Presumably, ver should be initialized to either CMD_V0 or CMD_V1 but I cannot tell. Cheers, Nathan