All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SoC: nau8825: remove unnecessary unlikely()
@ 2018-11-04 12:55 Yangtao Li
  0 siblings, 0 replies; only message in thread
From: Yangtao Li @ 2018-11-04 12:55 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, KCHSU0, gustavo,
	abhijeet.kumar, kuninori.morimoto.gx
  Cc: alsa-devel, linux-kernel, Yangtao Li

WARN_ON() already contains an unlikely(), so it's not necessary to use
unlikely.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 sound/soc/codecs/nau8825.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
index b9fed99d8b5e..7bbcbf5f05c8 100644
--- a/sound/soc/codecs/nau8825.c
+++ b/sound/soc/codecs/nau8825.c
@@ -424,10 +424,8 @@ static u32 nau8825_xtalk_sidetone(u32 sig_org, u32 sig_cros)
 {
 	u32 gain, sidetone;
 
-	if (unlikely(sig_org == 0) || unlikely(sig_cros == 0)) {
-		WARN_ON(1);
+	if (WARN_ON(sig_org == 0 || sig_cros == 0))
 		return 0;
-	}
 
 	sig_org = nau8825_intlog10_dec3(sig_org);
 	sig_cros = nau8825_intlog10_dec3(sig_cros);
-- 
2.17.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-04 12:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-04 12:55 [PATCH] SoC: nau8825: remove unnecessary unlikely() Yangtao Li

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.