All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: James Smart <jsmart2021@gmail.com>
Cc: kbuild-all@lists.01.org, linux-scsi@vger.kernel.org,
	dwagner@suse.de, maier@linux.ibm.com, bvanassche@acm.org,
	herbszt@gmx.de, natechancellor@gmail.com, rdunlap@infradead.org,
	hare@suse.de, James Smart <jsmart2021@gmail.com>,
	Ram Vegesna <ram.vegesna@broadcom.com>
Subject: Re: [PATCH v3 31/31] elx: efct: Tie into kernel Kconfig and build process
Date: Sun, 12 Apr 2020 15:56:04 +0800	[thread overview]
Message-ID: <202004121536.BAc7Prmw%lkp@intel.com> (raw)
In-Reply-To: <20200412033303.29574-32-jsmart2021@gmail.com>

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.6 next-20200412]
[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/20200412-114125
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>


cppcheck warnings: (new ones prefixed by >>)

>> drivers/scsi/elx/efct/efct_driver.c:829:5: warning: Redundant initialization for 'rc'. The initialized value is overwritten before it is read. [redundantInitialization]
    rc = efct_device_init();
       ^
   drivers/scsi/elx/efct/efct_driver.c:827:9: note: rc is initialized
    int rc = -ENODEV;
           ^
   drivers/scsi/elx/efct/efct_driver.c:829:5: note: rc is overwritten
    rc = efct_device_init();
       ^
   drivers/scsi/elx/efct/efct_driver.c:255:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc = 0, i;
        ^
   drivers/scsi/elx/efct/efct_driver.c:255:14: warning: The scope of the variable 'i' can be reduced. [variableScope]
    int rc = 0, i;
                ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_driver.c:255:9: warning: Variable 'rc' is assigned a value that is never used. [unreadVariable]
    int rc = 0, i;
           ^
--
>> drivers/scsi/elx/efct/efct_scsi.c:869:34: warning: Either the condition '!fcprsp' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
     u8 *sns_data = io->rspbuf.virt + sizeof(*fcprsp);
                                    ^
   drivers/scsi/elx/efct/efct_scsi.c:871:7: note: Assuming that condition '!fcprsp' is not redundant
     if (!fcprsp) {
         ^
   drivers/scsi/elx/efct/efct_scsi.c:868:48: note: Assignment from 'io->rspbuf.virt'
     struct fcp_resp_with_ext *fcprsp = io->rspbuf.virt;
                                                  ^
   drivers/scsi/elx/efct/efct_scsi.c:869:34: note: Null pointer addition
     u8 *sns_data = io->rspbuf.virt + sizeof(*fcprsp);
                                    ^
   drivers/scsi/elx/efct/efct_scsi.c:467:21: warning: The scope of the variable 'hio' can be reduced. [variableScope]
    struct efct_hw_io *hio;
                       ^
   drivers/scsi/elx/efct/efct_scsi.c:470:6: warning: The scope of the variable 'dispatch' can be reduced. [variableScope]
    int dispatch;
        ^
>> drivers/scsi/elx/efct/efct_scsi.c:869:34: warning: 'io->rspbuf.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
     u8 *sns_data = io->rspbuf.virt + sizeof(*fcprsp);
                                    ^
   drivers/scsi/elx/efct/efct_scsi.c:1045:28: warning: 'io->rspbuf.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    rspinfo = io->rspbuf.virt + sizeof(*fcprsp);
                              ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_scsi.c:482:10: warning: Variable 'status' is assigned a value that is never used. [unreadVariable]
     status = 0;
            ^
--
   drivers/scsi/elx/efct/efct_els.c:1767:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
>> drivers/scsi/elx/efct/efct_els.c:980:32: warning: 'els->els_req.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    rscn_page = els->els_req.virt + sizeof(*req);
                                  ^
   drivers/scsi/elx/efct/efct_els.c:1471:28: warning: 'els->els_req.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    rftid = els->els_req.virt + sizeof(*ct);
                              ^
   drivers/scsi/elx/efct/efct_els.c:1515:28: warning: 'els->els_req.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    rffid = els->els_req.virt + sizeof(*ct);
                              ^
   drivers/scsi/elx/efct/efct_els.c:1567:28: warning: 'els->els_req.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    gidpt = els->els_req.virt + sizeof(*ct);
                              ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_els.c:1600:8: warning: Variable 's_id' is assigned a value that is never used. [unreadVariable]
     s_id = U32_MAX;
          ^
--
>> drivers/scsi/elx/efct/efct_xport.c:341:6: warning: Variable 'rc' is reassigned a value before the old one has been used. [redundantAssignment]
     rc = efct_hw_get_host_stats(&efct->hw, 1,
        ^
   drivers/scsi/elx/efct/efct_xport.c:329:6: note: rc is assigned
     rc = efct_hw_get_link_stats(&efct->hw, 0, 1, 1,
        ^
   drivers/scsi/elx/efct/efct_xport.c:341:6: note: rc is overwritten
     rc = efct_hw_get_host_stats(&efct->hw, 1,
        ^
   drivers/scsi/elx/efct/efct_xport.c:619:17: warning: The scope of the variable 'timeout' can be reduced. [variableScope]
     unsigned long timeout;
                   ^
   drivers/scsi/elx/efct/efct_xport.c:836:23: warning: The scope of the variable 'sport' can be reduced. [variableScope]
    struct efc_sli_port *sport;
                         ^
   drivers/scsi/elx/efct/efct_xport.c:884:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
>> drivers/scsi/elx/efct/efct_xport.c:678:16: warning: Local variable 'efct' shadows outer variable [shadowVariable]
     struct efct *efct;
                  ^
   drivers/scsi/elx/efct/efct_xport.c:590:15: note: Shadowed declaration
    struct efct *efct = NULL;
                 ^
   drivers/scsi/elx/efct/efct_xport.c:678:16: note: Shadow variable
     struct efct *efct;
                  ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
--
   drivers/scsi/elx/efct/efct_hw.c:871:16: warning: The scope of the variable 'rq' can be reduced. [variableScope]
    struct hw_rq *rq;
                  ^
   drivers/scsi/elx/efct/efct_hw.c:1224:16: warning: The scope of the variable 'rq' can be reduced. [variableScope]
    struct hw_rq *rq;
                  ^
   drivers/scsi/elx/efct/efct_hw.c:1325:16: warning: The scope of the variable 'rq' can be reduced. [variableScope]
    struct hw_rq *rq;
                  ^
   drivers/scsi/elx/efct/efct_hw.c:2367:7: warning: The scope of the variable 'status' can be reduced. [variableScope]
    int  status;
         ^
>> drivers/scsi/elx/efct/efct_hw.c:480:9: warning: Local variable 'arg' shadows outer argument [shadowArgument]
     void *arg = io->arg;
           ^
   drivers/scsi/elx/efct/efct_hw.c:383:29: note: Shadowed declaration
   efct_hw_wq_process_io(void *arg, u8 *cqe, int status)
                               ^
   drivers/scsi/elx/efct/efct_hw.c:480:9: note: Shadow variable
     void *arg = io->arg;
           ^
   drivers/scsi/elx/efct/efct_hw.c:1862:9: warning: Local variable 'arg' shadows outer argument [shadowArgument]
     void *arg = io->arg;
           ^
   drivers/scsi/elx/efct/efct_hw.c:1842:32: note: Shadowed declaration
   efct_hw_wq_process_abort(void *arg, u8 *cqe, int status)
                                  ^
   drivers/scsi/elx/efct/efct_hw.c:1862:9: note: Shadow variable
     void *arg = io->arg;
           ^
   drivers/scsi/elx/efct/efct_hw.c:1881:9: warning: Local variable 'arg' shadows outer argument [shadowArgument]
     void *arg = io->abort_arg;
           ^
   drivers/scsi/elx/efct/efct_hw.c:1842:32: note: Shadowed declaration
   efct_hw_wq_process_abort(void *arg, u8 *cqe, int status)
                                  ^
   drivers/scsi/elx/efct/efct_hw.c:1881:9: note: Shadow variable
     void *arg = io->abort_arg;
           ^
>> drivers/scsi/elx/efct/efct_hw.c:1300:23: warning: 'hw->seq_pool' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
      seq = hw->seq_pool + idx * sizeof(*seq);
                         ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_hw.c:633:8: warning: Variable 'i' is assigned a value that is never used. [unreadVariable]
    u32 i = 0, io_index = 0;
          ^
   drivers/scsi/elx/efct/efct_hw.c:2056:8: warning: Variable 'i' is assigned a value that is never used. [unreadVariable]
    u32 i = 0;
          ^
--
   drivers/scsi/elx/libefc/efc_domain.c:392:23: warning: The scope of the variable 'sport' can be reduced. [variableScope]
    struct efc_sli_port *sport;
                         ^
   drivers/scsi/elx/libefc/efc_domain.c:499:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc = 0;
        ^
   drivers/scsi/elx/libefc/efc_domain.c:546:7: warning: The scope of the variable 'rc' can be reduced. [variableScope]
     int rc;
         ^
   drivers/scsi/elx/libefc/efc_domain.c:699:7: warning: The scope of the variable 'rc' can be reduced. [variableScope]
     int rc;
         ^
   drivers/scsi/elx/libefc/efc_domain.c:866:7: warning: The scope of the variable 'rc' can be reduced. [variableScope]
     int rc;
         ^
>> drivers/scsi/elx/libefc/efc_domain.c:546:7: warning: Local variable 'rc' shadows outer variable [shadowVariable]
     int rc;
         ^
   drivers/scsi/elx/libefc/efc_domain.c:499:6: note: Shadowed declaration
    int rc = 0;
        ^
   drivers/scsi/elx/libefc/efc_domain.c:546:7: note: Shadow variable
     int rc;
         ^
--
>> drivers/scsi/elx/libefc/efc_fabric.c:1274:14: warning: Variable 'remote_wwpn' is reassigned a value before the old one has been used. [redundantAssignment]
    remote_wwpn = efc_get_wwpn(remote_sp);
                ^
   drivers/scsi/elx/libefc/efc_fabric.c:1270:14: note: remote_wwpn is assigned
    remote_wwpn = efc_get_wwpn(remote_sp);
                ^
   drivers/scsi/elx/libefc/efc_fabric.c:1274:14: note: remote_wwpn is overwritten
    remote_wwpn = efc_get_wwpn(remote_sp);
                ^
   drivers/scsi/elx/libefc/efc_fabric.c:26:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
   drivers/scsi/elx/libefc/efc_fabric.c:479:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
   drivers/scsi/elx/libefc/efc_fabric.c:1502:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
>> drivers/scsi/elx/libefc/efc_fabric.c:726:38: warning: 'data' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    struct fc_gid_pn_resp *gidpt = data + sizeof(*hdr);
                                        ^
--
>> drivers/scsi/elx/efct/efct_lio.c:1663:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_TPG_ATTRIB(generate_node_acls);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1664:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_TPG_ATTRIB(cache_dynamic_acls);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1665:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_TPG_ATTRIB(demo_mode_write_protect);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1666:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_TPG_ATTRIB(prod_mode_write_protect);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1667:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_TPG_ATTRIB(demo_mode_login_only);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1719:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_NPIV_TPG_ATTRIB(generate_node_acls);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1720:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_NPIV_TPG_ATTRIB(cache_dynamic_acls);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1721:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_NPIV_TPG_ATTRIB(demo_mode_write_protect);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1722:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_NPIV_TPG_ATTRIB(prod_mode_write_protect);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1723:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_NPIV_TPG_ATTRIB(demo_mode_login_only);
   ^
   drivers/scsi/elx/efct/efct_lio.c:93:6: warning: The scope of the variable 'ret' can be reduced. [variableScope]
    int ret;
        ^
   drivers/scsi/elx/efct/efct_lio.c:150:6: warning: The scope of the variable 'ret' can be reduced. [variableScope]
    int ret;
        ^
>> drivers/scsi/elx/efct/efct_lio.c:480:22: warning: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB]
     EFCT_XPORT_SHUTDOWN, NULL);
                        ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_lio.c:461:2: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    efct_set_lio_io_state(io, EFCT_LIO_STATE_SCSI_CMPL_CMD);
    ^
--
>> drivers/scsi/elx/libefc/efc_node.c:887:2: warning: %llX in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    snprintf(buffer, buffer_len, "eui.%016llX", eui_name);
    ^
--
   drivers/scsi/elx/efct/efct_unsol.c:28:16: warning: The scope of the variable 'flags' can be reduced. [variableScope]
    unsigned long flags = 0;
                  ^
   drivers/scsi/elx/efct/efct_unsol.c:210:26: warning: The scope of the variable 'frame' can be reduced. [variableScope]
    struct efc_hw_sequence *frame;
                            ^
   drivers/scsi/elx/efct/efct_unsol.c:533:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc = 0;
        ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_unsol.c:533:9: warning: Variable 'rc' is assigned a value that is never used. [unreadVariable]
    int rc = 0;
           ^
--
>> drivers/scsi/elx/libefc/efc_sport.c:101:2: warning: %llX in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    snprintf(sport->wwnn_str, sizeof(sport->wwnn_str), "%016llX", wwnn);
    ^
   drivers/scsi/elx/libefc/efc_sport.c:422:20: warning: The scope of the variable 'fabric' can be reduced. [variableScope]
     struct efc_node *fabric;
                      ^
--
   drivers/scsi/elx/libefc/efc_device.c:485:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
   drivers/scsi/elx/libefc/efc_device.c:1486:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc = EFC_SCSI_CALL_COMPLETE;
        ^
   drivers/scsi/elx/libefc/efc_device.c:1487:6: warning: The scope of the variable 'rc_2' can be reduced. [variableScope]
    int rc_2 = EFC_SCSI_CALL_COMPLETE;
        ^
>> drivers/scsi/elx/libefc/efc_device.c:372:31: warning: 'prli' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    struct fc_els_spp *sp = prli + sizeof(struct fc_els_prli);
                                 ^
>> drivers/scsi/elx/libefc/efc_device.c:1193:6: warning: 'cbdata->payload->dma.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
        + sizeof(struct fc_els_prli);
        ^
   drivers/scsi/elx/libefc/efc_device.c:1397:6: warning: 'cbdata->payload->dma.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
        + sizeof(struct fc_els_prli);
        ^
--
>> drivers/scsi/elx/libefc_sli/sli4.c:1372:6: warning: Condition 'valid' is always true [knownConditionTrueFalse]
    if (valid && clear) {
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:1367:6: note: Assuming that condition '!valid' is not redundant
    if (!valid) {
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:1372:6: note: Condition 'valid' is always true
    if (valid && clear) {
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:1425:6: warning: Condition 'valid' is always true [knownConditionTrueFalse]
    if (valid && clear) {
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:1420:6: note: Assuming that condition '!valid' is not redundant
    if (!valid) {
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:1425:6: note: Condition 'valid' is always true
    if (valid && clear) {
        ^
>> drivers/scsi/elx/libefc_sli/sli4.c:4018:2: warning: Either the condition 'extent' is redundant or there is possible null pointer dereference: extent. [nullPointerRedundantCheck]
    extent->resource_type = cpu_to_le16(rtype);
    ^
   drivers/scsi/elx/libefc_sli/sli4.c:4011:6: note: Assuming that condition 'extent' is not redundant
    if (extent)
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:4018:2: note: Null pointer dereference
    extent->resource_type = cpu_to_le16(rtype);
    ^
   drivers/scsi/elx/libefc_sli/sli4.c:2175:19: warning: The scope of the variable 'bptr' can be reduced. [variableScope]
    struct sli4_bde *bptr;
                     ^
>> drivers/scsi/elx/libefc_sli/sli4.c:3068:35: warning: Local variable 'rcqe' shadows outer variable [shadowVariable]
     struct sli4_fc_coalescing_rcqe *rcqe = (void *)cqe;
                                     ^
   drivers/scsi/elx/libefc_sli/sli4.c:2995:29: note: Shadowed declaration
    struct sli4_fc_async_rcqe *rcqe = (void *)cqe;
                               ^
   drivers/scsi/elx/libefc_sli/sli4.c:3068:35: note: Shadow variable
     struct sli4_fc_coalescing_rcqe *rcqe = (void *)cqe;
                                     ^
>> drivers/scsi/elx/libefc_sli/sli4.c:3069:7: warning: Local variable 'rq_element_index' shadows outer variable [shadowVariable]
     u16 rq_element_index =
         ^
   drivers/scsi/elx/libefc_sli/sli4.c:2999:6: note: Shadowed declaration
    u16 rq_element_index;
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:3069:7: note: Shadow variable
     u16 rq_element_index =
         ^
>> drivers/scsi/elx/libefc_sli/sli4.c:4487:8: warning: Local variable 'i' shadows outer variable [shadowVariable]
      u32 i = 0, size = 0;
          ^
   drivers/scsi/elx/libefc_sli/sli4.c:4470:7: note: Shadowed declaration
     u32 i;
         ^
   drivers/scsi/elx/libefc_sli/sli4.c:4487:8: note: Shadow variable
      u32 i = 0, size = 0;
          ^
>> drivers/scsi/elx/libefc_sli/sli4.c:71:7: warning: 'buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
     buf += offsetof(struct sli4_cmd_sli_config, payload.embed);
         ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^

vim +/rc +829 drivers/scsi/elx/efct/efct_driver.c

3569c2ab8265ff James Smart 2020-04-11  823  
3569c2ab8265ff James Smart 2020-04-11  824  static
3569c2ab8265ff James Smart 2020-04-11  825  int __init efct_init(void)
3569c2ab8265ff James Smart 2020-04-11  826  {
3569c2ab8265ff James Smart 2020-04-11  827  	int	rc = -ENODEV;
3569c2ab8265ff James Smart 2020-04-11  828  
3569c2ab8265ff James Smart 2020-04-11 @829  	rc = efct_device_init();
3569c2ab8265ff James Smart 2020-04-11  830  	if (rc) {
3569c2ab8265ff James Smart 2020-04-11  831  		pr_err("efct_device_init failed rc=%d\n", rc);
3569c2ab8265ff James Smart 2020-04-11  832  		return -ENOMEM;
3569c2ab8265ff James Smart 2020-04-11  833  	}
3569c2ab8265ff James Smart 2020-04-11  834  
3569c2ab8265ff James Smart 2020-04-11  835  	rc = pci_register_driver(&efct_pci_driver);
3569c2ab8265ff James Smart 2020-04-11  836  	if (rc)
3569c2ab8265ff James Smart 2020-04-11  837  		goto l1;
3569c2ab8265ff James Smart 2020-04-11  838  
3569c2ab8265ff James Smart 2020-04-11  839  	return rc;
3569c2ab8265ff James Smart 2020-04-11  840  
3569c2ab8265ff James Smart 2020-04-11  841  l1:
3569c2ab8265ff James Smart 2020-04-11  842  	efct_device_shutdown();
3569c2ab8265ff James Smart 2020-04-11  843  	return rc;
3569c2ab8265ff James Smart 2020-04-11  844  }
3569c2ab8265ff James Smart 2020-04-11  845  

:::::: The code at line 829 was first introduced by commit
:::::: 3569c2ab8265ffc43780ee31f4c4ef80e37cf0f7 elx: efct: Driver initialization routines

:::::: TO: James Smart <jsmart2021@gmail.com>
:::::: CC: 0day robot <lkp@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 31/31] elx: efct: Tie into kernel Kconfig and build process
Date: Sun, 12 Apr 2020 15:56:04 +0800	[thread overview]
Message-ID: <202004121536.BAc7Prmw%lkp@intel.com> (raw)
In-Reply-To: <20200412033303.29574-32-jsmart2021@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 38003 bytes --]

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.6 next-20200412]
[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/20200412-114125
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>


cppcheck warnings: (new ones prefixed by >>)

>> drivers/scsi/elx/efct/efct_driver.c:829:5: warning: Redundant initialization for 'rc'. The initialized value is overwritten before it is read. [redundantInitialization]
    rc = efct_device_init();
       ^
   drivers/scsi/elx/efct/efct_driver.c:827:9: note: rc is initialized
    int rc = -ENODEV;
           ^
   drivers/scsi/elx/efct/efct_driver.c:829:5: note: rc is overwritten
    rc = efct_device_init();
       ^
   drivers/scsi/elx/efct/efct_driver.c:255:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc = 0, i;
        ^
   drivers/scsi/elx/efct/efct_driver.c:255:14: warning: The scope of the variable 'i' can be reduced. [variableScope]
    int rc = 0, i;
                ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_driver.c:255:9: warning: Variable 'rc' is assigned a value that is never used. [unreadVariable]
    int rc = 0, i;
           ^
--
>> drivers/scsi/elx/efct/efct_scsi.c:869:34: warning: Either the condition '!fcprsp' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
     u8 *sns_data = io->rspbuf.virt + sizeof(*fcprsp);
                                    ^
   drivers/scsi/elx/efct/efct_scsi.c:871:7: note: Assuming that condition '!fcprsp' is not redundant
     if (!fcprsp) {
         ^
   drivers/scsi/elx/efct/efct_scsi.c:868:48: note: Assignment from 'io->rspbuf.virt'
     struct fcp_resp_with_ext *fcprsp = io->rspbuf.virt;
                                                  ^
   drivers/scsi/elx/efct/efct_scsi.c:869:34: note: Null pointer addition
     u8 *sns_data = io->rspbuf.virt + sizeof(*fcprsp);
                                    ^
   drivers/scsi/elx/efct/efct_scsi.c:467:21: warning: The scope of the variable 'hio' can be reduced. [variableScope]
    struct efct_hw_io *hio;
                       ^
   drivers/scsi/elx/efct/efct_scsi.c:470:6: warning: The scope of the variable 'dispatch' can be reduced. [variableScope]
    int dispatch;
        ^
>> drivers/scsi/elx/efct/efct_scsi.c:869:34: warning: 'io->rspbuf.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
     u8 *sns_data = io->rspbuf.virt + sizeof(*fcprsp);
                                    ^
   drivers/scsi/elx/efct/efct_scsi.c:1045:28: warning: 'io->rspbuf.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    rspinfo = io->rspbuf.virt + sizeof(*fcprsp);
                              ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_scsi.c:482:10: warning: Variable 'status' is assigned a value that is never used. [unreadVariable]
     status = 0;
            ^
--
   drivers/scsi/elx/efct/efct_els.c:1767:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
>> drivers/scsi/elx/efct/efct_els.c:980:32: warning: 'els->els_req.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    rscn_page = els->els_req.virt + sizeof(*req);
                                  ^
   drivers/scsi/elx/efct/efct_els.c:1471:28: warning: 'els->els_req.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    rftid = els->els_req.virt + sizeof(*ct);
                              ^
   drivers/scsi/elx/efct/efct_els.c:1515:28: warning: 'els->els_req.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    rffid = els->els_req.virt + sizeof(*ct);
                              ^
   drivers/scsi/elx/efct/efct_els.c:1567:28: warning: 'els->els_req.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    gidpt = els->els_req.virt + sizeof(*ct);
                              ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_els.c:1600:8: warning: Variable 's_id' is assigned a value that is never used. [unreadVariable]
     s_id = U32_MAX;
          ^
--
>> drivers/scsi/elx/efct/efct_xport.c:341:6: warning: Variable 'rc' is reassigned a value before the old one has been used. [redundantAssignment]
     rc = efct_hw_get_host_stats(&efct->hw, 1,
        ^
   drivers/scsi/elx/efct/efct_xport.c:329:6: note: rc is assigned
     rc = efct_hw_get_link_stats(&efct->hw, 0, 1, 1,
        ^
   drivers/scsi/elx/efct/efct_xport.c:341:6: note: rc is overwritten
     rc = efct_hw_get_host_stats(&efct->hw, 1,
        ^
   drivers/scsi/elx/efct/efct_xport.c:619:17: warning: The scope of the variable 'timeout' can be reduced. [variableScope]
     unsigned long timeout;
                   ^
   drivers/scsi/elx/efct/efct_xport.c:836:23: warning: The scope of the variable 'sport' can be reduced. [variableScope]
    struct efc_sli_port *sport;
                         ^
   drivers/scsi/elx/efct/efct_xport.c:884:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
>> drivers/scsi/elx/efct/efct_xport.c:678:16: warning: Local variable 'efct' shadows outer variable [shadowVariable]
     struct efct *efct;
                  ^
   drivers/scsi/elx/efct/efct_xport.c:590:15: note: Shadowed declaration
    struct efct *efct = NULL;
                 ^
   drivers/scsi/elx/efct/efct_xport.c:678:16: note: Shadow variable
     struct efct *efct;
                  ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
--
   drivers/scsi/elx/efct/efct_hw.c:871:16: warning: The scope of the variable 'rq' can be reduced. [variableScope]
    struct hw_rq *rq;
                  ^
   drivers/scsi/elx/efct/efct_hw.c:1224:16: warning: The scope of the variable 'rq' can be reduced. [variableScope]
    struct hw_rq *rq;
                  ^
   drivers/scsi/elx/efct/efct_hw.c:1325:16: warning: The scope of the variable 'rq' can be reduced. [variableScope]
    struct hw_rq *rq;
                  ^
   drivers/scsi/elx/efct/efct_hw.c:2367:7: warning: The scope of the variable 'status' can be reduced. [variableScope]
    int  status;
         ^
>> drivers/scsi/elx/efct/efct_hw.c:480:9: warning: Local variable 'arg' shadows outer argument [shadowArgument]
     void *arg = io->arg;
           ^
   drivers/scsi/elx/efct/efct_hw.c:383:29: note: Shadowed declaration
   efct_hw_wq_process_io(void *arg, u8 *cqe, int status)
                               ^
   drivers/scsi/elx/efct/efct_hw.c:480:9: note: Shadow variable
     void *arg = io->arg;
           ^
   drivers/scsi/elx/efct/efct_hw.c:1862:9: warning: Local variable 'arg' shadows outer argument [shadowArgument]
     void *arg = io->arg;
           ^
   drivers/scsi/elx/efct/efct_hw.c:1842:32: note: Shadowed declaration
   efct_hw_wq_process_abort(void *arg, u8 *cqe, int status)
                                  ^
   drivers/scsi/elx/efct/efct_hw.c:1862:9: note: Shadow variable
     void *arg = io->arg;
           ^
   drivers/scsi/elx/efct/efct_hw.c:1881:9: warning: Local variable 'arg' shadows outer argument [shadowArgument]
     void *arg = io->abort_arg;
           ^
   drivers/scsi/elx/efct/efct_hw.c:1842:32: note: Shadowed declaration
   efct_hw_wq_process_abort(void *arg, u8 *cqe, int status)
                                  ^
   drivers/scsi/elx/efct/efct_hw.c:1881:9: note: Shadow variable
     void *arg = io->abort_arg;
           ^
>> drivers/scsi/elx/efct/efct_hw.c:1300:23: warning: 'hw->seq_pool' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
      seq = hw->seq_pool + idx * sizeof(*seq);
                         ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_hw.c:633:8: warning: Variable 'i' is assigned a value that is never used. [unreadVariable]
    u32 i = 0, io_index = 0;
          ^
   drivers/scsi/elx/efct/efct_hw.c:2056:8: warning: Variable 'i' is assigned a value that is never used. [unreadVariable]
    u32 i = 0;
          ^
--
   drivers/scsi/elx/libefc/efc_domain.c:392:23: warning: The scope of the variable 'sport' can be reduced. [variableScope]
    struct efc_sli_port *sport;
                         ^
   drivers/scsi/elx/libefc/efc_domain.c:499:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc = 0;
        ^
   drivers/scsi/elx/libefc/efc_domain.c:546:7: warning: The scope of the variable 'rc' can be reduced. [variableScope]
     int rc;
         ^
   drivers/scsi/elx/libefc/efc_domain.c:699:7: warning: The scope of the variable 'rc' can be reduced. [variableScope]
     int rc;
         ^
   drivers/scsi/elx/libefc/efc_domain.c:866:7: warning: The scope of the variable 'rc' can be reduced. [variableScope]
     int rc;
         ^
>> drivers/scsi/elx/libefc/efc_domain.c:546:7: warning: Local variable 'rc' shadows outer variable [shadowVariable]
     int rc;
         ^
   drivers/scsi/elx/libefc/efc_domain.c:499:6: note: Shadowed declaration
    int rc = 0;
        ^
   drivers/scsi/elx/libefc/efc_domain.c:546:7: note: Shadow variable
     int rc;
         ^
--
>> drivers/scsi/elx/libefc/efc_fabric.c:1274:14: warning: Variable 'remote_wwpn' is reassigned a value before the old one has been used. [redundantAssignment]
    remote_wwpn = efc_get_wwpn(remote_sp);
                ^
   drivers/scsi/elx/libefc/efc_fabric.c:1270:14: note: remote_wwpn is assigned
    remote_wwpn = efc_get_wwpn(remote_sp);
                ^
   drivers/scsi/elx/libefc/efc_fabric.c:1274:14: note: remote_wwpn is overwritten
    remote_wwpn = efc_get_wwpn(remote_sp);
                ^
   drivers/scsi/elx/libefc/efc_fabric.c:26:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
   drivers/scsi/elx/libefc/efc_fabric.c:479:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
   drivers/scsi/elx/libefc/efc_fabric.c:1502:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
>> drivers/scsi/elx/libefc/efc_fabric.c:726:38: warning: 'data' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    struct fc_gid_pn_resp *gidpt = data + sizeof(*hdr);
                                        ^
--
>> drivers/scsi/elx/efct/efct_lio.c:1663:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_TPG_ATTRIB(generate_node_acls);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1664:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_TPG_ATTRIB(cache_dynamic_acls);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1665:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_TPG_ATTRIB(demo_mode_write_protect);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1666:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_TPG_ATTRIB(prod_mode_write_protect);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1667:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_TPG_ATTRIB(demo_mode_login_only);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1719:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_NPIV_TPG_ATTRIB(generate_node_acls);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1720:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_NPIV_TPG_ATTRIB(cache_dynamic_acls);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1721:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_NPIV_TPG_ATTRIB(demo_mode_write_protect);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1722:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_NPIV_TPG_ATTRIB(prod_mode_write_protect);
   ^
   drivers/scsi/elx/efct/efct_lio.c:1723:1: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
   DEF_EFCT_NPIV_TPG_ATTRIB(demo_mode_login_only);
   ^
   drivers/scsi/elx/efct/efct_lio.c:93:6: warning: The scope of the variable 'ret' can be reduced. [variableScope]
    int ret;
        ^
   drivers/scsi/elx/efct/efct_lio.c:150:6: warning: The scope of the variable 'ret' can be reduced. [variableScope]
    int ret;
        ^
>> drivers/scsi/elx/efct/efct_lio.c:480:22: warning: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB]
     EFCT_XPORT_SHUTDOWN, NULL);
                        ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_lio.c:461:2: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    efct_set_lio_io_state(io, EFCT_LIO_STATE_SCSI_CMPL_CMD);
    ^
--
>> drivers/scsi/elx/libefc/efc_node.c:887:2: warning: %llX in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    snprintf(buffer, buffer_len, "eui.%016llX", eui_name);
    ^
--
   drivers/scsi/elx/efct/efct_unsol.c:28:16: warning: The scope of the variable 'flags' can be reduced. [variableScope]
    unsigned long flags = 0;
                  ^
   drivers/scsi/elx/efct/efct_unsol.c:210:26: warning: The scope of the variable 'frame' can be reduced. [variableScope]
    struct efc_hw_sequence *frame;
                            ^
   drivers/scsi/elx/efct/efct_unsol.c:533:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc = 0;
        ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^
>> drivers/scsi/elx/efct/efct_unsol.c:533:9: warning: Variable 'rc' is assigned a value that is never used. [unreadVariable]
    int rc = 0;
           ^
--
>> drivers/scsi/elx/libefc/efc_sport.c:101:2: warning: %llX in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
    snprintf(sport->wwnn_str, sizeof(sport->wwnn_str), "%016llX", wwnn);
    ^
   drivers/scsi/elx/libefc/efc_sport.c:422:20: warning: The scope of the variable 'fabric' can be reduced. [variableScope]
     struct efc_node *fabric;
                      ^
--
   drivers/scsi/elx/libefc/efc_device.c:485:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc;
        ^
   drivers/scsi/elx/libefc/efc_device.c:1486:6: warning: The scope of the variable 'rc' can be reduced. [variableScope]
    int rc = EFC_SCSI_CALL_COMPLETE;
        ^
   drivers/scsi/elx/libefc/efc_device.c:1487:6: warning: The scope of the variable 'rc_2' can be reduced. [variableScope]
    int rc_2 = EFC_SCSI_CALL_COMPLETE;
        ^
>> drivers/scsi/elx/libefc/efc_device.c:372:31: warning: 'prli' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
    struct fc_els_spp *sp = prli + sizeof(struct fc_els_prli);
                                 ^
>> drivers/scsi/elx/libefc/efc_device.c:1193:6: warning: 'cbdata->payload->dma.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
        + sizeof(struct fc_els_prli);
        ^
   drivers/scsi/elx/libefc/efc_device.c:1397:6: warning: 'cbdata->payload->dma.virt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
        + sizeof(struct fc_els_prli);
        ^
--
>> drivers/scsi/elx/libefc_sli/sli4.c:1372:6: warning: Condition 'valid' is always true [knownConditionTrueFalse]
    if (valid && clear) {
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:1367:6: note: Assuming that condition '!valid' is not redundant
    if (!valid) {
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:1372:6: note: Condition 'valid' is always true
    if (valid && clear) {
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:1425:6: warning: Condition 'valid' is always true [knownConditionTrueFalse]
    if (valid && clear) {
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:1420:6: note: Assuming that condition '!valid' is not redundant
    if (!valid) {
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:1425:6: note: Condition 'valid' is always true
    if (valid && clear) {
        ^
>> drivers/scsi/elx/libefc_sli/sli4.c:4018:2: warning: Either the condition 'extent' is redundant or there is possible null pointer dereference: extent. [nullPointerRedundantCheck]
    extent->resource_type = cpu_to_le16(rtype);
    ^
   drivers/scsi/elx/libefc_sli/sli4.c:4011:6: note: Assuming that condition 'extent' is not redundant
    if (extent)
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:4018:2: note: Null pointer dereference
    extent->resource_type = cpu_to_le16(rtype);
    ^
   drivers/scsi/elx/libefc_sli/sli4.c:2175:19: warning: The scope of the variable 'bptr' can be reduced. [variableScope]
    struct sli4_bde *bptr;
                     ^
>> drivers/scsi/elx/libefc_sli/sli4.c:3068:35: warning: Local variable 'rcqe' shadows outer variable [shadowVariable]
     struct sli4_fc_coalescing_rcqe *rcqe = (void *)cqe;
                                     ^
   drivers/scsi/elx/libefc_sli/sli4.c:2995:29: note: Shadowed declaration
    struct sli4_fc_async_rcqe *rcqe = (void *)cqe;
                               ^
   drivers/scsi/elx/libefc_sli/sli4.c:3068:35: note: Shadow variable
     struct sli4_fc_coalescing_rcqe *rcqe = (void *)cqe;
                                     ^
>> drivers/scsi/elx/libefc_sli/sli4.c:3069:7: warning: Local variable 'rq_element_index' shadows outer variable [shadowVariable]
     u16 rq_element_index =
         ^
   drivers/scsi/elx/libefc_sli/sli4.c:2999:6: note: Shadowed declaration
    u16 rq_element_index;
        ^
   drivers/scsi/elx/libefc_sli/sli4.c:3069:7: note: Shadow variable
     u16 rq_element_index =
         ^
>> drivers/scsi/elx/libefc_sli/sli4.c:4487:8: warning: Local variable 'i' shadows outer variable [shadowVariable]
      u32 i = 0, size = 0;
          ^
   drivers/scsi/elx/libefc_sli/sli4.c:4470:7: note: Shadowed declaration
     u32 i;
         ^
   drivers/scsi/elx/libefc_sli/sli4.c:4487:8: note: Shadow variable
      u32 i = 0, size = 0;
          ^
>> drivers/scsi/elx/libefc_sli/sli4.c:71:7: warning: 'buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer]
     buf += offsetof(struct sli4_cmd_sli_config, payload.embed);
         ^
>> drivers/scsi/elx/libefc_sli/sli4.h:96:26: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_CTRL_FDD = (1 << 31),
                            ^
   drivers/scsi/elx/libefc_sli/sli4.h:223:29: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_PORT_STATUS_ERR  = (1 << 31),
                               ^
   drivers/scsi/elx/libefc_sli/sli4.h:315:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SGE_LAST   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:418:24: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_MCQE_VALID  = (1 << 31),
                          ^
   drivers/scsi/elx/libefc_sli/sli4.h:682:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_EQESZ   = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:685:23: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_EQ_ARM   = (1 << 31),
                         ^
   drivers/scsi/elx/libefc_sli/sli4.h:729:25: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    CREATE_MQEXT_VAL  = (1 << 31),
                           ^
   drivers/scsi/elx/libefc_sli/sli4.h:2665:30: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_READ_LNKSTAT_CLOF = (1 << 31),
                                ^
   drivers/scsi/elx/libefc_sli/sli4.h:3473:35: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    SLI4_SET_RECONFIG_LINKID_FD = (1 << 31),
                                     ^

vim +/rc +829 drivers/scsi/elx/efct/efct_driver.c

3569c2ab8265ff James Smart 2020-04-11  823  
3569c2ab8265ff James Smart 2020-04-11  824  static
3569c2ab8265ff James Smart 2020-04-11  825  int __init efct_init(void)
3569c2ab8265ff James Smart 2020-04-11  826  {
3569c2ab8265ff James Smart 2020-04-11  827  	int	rc = -ENODEV;
3569c2ab8265ff James Smart 2020-04-11  828  
3569c2ab8265ff James Smart 2020-04-11 @829  	rc = efct_device_init();
3569c2ab8265ff James Smart 2020-04-11  830  	if (rc) {
3569c2ab8265ff James Smart 2020-04-11  831  		pr_err("efct_device_init failed rc=%d\n", rc);
3569c2ab8265ff James Smart 2020-04-11  832  		return -ENOMEM;
3569c2ab8265ff James Smart 2020-04-11  833  	}
3569c2ab8265ff James Smart 2020-04-11  834  
3569c2ab8265ff James Smart 2020-04-11  835  	rc = pci_register_driver(&efct_pci_driver);
3569c2ab8265ff James Smart 2020-04-11  836  	if (rc)
3569c2ab8265ff James Smart 2020-04-11  837  		goto l1;
3569c2ab8265ff James Smart 2020-04-11  838  
3569c2ab8265ff James Smart 2020-04-11  839  	return rc;
3569c2ab8265ff James Smart 2020-04-11  840  
3569c2ab8265ff James Smart 2020-04-11  841  l1:
3569c2ab8265ff James Smart 2020-04-11  842  	efct_device_shutdown();
3569c2ab8265ff James Smart 2020-04-11  843  	return rc;
3569c2ab8265ff James Smart 2020-04-11  844  }
3569c2ab8265ff James Smart 2020-04-11  845  

:::::: The code@line 829 was first introduced by commit
:::::: 3569c2ab8265ffc43780ee31f4c4ef80e37cf0f7 elx: efct: Driver initialization routines

:::::: TO: James Smart <jsmart2021@gmail.com>
:::::: CC: 0day robot <lkp@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

  parent reply	other threads:[~2020-04-12  7:56 UTC|newest]

Thread overview: 125+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-12  3:32 [PATCH v3 00/31] [NEW] efct: Broadcom (Emulex) FC Target driver James Smart
2020-04-12  3:32 ` [PATCH v3 01/31] elx: libefc_sli: SLI-4 register offsets and field definitions James Smart
2020-04-14 15:23   ` Daniel Wagner
2020-04-22  4:28     ` James Smart
2020-04-15 12:06   ` Hannes Reinecke
2020-04-23  1:52   ` Roman Bolshakov
2020-04-12  3:32 ` [PATCH v3 02/31] elx: libefc_sli: SLI Descriptors and Queue entries James Smart
2020-04-14 18:02   ` Daniel Wagner
2020-04-22  4:41     ` James Smart
2020-04-15 12:14   ` Hannes Reinecke
2020-04-15 17:43     ` James Bottomley
2020-04-22  4:44     ` James Smart
2020-04-12  3:32 ` [PATCH v3 03/31] elx: libefc_sli: Data structures and defines for mbox commands James Smart
2020-04-14 19:01   ` Daniel Wagner
2020-04-15 12:22   ` Hannes Reinecke
2020-04-12  3:32 ` [PATCH v3 04/31] elx: libefc_sli: queue create/destroy/parse routines James Smart
2020-04-15 10:04   ` Daniel Wagner
2020-04-22  5:05     ` James Smart
2020-04-24  7:29       ` Daniel Wagner
2020-04-24 15:21         ` James Smart
2020-04-15 12:27   ` Hannes Reinecke
2020-04-12  3:32 ` [PATCH v3 05/31] elx: libefc_sli: Populate and post different WQEs James Smart
2020-04-15 14:34   ` Daniel Wagner
2020-04-22  5:08     ` James Smart
2020-04-12  3:32 ` [PATCH v3 06/31] elx: libefc_sli: bmbx routines and SLI config commands James Smart
2020-04-15 16:10   ` Daniel Wagner
2020-04-22  5:12     ` James Smart
2020-04-12  3:32 ` [PATCH v3 07/31] elx: libefc_sli: APIs to setup SLI library James Smart
2020-04-15 12:49   ` Hannes Reinecke
2020-04-15 17:06   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 08/31] elx: libefc: Generic state machine framework James Smart
2020-04-15 12:37   ` Hannes Reinecke
2020-04-15 17:20   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 09/31] elx: libefc: Emulex FC discovery library APIs and definitions James Smart
2020-04-15 12:41   ` Hannes Reinecke
2020-04-15 17:32   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 10/31] elx: libefc: FC Domain state machine interfaces James Smart
2020-04-15 12:50   ` Hannes Reinecke
2020-04-15 17:50   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 11/31] elx: libefc: SLI and FC PORT " James Smart
2020-04-15 15:38   ` Hannes Reinecke
2020-04-22 23:12     ` James Smart
2020-04-15 18:04   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 12/31] elx: libefc: Remote node " James Smart
2020-04-15 15:51   ` Hannes Reinecke
2020-04-23  1:35     ` James Smart
2020-04-23  8:02       ` Daniel Wagner
2020-04-23 18:24         ` James Smart
2020-04-15 18:19   ` Daniel Wagner
2020-04-23  1:32     ` James Smart
2020-04-23  7:49       ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 13/31] elx: libefc: Fabric " James Smart
2020-04-15 18:51   ` Daniel Wagner
2020-04-16  6:37   ` Hannes Reinecke
2020-04-23  1:38     ` James Smart
2020-04-12  3:32 ` [PATCH v3 14/31] elx: libefc: FC node ELS and state handling James Smart
2020-04-15 18:56   ` Daniel Wagner
2020-04-23  2:50     ` James Smart
2020-04-23  8:05       ` Daniel Wagner
2020-04-23  8:12         ` Nathan Chancellor
2020-04-16  6:47   ` Hannes Reinecke
2020-04-23  2:55     ` James Smart
2020-04-12  3:32 ` [PATCH v3 15/31] elx: efct: Data structures and defines for hw operations James Smart
2020-04-16  6:51   ` Hannes Reinecke
2020-04-23  2:57     ` James Smart
2020-04-16  7:22   ` Daniel Wagner
2020-04-23  2:59     ` James Smart
2020-04-12  3:32 ` [PATCH v3 16/31] elx: efct: Driver initialization routines James Smart
2020-04-16  7:11   ` Hannes Reinecke
2020-04-23  3:09     ` James Smart
2020-04-16  8:03   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 17/31] elx: efct: Hardware queues creation and deletion James Smart
2020-04-16  7:14   ` Hannes Reinecke
2020-04-16  8:24   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 18/31] elx: efct: RQ buffer, memory pool allocation and deallocation APIs James Smart
2020-04-16  7:24   ` Hannes Reinecke
2020-04-23  3:16     ` James Smart
2020-04-16  8:41   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 19/31] elx: efct: Hardware IO and SGL initialization James Smart
2020-04-16  7:32   ` Hannes Reinecke
2020-04-16  8:47   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 20/31] elx: efct: Hardware queues processing James Smart
2020-04-16  7:37   ` Hannes Reinecke
2020-04-16  9:17   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 21/31] elx: efct: Unsolicited FC frame processing routines James Smart
2020-04-16  9:36   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 22/31] elx: efct: Extended link Service IO handling James Smart
2020-04-16  7:58   ` Hannes Reinecke
2020-04-23  3:30     ` James Smart
2020-04-16  9:49   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 23/31] elx: efct: SCSI IO handling routines James Smart
2020-04-16 11:40   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 24/31] elx: efct: LIO backend interface routines James Smart
2020-04-12  4:57   ` Bart Van Assche
2020-04-16 11:48     ` Daniel Wagner
2020-04-22  4:20     ` James Smart
2020-04-22  5:09       ` Bart Van Assche
2020-04-23  1:39         ` James Smart
2020-04-16  8:02   ` Hannes Reinecke
2020-04-16 12:34   ` Daniel Wagner
2020-04-22  4:20     ` James Smart
2020-04-12  3:32 ` [PATCH v3 25/31] elx: efct: Hardware IO submission routines James Smart
2020-04-16  8:10   ` Hannes Reinecke
2020-04-16 12:45     ` Daniel Wagner
2020-04-23  3:37       ` James Smart
2020-04-16 12:44   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 26/31] elx: efct: link statistics and SFP data James Smart
2020-04-16 12:55   ` Daniel Wagner
2020-04-12  3:32 ` [PATCH v3 27/31] elx: efct: xport and hardware teardown routines James Smart
2020-04-16  9:45   ` Hannes Reinecke
2020-04-16 13:01   ` Daniel Wagner
2020-04-12  3:33 ` [PATCH v3 28/31] elx: efct: Firmware update, async link processing James Smart
2020-04-16 10:01   ` Hannes Reinecke
2020-04-16 13:10   ` Daniel Wagner
2020-04-12  3:33 ` [PATCH v3 29/31] elx: efct: scsi_transport_fc host interface support James Smart
2020-04-12  3:33 ` [PATCH v3 30/31] elx: efct: Add Makefile and Kconfig for efct driver James Smart
2020-04-16 10:02   ` Hannes Reinecke
2020-04-16 13:15   ` Daniel Wagner
2020-04-12  3:33 ` [PATCH v3 31/31] elx: efct: Tie into kernel Kconfig and build process James Smart
2020-04-12  6:16   ` kbuild test robot
2020-04-12  6:16     ` kbuild test robot
2020-04-12  7:56   ` kbuild test robot [this message]
2020-04-12  7:56     ` kbuild test robot
2020-04-16 13:15   ` Daniel Wagner
2020-04-12  7:22 kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202004121536.BAc7Prmw%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bvanassche@acm.org \
    --cc=dwagner@suse.de \
    --cc=hare@suse.de \
    --cc=herbszt@gmx.de \
    --cc=jsmart2021@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=maier@linux.ibm.com \
    --cc=natechancellor@gmail.com \
    --cc=ram.vegesna@broadcom.com \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.