From: Dan Carpenter <dan.carpenter@oracle.com>
To: jsmart2021@gmail.com
Cc: linux-scsi@vger.kernel.org
Subject: [bug report] scsi: elx: efct: Driver initialization routines
Date: Fri, 18 Jun 2021 12:16:20 +0300 [thread overview]
Message-ID: <YMxkZB0OCqDwAUWR@mwanda> (raw)
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
next reply other threads:[~2021-06-18 9:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 9:16 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-06-18 13:36 [bug report] scsi: elx: efct: Driver initialization routines Dan Carpenter
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=YMxkZB0OCqDwAUWR@mwanda \
--to=dan.carpenter@oracle.com \
--cc=jsmart2021@gmail.com \
--cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox