mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-22 21:25:25 -04:00
media: renesas: rzg2l-cru: Simplify FIFO empty check
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 <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/all/aAtQThCibZCROETx@stanley.mountain/ Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Link: https://lore.kernel.org/r/20250429091609.9947-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
committed by
Hans Verkuil
parent
095e5d400c
commit
8b7b5e1bfb
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user