From: Ethan Tidmore <ethantidmore06@gmail.com>
To: zhangyi@everest-semi.com, lgirdwood@gmail.com,
broonie@kernel.org, perex@perex.cz, tiwai@suse.com
Cc: ckeepax@opensource.cirrus.com, linusw@kernel.org,
u.kleine-koenig@baylibre.com, lazycat-xiao@foxmail.com,
kuninori.morimoto.gx@renesas.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org,
Ethan Tidmore <ethantidmore06@gmail.com>
Subject: [PATCH] ASoC: codecs: ES8389: Remove redundant comparison
Date: Sun, 19 Jul 2026 17:15:02 -0500 [thread overview]
Message-ID: <20260719221502.536804-1-ethantidmore06@gmail.com> (raw)
The comparison (target_hz < 0) will always be false because the variable
'target_hz' is of the u32 type.
Remove redundant comparison and simply code around it.
Fixes: 87592da1a490a ("ASoC: codecs: ES8389: Add private members about HPF")
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
---
sound/soc/codecs/es8389.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c
index 0c7567e2ffc2..80efce3e0a22 100644
--- a/sound/soc/codecs/es8389.c
+++ b/sound/soc/codecs/es8389.c
@@ -106,7 +106,7 @@ static bool find_best_hpf_freq(u32 target_hz, u8 *hpf1, u8 *hpf2, u32 *out)
u32 f, diff;
int i, j;
- if ((target_hz > 1020) | (target_hz < 0))
+ if (target_hz > 1020)
return false;
for (i = 0; i < 10; i++) {
--
Thanks,
ET
https://github.com/sponsors/ethantidmore
next reply other threads:[~2026-07-19 22:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-19 22:15 Ethan Tidmore [this message]
2026-07-20 13:24 ` [PATCH] ASoC: codecs: ES8389: Remove redundant comparison Mark Brown
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=20260719221502.536804-1-ethantidmore06@gmail.com \
--to=ethantidmore06@gmail.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lazycat-xiao@foxmail.com \
--cc=lgirdwood@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=zhangyi@everest-semi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox