From: Stefan Agner <stefan@agner.ch>
To: Takashi Iwai <tiwai@suse.de>
Cc: Stefan Agner <stefan@agner.ch>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: codecs: PCM1789: unconditionally flush work
Date: Sun, 17 Jun 2018 15:45:29 +0200 [thread overview]
Message-ID: <20180617134532.1070-1-stefan@agner.ch> (raw)
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
next reply other threads:[~2018-06-17 13:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-17 13:45 Stefan Agner [this message]
2018-06-18 11:59 ` Applied "ASoC: codecs: PCM1789: unconditionally flush work" to the asoc tree 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=20180617134532.1070-1-stefan@agner.ch \
--to=stefan@agner.ch \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).