linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: wcd9335: Remove unnecessary conversion to bool
@ 2020-11-06  8:53 xiakaixu1987
  2020-11-18 20:59 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: xiakaixu1987 @ 2020-11-06  8:53 UTC (permalink / raw)
  To: broonie, srinivas.kandagatla; +Cc: linux-kernel, Kaixu Xia

From: Kaixu Xia <kaixuxia@tencent.com>

The '>=' expression itself is bool, no need to convert it to bool.
Fix the following coccicheck warning:

./sound/soc/codecs/wcd9335.c:3982:25-30: WARNING: conversion to bool not needed here

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
 sound/soc/codecs/wcd9335.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c
index f2d9d52ee171..843c311ea79e 100644
--- a/sound/soc/codecs/wcd9335.c
+++ b/sound/soc/codecs/wcd9335.c
@@ -3979,7 +3979,7 @@ static irqreturn_t wcd9335_slimbus_irq(int irq, void *data)
 	}
 
 	for_each_set_bit(j, &status, 32) {
-		tx = (j >= 16 ? true : false);
+		tx = (j >= 16);
 		port_id = (tx ? j - 16 : j);
 		regmap_read(wcd->if_regmap,
 				WCD9335_SLIM_PGD_PORT_INT_RX_SOURCE0 + j, &val);
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: wcd9335: Remove unnecessary conversion to bool
  2020-11-06  8:53 [PATCH] ASoC: wcd9335: Remove unnecessary conversion to bool xiakaixu1987
@ 2020-11-18 20:59 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-11-18 20:59 UTC (permalink / raw)
  To: srinivas.kandagatla, xiakaixu1987; +Cc: Kaixu Xia, linux-kernel

On Fri, 6 Nov 2020 16:53:36 +0800, xiakaixu1987@gmail.com wrote:
> The '>=' expression itself is bool, no need to convert it to bool.
> Fix the following coccicheck warning:
> 
> ./sound/soc/codecs/wcd9335.c:3982:25-30: WARNING: conversion to bool not needed here

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: wcd9335: Remove unnecessary conversion to bool
      commit: a5ec7c9e007b1095d04146eb94bac3863d35a69d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-18 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06  8:53 [PATCH] ASoC: wcd9335: Remove unnecessary conversion to bool xiakaixu1987
2020-11-18 20:59 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).