]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/scsi/cxlflash/common.h
scsi: cxlflash: Remove zeroing of private command data
[mirror_ubuntu-zesty-kernel.git] / drivers / scsi / cxlflash / common.h
index e95e5a516b5eb3d92a504c88f02ea0d907b0968c..6d95e8e147e0823741be9b9cc68ed1f4188b4a5c 100644 (file)
@@ -178,15 +178,22 @@ static inline struct afu_cmd *sc_to_afuc(struct scsi_cmnd *sc)
        return PTR_ALIGN(scsi_cmd_priv(sc), __alignof__(struct afu_cmd));
 }
 
-static inline struct afu_cmd *sc_to_afucz(struct scsi_cmnd *sc)
+static inline struct afu_cmd *sc_to_afuci(struct scsi_cmnd *sc)
 {
        struct afu_cmd *afuc = sc_to_afuc(sc);
 
-       memset(afuc, 0, sizeof(*afuc));
        INIT_LIST_HEAD(&afuc->queue);
        return afuc;
 }
 
+static inline struct afu_cmd *sc_to_afucz(struct scsi_cmnd *sc)
+{
+       struct afu_cmd *afuc = sc_to_afuc(sc);
+
+       memset(afuc, 0, sizeof(*afuc));
+       return sc_to_afuci(sc);
+}
+
 struct hwq {
        /* Stuff requiring alignment go first. */
        struct sisl_ioarcb sq[NUM_SQ_ENTRY];            /* 16K SQ */