static void nvme_trans_modesel_save_bd(struct nvme_ns *ns, u8 *parm_list,
                                        u16 idx, u16 bd_len, u8 llbaa)
 {
-       u16 bd_num;
-
-       bd_num = bd_len / ((llbaa == 0) ?
-                       SHORT_DESC_BLOCK : LONG_DESC_BLOCK);
        /* Store block descriptor info if a FORMAT UNIT comes later */
        /* TODO Saving 1st BD info; what to do if multiple BD received? */
        if (llbaa == 0) {
        int nvme_sc;
        struct nvme_id_ns *id_ns;
        u8 i;
-       u8 flbas, nlbaf;
+       u8 nlbaf;
        u8 selected_lbaf = 0xFF;
        u32 cdw10 = 0;
        struct nvme_command c;
        if (res)
                return res;
 
-       flbas = (id_ns->flbas) & 0x0F;
        nlbaf = id_ns->nlbaf;
 
        for (i = 0; i < nlbaf; i++) {
 static int nvme_trans_start_stop(struct nvme_ns *ns, struct sg_io_hdr *hdr,
                                                        u8 *cmd)
 {
-       u8 immed, pcmod, no_flush, start;
+       u8 immed, no_flush;
 
        immed = cmd[1] & 0x01;
-       pcmod = cmd[3] & 0x0f;
        no_flush = cmd[4] & 0x04;
-       start = cmd[4] & 0x01;
 
        if (immed != 0) {
                return nvme_trans_completion(hdr, SAM_STAT_CHECK_CONDITION,