Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1260905

RE: [PATCH v6 01/15] scsi: ufs: clear UTRD, UPIU req and rsp before new transfers

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From "Winkler, Tomas" <tomas.winkler@intel.com>
Newsgroups linux.kernel
Subject RE: [PATCH v6 01/15] scsi: ufs: clear UTRD, UPIU req and rsp before new transfers
Date Mon, 02 Nov 2015 20:40:01 +0100
Message-ID <qqt7r-R4-3@gated-at.bofh.it> (permalink)
References <qoyNY-35R-5@gated-at.bofh.it> <qoyNZ-35R-47@gated-at.bofh.it>
X-Original-To Yaniv Gardi <ygardi@codeaurora.org>, "robherring2@gmail.com" <robherring2@gmail.com>, "James.Bottomley@HansenPartnership.com" <James.Bottomley@HansenPartnership.com>, "pebolle@tiscali.nl" <pebolle@tiscali.nl>, "hch@infradead.org" <hch@infradead.org>
X-Extloop1 1
X-Ironport-Av E=Sophos;i="5.20,236,1444719600"; d="scan'208";a="825166703"
Thread-Topic [PATCH v6 01/15] scsi: ufs: clear UTRD, UPIU req and rsp before new transfers
Thread-Index AQHREYOHiM+KKEoD60GsvO/1z9+2B56IyJag
Accept-Language en-US
Content-Language en-US
X-Originating-IP [10.184.70.10]
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding 8BIT
MIME-Version 1.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 16
Organization linux.* mail to news gateway
X-Original-Cc "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>, "linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>, "santoshsy@gmail.com" <santoshsy@gmail.com>, "linux-scsi-owner@vger.kernel.org" <linux-scsi-owner@vger.kernel.org>, "subhashj@codeaurora.org" <subhashj@codeaurora.org>, "gbroner@codeaurora.org" <gbroner@codeaurora.org>, "draviv@codeaurora.org" <draviv@codeaurora.org>, Maya Erez <merez@codeaurora.org>, Vinayak Holikatti <vinholikatti@gmail.com>, "James E.J. Bottomley" <JBottomley@odin.com>
X-Original-Date Mon, 2 Nov 2015 19:33:01 +0000
X-Original-Message-ID <5B8DA87D05A7694D9FA63FD143655C1B41E4C272@hasmsx108.ger.corp.intel.com>
X-Original-References <1446038045-17102-1-git-send-email-ygardi@codeaurora.org> <1446038045-17102-2-git-send-email-ygardi@codeaurora.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1260905

Show key headers only | View raw



> +	cdb_len = min_t(unsigned short, lrbp->cmd->cmd_len, MAX_CDB_SIZE);
> +	memcpy(ucd_req_ptr->sc.cdb, lrbp->cmd->cmnd, cdb_len);
> +	if (cdb_len < MAX_CDB_SIZE)
> +		memset(ucd_req_ptr->sc.cdb + cdb_len, 0,
> +		       (MAX_CDB_SIZE - cdb_len));
It's just 16 bytes, setting all to zero prior  to copy will be as good as this if statement
memset(ucd_req_ptr->sc.cdb, 0, MAX_CDB_SIZE);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

RE: [PATCH v6 01/15] scsi: ufs: clear UTRD, UPIU req and rsp before  new transfers "Winkler, Tomas" <tomas.winkler@intel.com> - 2015-11-02 20:40 +0100

csiph-web