[scsi-qedf] question about parameter ordering

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

 




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 intentional?

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

Thank you
--
Gustavo A. R. Silva







[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