diff mbox series

hw/nvme : remove dead code

Message ID 20241022222105.3609223-1-arun.kka@samsung.com (mailing list archive)
State New
Headers show
Series hw/nvme : remove dead code | expand

Commit Message

Arun Kumar Oct. 22, 2024, 10:21 p.m. UTC
remove dead code which always returns success, since prchk will have a
value of zero

Signed-off-by: Arun Kumar <arun.kka@samsung.com>
---
 hw/nvme/dif.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Klaus Jensen Nov. 1, 2024, 11:23 a.m. UTC | #1
On Oct 23 03:51, Arun Kumar wrote:
> remove dead code which always returns success, since prchk will have a
> value of zero
> 
> Signed-off-by: Arun Kumar <arun.kka@samsung.com>
> ---
>  hw/nvme/dif.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/hw/nvme/dif.c b/hw/nvme/dif.c
> index 01b19c3373..2805128498 100644
> --- a/hw/nvme/dif.c
> +++ b/hw/nvme/dif.c
> @@ -575,11 +575,6 @@ uint16_t nvme_dif_rw(NvmeCtrl *n, NvmeRequest *req)
>              uint8_t *mbuf, *end;
>              int16_t pil = ns->lbaf.ms - nvme_pi_tuple_size(ns);
>  
> -            status = nvme_check_prinfo(ns, prinfo, slba, reftag);
> -            if (status) {
> -                goto err;
> -            }
> -
>              flags = 0;
>  
>              ctx->mdata.bounce = g_malloc0(mlen);
> -- 
> 2.43.0
> 
> 

Reviewed-by: Klaus Jensen <k.jensen@samsung.com>

Thanks, applied to nvme-next.
diff mbox series

Patch

diff --git a/hw/nvme/dif.c b/hw/nvme/dif.c
index 01b19c3373..2805128498 100644
--- a/hw/nvme/dif.c
+++ b/hw/nvme/dif.c
@@ -575,11 +575,6 @@  uint16_t nvme_dif_rw(NvmeCtrl *n, NvmeRequest *req)
             uint8_t *mbuf, *end;
             int16_t pil = ns->lbaf.ms - nvme_pi_tuple_size(ns);
 
-            status = nvme_check_prinfo(ns, prinfo, slba, reftag);
-            if (status) {
-                goto err;
-            }
-
             flags = 0;
 
             ctx->mdata.bounce = g_malloc0(mlen);