alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: PCM1789: unconditionally flush work
@ 2018-06-17 13:45 Stefan Agner
  2018-06-18 11:59 ` Applied "ASoC: codecs: PCM1789: unconditionally flush work" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Agner @ 2018-06-17 13:45 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Stefan Agner, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel, linux-kernel

Work is guaranteed to be initialized on exit. Drop the unnecessary
if statement and always call flush_work.

This fixes a warning seen with clang:
sound/soc/codecs/pcm1789.c:265:13: warning: address of 'priv->work' will
      always evaluate to 'true' [-Wpointer-bool-conversion]
        if (&priv->work)
        ~~   ~~~~~~^~~~

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 sound/soc/codecs/pcm1789.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/codecs/pcm1789.c b/sound/soc/codecs/pcm1789.c
index 21f15219b3ad..8df6447c76a6 100644
--- a/sound/soc/codecs/pcm1789.c
+++ b/sound/soc/codecs/pcm1789.c
@@ -262,8 +262,7 @@ int pcm1789_common_exit(struct device *dev)
 {
 	struct pcm1789_private *priv = dev_get_drvdata(dev);
 
-	if (&priv->work)
-		flush_work(&priv->work);
+	flush_work(&priv->work);
 
 	return 0;
 }
-- 
2.17.1

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

* Applied "ASoC: codecs: PCM1789: unconditionally flush work" to the asoc tree
  2018-06-17 13:45 [PATCH] ASoC: codecs: PCM1789: unconditionally flush work Stefan Agner
@ 2018-06-18 11:59 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2018-06-18 11:59 UTC (permalink / raw)
  To: Stefan Agner
  Cc: alsa-devel, Takashi Iwai, Takashi Iwai, Liam Girdwood,
	linux-kernel, Mark Brown

The patch

   ASoC: codecs: PCM1789: unconditionally flush work

has been applied to the asoc tree at

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

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

>From a7dc662c6a7b9209df600c64b16d33d72dbf56b1 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Sun, 17 Jun 2018 15:45:29 +0200
Subject: [PATCH] ASoC: codecs: PCM1789: unconditionally flush work

Work is guaranteed to be initialized on exit. Drop the unnecessary
if statement and always call flush_work.

This fixes a warning seen with clang:
sound/soc/codecs/pcm1789.c:265:13: warning: address of 'priv->work' will
      always evaluate to 'true' [-Wpointer-bool-conversion]
        if (&priv->work)
        ~~   ~~~~~~^~~~

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/pcm1789.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/codecs/pcm1789.c b/sound/soc/codecs/pcm1789.c
index 21f15219b3ad..8df6447c76a6 100644
--- a/sound/soc/codecs/pcm1789.c
+++ b/sound/soc/codecs/pcm1789.c
@@ -262,8 +262,7 @@ int pcm1789_common_exit(struct device *dev)
 {
 	struct pcm1789_private *priv = dev_get_drvdata(dev);
 
-	if (&priv->work)
-		flush_work(&priv->work);
+	flush_work(&priv->work);
 
 	return 0;
 }
-- 
2.17.1

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

end of thread, other threads:[~2018-06-18 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-17 13:45 [PATCH] ASoC: codecs: PCM1789: unconditionally flush work Stefan Agner
2018-06-18 11:59 ` Applied "ASoC: codecs: PCM1789: unconditionally flush work" to the asoc tree 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).