From: Dan Carpenter <dan.carpenter@linaro.org>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: linux-media@vger.kernel.org
Subject: [bug report] media: rzg2l-cru: Add function pointer to check if FIFO is empty
Date: Fri, 25 Apr 2025 12:05:18 +0300 [thread overview]
Message-ID: <aAtQThCibZCROETx@stanley.mountain> (raw)
Hello Lad Prabhakar,
Commit 446c645f7fe4 ("media: rzg2l-cru: Add function pointer to check
if FIFO is empty") from Apr 11, 2025 (linux-next), leads to the
following Smatch static checker warning:
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c:351 rzg2l_fifo_empty()
warn: duplicate check 'amnfifopntr_w == amnfifopntr_r_y' (previous on line 348)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
339 bool rzg2l_fifo_empty(struct rzg2l_cru_dev *cru)
340 {
341 u32 amnfifopntr, amnfifopntr_w, amnfifopntr_r_y;
342
343 amnfifopntr = rzg2l_cru_read(cru, AMnFIFOPNTR);
344
345 amnfifopntr_w = amnfifopntr & AMnFIFOPNTR_FIFOWPNTR;
346 amnfifopntr_r_y =
347 (amnfifopntr & AMnFIFOPNTR_FIFORPNTR_Y) >> 16;
348 if (amnfifopntr_w == amnfifopntr_r_y)
349 return true;
We should either delete this check
350
--> 351 return amnfifopntr_w == amnfifopntr_r_y;
or change this to "return false;". (I prefer the second option).
352 }
regards,
dan carpenter
next reply other threads:[~2025-04-25 9:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 9:05 Dan Carpenter [this message]
2025-04-25 9:49 ` [bug report] media: rzg2l-cru: Add function pointer to check if FIFO is empty Lad, Prabhakar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aAtQThCibZCROETx@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.