Re: [PATCH v7 2/2] cxl/region: Remove else after return statement

From: Alison Schofield
Date: Sat Jul 29 2023 - 22:19:03 EST


On Wed, Jul 26, 2023 at 07:34:21AM +0000, Raghu Halharvi wrote:
> Issue found with checkpatch
>
> The else section here is redundant after return statement, removing it.
> Sanity and correctness is not affected due to this fix.
>
> Signed-off-by: Raghu Halharvi <raghuhack78@xxxxxxxxx>
> Reviewed-by: Dave Jiang <dave.jiang@xxxxxxxxx>
> Reviewed-by: Vishal Verma <vishal.l.verma@xxxxxxxxx>
> Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>

Reviewed-by: Alison Schofield <alison.schofield@xxxxxxxxx>



> ---
> drivers/cxl/core/region.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index e115ba382e04..bfd3b13dd2c1 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -133,11 +133,11 @@ static int cxl_region_invalidate_memregion(struct cxl_region *cxlr)
> &cxlr->dev,
> "Bypassing cpu_cache_invalidate_memregion() for testing!\n");
> return 0;
> - } else {
> - dev_err(&cxlr->dev,
> - "Failed to synchronize CPU cache state\n");
> - return -ENXIO;
> }
> +
> + dev_err(&cxlr->dev,
> + "Failed to synchronize CPU cache state\n");
> + return -ENXIO;
> }
>
> cpu_cache_invalidate_memregion(IORES_DESC_CXL);
> --
> 2.39.2
>