From: Colin Ian King <colin.i.king@gmail.com>
To: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] media: rcar_jpu: remove redundant case statement when c is zero
Date: Thu, 8 May 2025 11:08:35 +0100 [thread overview]
Message-ID: <20250508100835.336240-1-colin.i.king@gmail.com> (raw)
The case statement where c is zero is redundant because the previous
while loop will only exit if c is non-zero or non-0xff, so c can
never be zero by the time the switch statement is reaced. Clean up
the code by removing it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/media/platform/renesas/rcar_jpu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/platform/renesas/rcar_jpu.c b/drivers/media/platform/renesas/rcar_jpu.c
index 81038df71bb5..6af154b41eb4 100644
--- a/drivers/media/platform/renesas/rcar_jpu.c
+++ b/drivers/media/platform/renesas/rcar_jpu.c
@@ -643,8 +643,6 @@ static u8 jpu_parse_hdr(void *buffer, unsigned long size, unsigned int *width,
return 0;
skip(&jpeg_buffer, (long)word - 2);
break;
- case 0:
- break;
default:
return 0;
}
--
2.49.0
next reply other threads:[~2025-05-08 10:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 10:08 Colin Ian King [this message]
2025-05-08 10:27 ` [PATCH][next] media: rcar_jpu: remove redundant case statement when c is zero Dan Carpenter
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=20250508100835.336240-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=geert+renesas@glider.be \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mchehab@kernel.org \
--cc=mikhail.ulyanov@cogentembedded.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.