All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-fabrics: typo in nvmf_parse_key()
@ 2024-02-21 13:45 hare
  2024-02-21 14:35 ` Chaitanya Kulkarni
  2024-02-21 18:08 ` Keith Busch
  0 siblings, 2 replies; 3+ messages in thread
From: hare @ 2024-02-21 13:45 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Keith Busch, Sagi Grimberg, linux-nvme, Hannes Reinecke

From: Hannes Reinecke <hare@suse.de>

Of course we should use the key if there is no error ...

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/host/fabrics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 3499acbf6a82..ab5ac219b70a 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -637,7 +637,7 @@ static struct key *nvmf_parse_key(int key_id)
 	}
 
 	key = key_lookup(key_id);
-	if (!IS_ERR(key))
+	if (IS_ERR(key))
 		pr_err("key id %08x not found\n", key_id);
 	else
 		pr_debug("Using key id %08x\n", key_id);
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme-fabrics: typo in nvmf_parse_key()
  2024-02-21 13:45 [PATCH] nvme-fabrics: typo in nvmf_parse_key() hare
@ 2024-02-21 14:35 ` Chaitanya Kulkarni
  2024-02-21 18:08 ` Keith Busch
  1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2024-02-21 14:35 UTC (permalink / raw)
  To: hare@kernel.org, Christoph Hellwig
  Cc: Keith Busch, Sagi Grimberg, linux-nvme@lists.infradead.org,
	Hannes Reinecke

On 2/21/24 05:45, hare@kernel.org wrote:
> From: Hannes Reinecke <hare@suse.de>
>
> Of course we should use the key if there is no error ...
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme-fabrics: typo in nvmf_parse_key()
  2024-02-21 13:45 [PATCH] nvme-fabrics: typo in nvmf_parse_key() hare
  2024-02-21 14:35 ` Chaitanya Kulkarni
@ 2024-02-21 18:08 ` Keith Busch
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Busch @ 2024-02-21 18:08 UTC (permalink / raw)
  To: hare; +Cc: Christoph Hellwig, Sagi Grimberg, linux-nvme, Hannes Reinecke

On Wed, Feb 21, 2024 at 02:45:30PM +0100, hare@kernel.org wrote:
> From: Hannes Reinecke <hare@suse.de>
> 
> Of course we should use the key if there is no error ...

Fortunately the part that mattered handles the error correctly, but
printing the wrong message is confusing.

Applied to nvme-6.8, thanks!
 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  drivers/nvme/host/fabrics.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
> index 3499acbf6a82..ab5ac219b70a 100644
> --- a/drivers/nvme/host/fabrics.c
> +++ b/drivers/nvme/host/fabrics.c
> @@ -637,7 +637,7 @@ static struct key *nvmf_parse_key(int key_id)
>  	}
>  
>  	key = key_lookup(key_id);
> -	if (!IS_ERR(key))
> +	if (IS_ERR(key))
>  		pr_err("key id %08x not found\n", key_id);
>  	else
>  		pr_debug("Using key id %08x\n", key_id);
> -- 
> 2.35.3
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-21 18:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-21 13:45 [PATCH] nvme-fabrics: typo in nvmf_parse_key() hare
2024-02-21 14:35 ` Chaitanya Kulkarni
2024-02-21 18:08 ` Keith Busch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.