From: Chad Dupuis <chad.dupuis@cavium.com>
To: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Cc: QLogic-Storage-Upstream@cavium.com,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Peter Senna Tschudin <peter.senna@gmail.com>
Subject: Re: [scsi-qedf] question about parameter ordering
Date: Wed, 3 May 2017 14:29:19 -0400 (EDT) [thread overview]
Message-ID: <alpine.OSX.2.00.1705031427250.1568@administrators-MacBook-Pro.local> (raw)
In-Reply-To: <20170503125818.Horde.8rEDF6U_fTKRV29evjbXFMa@gator4166.hostgator.com>
On Wed, 3 May 2017, 1:58pm, Gustavo A. R. Silva wrote:
>
> Hello everybody,
>
> While looking into Coverity ID 1402011 I ran into the following piece of code
> at drivers/scsi/qedf/qedf_io.c:2057:
>
> /* Fill FC header */
> fc_hdr = &(tm_req->req_fc_hdr);
> sid = fcport->sid;
> did = fcport->rdata->ids.port_id;
> __fc_fill_fc_hdr(fc_hdr, FC_RCTL_DD_UNSOL_CMD, sid, did,
> FC_TYPE_FCP, FC_FC_FIRST_SEQ | FC_FC_END_SEQ |
> FC_FC_SEQ_INIT, 0);
>
> The issue here is that the position of arguments in the call to
> __fc_fill_fc_hdr() function do not match the ordering of the parameters:
>
> _sid_ is passed to _did_
> _did_ is passed to _sid_
>
> this is the function prototype:
>
> static inline void __fc_fill_fc_hdr(struct fc_frame_header *fh,
> enum fc_rctl r_ctl,
> u32 did, u32 sid, enum fc_fh_type type,
> u32 f_ctl, u32 parm_offset)
>
> My question here is if this is intentionala?
This may have been but this code has been superseded by commit
be086e7c53f1fac51eed14523b28f2214b548dd2.B
>
> In case it is not, I will send a patch to fix it. But first it would be great
> to hear any comment about it.
>
> By the way... the same is happening at drivers/scsi/qedf/qedf_els.c:109
May be a bug here so you could send a patch.
>
> Thank you
> --
> Gustavo A. R. Silva
>
>
>
>
next prev parent reply other threads:[~2017-05-03 18:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 17:58 Gustavo A. R. Silva
2017-05-03 18:29 ` Chad Dupuis [this message]
2017-05-03 18:34 ` Gustavo A. R. Silva
2017-05-03 18:36 ` Randy Dunlap
2017-05-03 18:50 ` Chad Dupuis
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=alpine.OSX.2.00.1705031427250.1568@administrators-MacBook-Pro.local \
--to=chad.dupuis@cavium.com \
--cc=QLogic-Storage-Upstream@cavium.com \
--cc=garsilva@embeddedor.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peter.senna@gmail.com \
/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
all inboxes | Powered by JetHome®