2018-09-07 00:38:01

by Grant Grundler

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Grant Grundler <[email protected]>
---
sound/soc/codecs/max98373.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c
index 92b7125ea169..1f97b2f7c851 100644
--- a/sound/soc/codecs/max98373.c
+++ b/sound/soc/codecs/max98373.c
@@ -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>
--
2.19.0.rc2.392.g5ba43deb5a-goog



2018-09-07 03:21:33

by Benson Leung

[permalink] [raw]
Subject: Re: [PATCH] ASoC: max98373: usleep_range() needs include/delay.h

Hi Grant,

On Thu, Sep 06, 2018 at 05:27:28PM -0700, Grant Grundler wrote:
> 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.
>
> Signed-off-by: Grant Grundler <[email protected]>

Reviewed-by: Benson Leung <[email protected]>

Thanks!

--
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]


Attachments:
(No filename) (808.00 B)
signature.asc (849.00 B)
Download all attachments

2018-09-07 13:01:23

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] ASoC: max98373: usleep_range() needs include/delay.h

On Thu, Sep 06, 2018 at 05:27:28PM -0700, Grant Grundler wrote:
> 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.


Attachments:
(No filename) (698.00 B)
signature.asc (499.00 B)
Download all attachments

2018-09-07 17:55:46

by Grant Grundler

[permalink] [raw]
Subject: Re: [PATCH] ASoC: max98373: usleep_range() needs include/delay.h

[resending as plain/text - sorry]
On Fri, Sep 7, 2018 at 10:52 AM Grant Grundler <[email protected]> wrote:
>
>
>
> On Fri, Sep 7, 2018 at 5:11 AM Mark Brown <[email protected]> wrote:
>>
>> On Thu, Sep 06, 2018 at 05:27:28PM -0700, Grant Grundler wrote:
>> > 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.
>
>
> Ok. Is this just an observation or are these reasons to not accept the change?
>
> cheers,
> grant

2018-09-07 17:59:40

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] ASoC: max98373: usleep_range() needs include/delay.h

On Fri, Sep 07, 2018 at 10:52:24AM -0700, Grant Grundler wrote:
> On Fri, Sep 7, 2018 at 5:11 AM Mark Brown <[email protected]> wrote:

> > 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.


Attachments:
(No filename) (516.00 B)
signature.asc (499.00 B)
Download all attachments

2018-09-07 19:30:26

by Grant Grundler

[permalink] [raw]
Subject: Re: [PATCH] ASoC: max98373: usleep_range() needs include/delay.h

On Fri, Sep 7, 2018 at 10:56 AM Mark Brown <[email protected]> wrote:
>
> On Fri, Sep 07, 2018 at 10:52:24AM -0700, Grant Grundler wrote:
> > On Fri, Sep 7, 2018 at 5:11 AM Mark Brown <[email protected]> wrote:
>
> > > 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