From: <bva...@us...> - 2015-06-17 00:35:45
|
Revision: 6390 http://sourceforge.net/p/scst/svn/6390 Author: bvassche Date: 2015-06-17 00:35:43 +0000 (Wed, 17 Jun 2015) Log Message: ----------- qla2x00t: Change type of first argument of qla24xx_prep_ct_fm_req() This makes it easier for Coverity to analyze this code. Modified Paths: -------------- trunk/qla2x00t/qla_gs.c Modified: trunk/qla2x00t/qla_gs.c =================================================================== --- trunk/qla2x00t/qla_gs.c 2015-06-17 00:32:53 UTC (rev 6389) +++ trunk/qla2x00t/qla_gs.c 2015-06-17 00:35:43 UTC (rev 6390) @@ -1838,18 +1838,17 @@ static inline struct ct_sns_req * -qla24xx_prep_ct_fm_req(struct ct_sns_req *ct_req, uint16_t cmd, - uint16_t rsp_size) +qla24xx_prep_ct_fm_req(struct ct_sns_pkt *p, uint16_t cmd, uint16_t rsp_size) { - memset(ct_req, 0, sizeof(struct ct_sns_pkt)); + memset(p, 0, sizeof(struct ct_sns_pkt)); - ct_req->header.revision = 0x01; - ct_req->header.gs_type = 0xFA; - ct_req->header.gs_subtype = 0x01; - ct_req->command = cpu_to_be16(cmd); - ct_req->max_rsp_size = cpu_to_be16((rsp_size - 16) / 4); + p->p.req.header.revision = 0x01; + p->p.req.header.gs_type = 0xFA; + p->p.req.header.gs_subtype = 0x01; + p->p.req.command = cpu_to_be16(cmd); + p->p.req.max_rsp_size = cpu_to_be16((rsp_size - 16) / 4); - return ct_req; + return &p->p.req; } /** @@ -1885,8 +1884,8 @@ GPSC_RSP_SIZE); /* Prepare CT request */ - ct_req = qla24xx_prep_ct_fm_req(&ha->ct_sns->p.req, - GPSC_CMD, GPSC_RSP_SIZE); + ct_req = qla24xx_prep_ct_fm_req(ha->ct_sns, GPSC_CMD, + GPSC_RSP_SIZE); ct_rsp = &ha->ct_sns->p.rsp; /* Prepare CT arguments -- port_name */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |