[bug report] scsi: elx: efct: Driver initialization routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello James Smart,

The patch 4df84e846624: "scsi: elx: efct: Driver initialization
routines" from Jun 1, 2021, leads to the following static checker
warning:

	drivers/scsi/elx/efct/efct_hw.c:348 efct_hw_iotype_is_originator()
	warn: signedness bug returning '(-5)'

drivers/scsi/elx/efct/efct_hw.c
   341  static u8 efct_hw_iotype_is_originator(u16 io_type)
               ^^

   342  {
   343          switch (io_type) {
   344          case EFCT_HW_FC_CT:
   345          case EFCT_HW_ELS_REQ:
   346                  return 0;
   347          default:
   348                  return -EIO;
                        ^^^^^^^^^^^^
   349          }
   350  }

Looking at the comments at the call site and the name of this function,
I wonder if it's supposed to be a boolean function which returns true
if it's the originator.

regards,
dan carpenter



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux