From: Bin Meng Date: Tue, 22 Jun 2021 13:16:20 +0000 (+0800) Subject: nvme: Drop useless members of 'struct nvme_ns' X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=757cc4b1b2725e445a94840aa6076f0f0d4f03b9;p=u-boot.git nvme: Drop useless members of 'struct nvme_ns' mode_select_num_blocks and mode_select_block_len in 'struct nvme_ns' are not useful. Drop them. Signed-off-by: Bin Meng --- diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index c5af4c08ae..d4b2860d67 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -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; diff --git a/drivers/nvme/nvme.h b/drivers/nvme/nvme.h index aa4b3bac67..c6aae4da5d 100644 --- a/drivers/nvme/nvme.h +++ b/drivers/nvme/nvme.h @@ -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__ */