mbox series

[0/2,v2] Small cleanups

Message ID 20191021034004.11063-1-damien.lemoal@wdc.com (mailing list archive)
Headers show
Series Small cleanups | expand

Message

Damien Le Moal Oct. 21, 2019, 3:40 a.m. UTC
This is series is a couple of cleanup patches. The first one cleans up
the helper function nvme_block_nr() using SECTOR_SHIFT instead of the
hard coded value 9 and clarifies the helper role by renaming it to
nvme_sect_to_lba(). The second patch introduces the nvme_lba_to_sect()
helper to convert a device logical block number into a 512B sector
value.

Please consider this series for kernel 5.5.

Damien Le Moal (2):
  nvme: Cleanup and rename nvme_block_nr()
  nvme: Introduce nvme_lba_to_sect()

 drivers/nvme/host/core.c | 20 ++++++++++----------
 drivers/nvme/host/nvme.h | 15 +++++++++++++--
 2 files changed, 23 insertions(+), 12 deletions(-)

Changes from v1:
* Renamed the helpers to a clearer function name.

Comments

Keith Busch Oct. 21, 2019, 1:55 p.m. UTC | #1
On Mon, Oct 21, 2019 at 12:40:02PM +0900, Damien Le Moal wrote:
> This is series is a couple of cleanup patches. The first one cleans up
> the helper function nvme_block_nr() using SECTOR_SHIFT instead of the
> hard coded value 9 and clarifies the helper role by renaming it to
> nvme_sect_to_lba(). The second patch introduces the nvme_lba_to_sect()
> helper to convert a device logical block number into a 512B sector
> value.

Thank you, patches applied to nvme-5.5 with the reviews.