On Tue Apr 29 10:16:08 2025 +0100, Lad Prabhakar wrote:
> Collapse FIFO empty helper into a single return statement by removing the
> redundant `if (amnfifopntr_w == amnfifopntr_r_y) return true;` path. Make
> `rzg2l_fifo_empty()` directly return `amnfifopntr_w == amnfifopntr_r_y`
> to improve readability without changing behavior.
>
> Reported-by: Dan Carpenter <[email protected]>
> Closes: https://lore.kernel.org/all/[email protected]/
> Signed-off-by: Lad Prabhakar <[email protected]>
> Reviewed-by: Laurent Pinchart <[email protected]>
> Reviewed-by: Geert Uytterhoeven <[email protected]>
> Reviewed-by: Tommaso Merciai <[email protected]>
> Tested-by: Tommaso Merciai <[email protected]>
> Link:
> https://lore.kernel.org/r/[email protected]
> Signed-off-by: Laurent Pinchart <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 2 --
1 file changed, 2 deletions(-)
---
diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
index 067c6af14e95..3d0810b3c35e 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
@@ -345,8 +345,6 @@ bool rzg2l_fifo_empty(struct rzg2l_cru_dev *cru)
amnfifopntr_w = amnfifopntr & AMnFIFOPNTR_FIFOWPNTR;
amnfifopntr_r_y =
(amnfifopntr & AMnFIFOPNTR_FIFORPNTR_Y) >> 16;
- if (amnfifopntr_w == amnfifopntr_r_y)
- return true;
return amnfifopntr_w == amnfifopntr_r_y;
}