Skip to contentSkip to conversation

ASoC: max98373: usleep_range() needs include/delay.h

PATCH In review Grant Grundler 3 participants 7 messages Sep 7, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: max98373: usleep_range() needs include/delay.h

Commit ca917f9fe1a0fab added use of usleep_range() but not
the corresponding "include <linux/delay.h>". The result is
with Chrome OS won't build because warnings are forced
to be errors:
mnt/host/source/src/third_party/kernel/v4.4/sound/soc/codecs/max98373.c:734:2: error: implicit declaration of function 'usleep_range' [-Werror,-Wimplicit-function-declaration]

        usleep_range(10000, 11000);
        ^

Including delay.h "fixes" this.

---
 sound/soc/codecs/max98373.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/codecs/max98373.c +1 -0
index 92b7125ea169..1f97b2f7c851 100644
@@ -2,6 +2,7 @@
 // Copyright (c) 2017, Maxim Integrated
 
 #include <linux/acpi.h>
+#include <linux/delay.h>
 #include <linux/i2c.h>
 #include <linux/module.h>
 #include <linux/regmap.h>
Signature · 1 line
2.19.0.rc2.392.g5ba43deb5a-goog
Reviewed-by on v1 1/1
#1 lore raw

Hi Grant,

Quoted 11 lines · Grant Grundler

Commit ca917f9fe1a0fab added use of usleep_range() but not
the corresponding "include <linux/delay.h>". The result is
with Chrome OS won't build because warnings are forced
to be errors:
mnt/host/source/src/third_party/kernel/v4.4/sound/soc/codecs/max98373.c:734:2: error: implicit declaration of function 'usleep_range' [-Werror,-Wimplicit-function-declaration]

        usleep_range(10000, 11000);
        ^

Including delay.h "fixes" this.

Thanks!

Signature · 7 lines
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]
maintainer
#2 lore raw
In reply to Grant Grundler
Quoted 7 lines · Grant Grundler

Commit ca917f9fe1a0fab added use of usleep_range() but not
the corresponding "include <linux/delay.h>". The result is
with Chrome OS won't build because warnings are forced
to be errors:
mnt/host/source/src/third_party/kernel/v4.4/sound/soc/codecs/max98373.c:734:2: error: implicit declaration of function 'usleep_range' [-Werror,-Wimplicit-function-declaration]

        usleep_range(10000, 11000);
        ^

Note that this isn't causing a warning upstream, presumably due to an implicit inclusion that isn't present in the v4.4 kernel that you appear to be using, or gets missed due to config differences.

#3 lore raw
Quoted 9 lines · Mark Brown
Quoted 5 lines · Grant Grundler

Commit ca917f9fe1a0fab added use of usleep_range() but not the corresponding "include <linux/delay.h>". The result is with Chrome OS won't build because warnings are forced to be errors:

mnt/host/source/src/third_party/kernel/v4.4/sound/soc/codecs/max98373.c:734:2:
error: implicit declaration of function 'usleep_range' [-Werror,-Wimplicit-function-declaration]

Quoted 7 lines
Quoted 2 lines
        usleep_range(10000, 11000);
        ^

Note that this isn't causing a warning upstream, presumably due to an implicit inclusion that isn't present in the v4.4 kernel that you appear to be using, or gets missed due to config differences.

Ok. Is this just an observation or are these reasons to not accept the change?

cheers,
grant

#4 lore raw

[resending as plain/text - sorry]

Quoted 23 lines · Grant Grundler
Quoted 10 lines · Mark Brown
Quoted 7 lines · Grant Grundler

Commit ca917f9fe1a0fab added use of usleep_range() but not
the corresponding "include <linux/delay.h>". The result is
with Chrome OS won't build because warnings are forced
to be errors:
mnt/host/source/src/third_party/kernel/v4.4/sound/soc/codecs/max98373.c:734:2: error: implicit declaration of function 'usleep_range' [-Werror,-Wimplicit-function-declaration]

        usleep_range(10000, 11000);
        ^
Quoted 3 lines

Note that this isn't causing a warning upstream, presumably due to an implicit inclusion that isn't present in the v4.4 kernel that you appear to be using, or gets missed due to config differences.

Ok. Is this just an observation or are these reasons to not accept the change?

cheers,
grant

maintainer
#5 lore raw
In reply to Grant Grundler
Quoted 8 lines · Grant Grundler
Quoted 3 lines · Mark Brown

Note that this isn't causing a warning upstream, presumably due to an implicit inclusion that isn't present in the v4.4 kernel that you appear to be using, or gets missed due to config differences.

Ok. Is this just an observation or are these reasons to not accept the change?

An observation, you should already have a mail about it being applied.

#6 lore raw
Quoted 4 lines · Mark Brown
Quoted 1 line · Grant Grundler

On Fri, Sep 7, 2018 at 5:11 AM Mark Brown <[email protected]> wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Note that this isn't causing a warning upstream, presumably due to an implicit inclusion that isn't present in the v4.4 kernel that you appear to be using, or gets missed due to config differences.

Ok. Is this just an observation or are these reasons to not accept the change?

An observation, you should already have a mail about it being applied.

Ah ok! Thanks for pointing that out (and for reviewing/accepting the patch).

cheers,
grant