Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1260905
| 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 | 2015-11-02 20:40 +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> |
| Organization | linux.* mail to news gateway |
> + 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
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