osd: remove deadcode
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Wed, 24 Feb 2016 11:21:28 +0000 (16:51 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 26 Feb 2016 02:11:42 +0000 (21:11 -0500)
The variable is_ver1 is always true and so OSD_CAP_LEN can never be
used.

Reported by Coverity.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Acked-by: Boaz harrosh <ooo@elecrozaur.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/osd/osd_initiator.c

index d8a2b5185f56ec98b7dca33005146ff748a6cc5a..3b11aad0375226d2afed99157546abe98200c972 100644 (file)
@@ -2006,9 +2006,8 @@ EXPORT_SYMBOL(osd_sec_init_nosec_doall_caps);
  */
 void osd_set_caps(struct osd_cdb *cdb, const void *caps)
 {
-       bool is_ver1 = true;
        /* NOTE: They start at same address */
-       memcpy(&cdb->v1.caps, caps, is_ver1 ? OSDv1_CAP_LEN : OSD_CAP_LEN);
+       memcpy(&cdb->v1.caps, caps, OSDv1_CAP_LEN);
 }
 
 bool osd_is_sec_alldata(struct osd_security_parameters *sec_parms __unused)