From: Dan Carpenter <dan.carpenter@oracle.com>
To: abjoglek@cisco.com
Cc: linux-scsi@vger.kernel.org
Subject: [bug report] [SCSI] fnic: Add new Cisco PCI-Express FCoE HBA
Date: Fri, 30 Oct 2020 15:49:14 +0300 [thread overview]
Message-ID: <20201030124914.GA3265258@mwanda> (raw)
Hello Abhijeet Joglekar,
The patch 5df6d737dd4b: "[SCSI] fnic: Add new Cisco PCI-Express FCoE
HBA" from Apr 17, 2009, leads to the following static checker warning:
drivers/scsi/fnic/fnic_res.c:96 fnic_get_vnic_config()
warn: '__UNIQUE_ID___x1297' 255000 can't fit into 65535 'c->ed_tov'
drivers/scsi/fnic/fnic_res.c:101 fnic_get_vnic_config()
warn: '__UNIQUE_ID___x1301' 255000 can't fit into 65535 'c->ra_tov'
drivers/scsi/fnic/fnic_res.c
89 c->rq_desc_count = ALIGN(c->rq_desc_count, 16);
90
91 c->maxdatafieldsize =
92 min_t(u16, VNIC_FNIC_MAXDATAFIELDSIZE_MAX,
93 max_t(u16, VNIC_FNIC_MAXDATAFIELDSIZE_MIN,
94 c->maxdatafieldsize));
95 c->ed_tov =
96 min_t(u32, VNIC_FNIC_EDTOV_MAX,
97 max_t(u32, VNIC_FNIC_EDTOV_MIN,
98 c->ed_tov));
The VNIC_FNIC_EDTOV_MAX is 255000 but c->ed_tov is a u16 so the max is
way outside of the maximum that the type says it can be.
99
100 c->ra_tov =
101 min_t(u32, VNIC_FNIC_RATOV_MAX,
^^^^^^^^^^^^^^^^^^
Same.
102 max_t(u32, VNIC_FNIC_RATOV_MIN,
103 c->ra_tov));
104
105 c->flogi_retries =
106 min_t(u32, VNIC_FNIC_FLOGI_RETRIES_MAX, c->flogi_retries);
regards,
dan carpenter
reply other threads:[~2020-10-30 12:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201030124914.GA3265258@mwanda \
--to=dan.carpenter@oracle.com \
--cc=abjoglek@cisco.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 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.