]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
nvme: Drop useless members of 'struct nvme_ns'
authorBin Meng <bmeng.cn@gmail.com>
Tue, 22 Jun 2021 13:16:20 +0000 (21:16 +0800)
committerBin Meng <bmeng.cn@gmail.com>
Wed, 23 Jun 2021 09:21:14 +0000 (17:21 +0800)
mode_select_num_blocks and mode_select_block_len in 'struct nvme_ns'
are not useful. Drop them.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
drivers/nvme/nvme.c
drivers/nvme/nvme.h

index c5af4c08aef373ec7e83fcc6eb93aec531601d4b..d4b2860d67f9306556c8917cb11b1227c830bd1a 100644 (file)
@@ -718,11 +718,9 @@ static int nvme_blk_probe(struct udevice *udev)
        flbas = id->flbas & NVME_NS_FLBAS_LBA_MASK;
        ns->flbas = flbas;
        ns->lba_shift = id->lbaf[flbas].ds;
-       ns->mode_select_num_blocks = le64_to_cpu(id->nsze);
-       ns->mode_select_block_len = 1 << ns->lba_shift;
        list_add(&ns->list, &ndev->namespaces);
 
-       desc->lba = ns->mode_select_num_blocks;
+       desc->lba = le64_to_cpu(id->nsze);
        desc->log2blksz = ns->lba_shift;
        desc->blksz = 1 << ns->lba_shift;
        desc->bdev = udev;
index aa4b3bac6799316998d7f21d3a38c89c167941e9..c6aae4da5df78fd82c00c282a4b2064bcc1cb581 100644 (file)
@@ -633,8 +633,6 @@ struct nvme_ns {
        int devnum;
        int lba_shift;
        u8 flbas;
-       u64 mode_select_num_blocks;
-       u32 mode_select_block_len;
 };
 
 #endif /* __DRIVER_NVME_H__ */