linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: arizona: match wait_for_completion_timeout return type
@ 2015-03-08 13:16 Nicholas Mc Guire
  2015-03-09 14:30 ` Charles Keepax
  2015-03-09 18:18 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Nicholas Mc Guire @ 2015-03-08 13:16 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, Charles Keepax,
	Lee Jones, Richard Fitzgerald, Lars-Peter Clausen, patches,
	alsa-devel, linux-kernel, Nicholas Mc Guire

return type of wait_for_completion_timeout is unsigned long not int. An
appropriately named unsigned long is added and the assignment fixed up.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

Note that the error message
 "Timed out waiting for lock"
might not be that clear in a kernel log message as it 
could probably be read as relating to a kernel lock 
 "Timed out waiting for FLL lock"
might be clearer.

This was only compile tested for exynos_defconfig + CONFIG_COMPILE_TEST=y
SND_SOC_ALL_CODECS=m, EXTCON_ARIZONA=m, CONFIG_MFD_ARIZONA_SPI=m, 
CONFIG_MFD_WM5102=y, (implies SND_SOC_ARIZONA=m)

Patch is against 4.0-rc2 linux-next (localversion-next is -next-20150306)

 sound/soc/codecs/arizona.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 95d31d6..57da0ce 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1902,7 +1902,7 @@ static int arizona_is_enabled_fll(struct arizona_fll *fll)
 static int arizona_enable_fll(struct arizona_fll *fll)
 {
 	struct arizona *arizona = fll->arizona;
-	int ret;
+	unsigned long time_left;
 	bool use_sync = false;
 	int already_enabled = arizona_is_enabled_fll(fll);
 	struct arizona_fll_cfg cfg;
@@ -1978,9 +1978,9 @@ static int arizona_enable_fll(struct arizona_fll *fll)
 		regmap_update_bits_async(arizona->regmap, fll->base + 1,
 					 ARIZONA_FLL1_FREERUN, 0);
 
-	ret = wait_for_completion_timeout(&fll->ok,
+	time_left = wait_for_completion_timeout(&fll->ok,
 					  msecs_to_jiffies(250));
-	if (ret == 0)
+	if (time_left == 0)
 		arizona_fll_warn(fll, "Timed out waiting for lock\n");
 
 	return 0;
-- 
1.7.10.4


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

* Re: [PATCH] ASoC: arizona: match wait_for_completion_timeout return type
  2015-03-08 13:16 [PATCH] ASoC: arizona: match wait_for_completion_timeout return type Nicholas Mc Guire
@ 2015-03-09 14:30 ` Charles Keepax
  2015-03-09 18:18 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2015-03-09 14:30 UTC (permalink / raw)
  To: Nicholas Mc Guire
  Cc: Liam Girdwood, Mark Brown, patches, alsa-devel, linux-kernel

On Sun, Mar 08, 2015 at 09:16:49AM -0400, Nicholas Mc Guire wrote:
> return type of wait_for_completion_timeout is unsigned long not int. An
> appropriately named unsigned long is added and the assignment fixed up.
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

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

* Re: [PATCH] ASoC: arizona: match wait_for_completion_timeout return type
  2015-03-08 13:16 [PATCH] ASoC: arizona: match wait_for_completion_timeout return type Nicholas Mc Guire
  2015-03-09 14:30 ` Charles Keepax
@ 2015-03-09 18:18 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-03-09 18:18 UTC (permalink / raw)
  To: Nicholas Mc Guire
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Charles Keepax,
	Lee Jones, Richard Fitzgerald, Lars-Peter Clausen, patches,
	alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

On Sun, Mar 08, 2015 at 09:16:49AM -0400, Nicholas Mc Guire wrote:
> return type of wait_for_completion_timeout is unsigned long not int. An
> appropriately named unsigned long is added and the assignment fixed up.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

end of thread, other threads:[~2015-03-09 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-08 13:16 [PATCH] ASoC: arizona: match wait_for_completion_timeout return type Nicholas Mc Guire
2015-03-09 14:30 ` Charles Keepax
2015-03-09 18:18 ` 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).