lkml.org 
[lkml]   [2023]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH rdma-next 11/13] nvme: Introduce a local variable
Date
On 1/16/23 05:05, Leon Romanovsky wrote:
> From: Israel Rukshin <israelr@nvidia.com>
>
> The patch doesn't change any logic.
>
> Signed-off-by: Israel Rukshin <israelr@nvidia.com>
> Signed-off-by: Leon Romanovsky <leon@kernel.org>
> ---
> drivers/nvme/host/core.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 7be562a4e1aa..51a9880db6ce 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1870,6 +1870,7 @@ static void nvme_update_disk_info(struct gendisk *disk,
> sector_t capacity = nvme_lba_to_sect(ns, le64_to_cpu(id->nsze));
> unsigned short bs = 1 << ns->lba_shift;
> u32 atomic_bs, phys_bs, io_opt = 0;
> + struct nvme_ctrl *ctrl = ns->ctrl;
>

I don't think this patch is needed, existing code is more readable and
gives much clarity that we are accessing ctrl from namespace since we
are in nvme_update_disk_info() which is namespace based.

-ck

\
 
 \ /
  Last update: 2023-03-26 23:43    [W:0.364 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site