2019-08-30 18:54:46

by Michal Suchánek

[permalink] [raw]
Subject: [PATCH] soundwire: slave: Fix unused function warning on !ACPI

Fixes the following warning on !ACPI systems:

drivers/soundwire/slave.c:16:12: warning: ‘sdw_slave_add’ defined but
not used [-Wunused-function]
static int sdw_slave_add(struct sdw_bus *bus,
^~~~~~~~~~~~~

Signed-off-by: Michal Suchanek <[email protected]>
---
drivers/soundwire/slave.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c
index f39a5815e25d..34c7e65831d1 100644
--- a/drivers/soundwire/slave.c
+++ b/drivers/soundwire/slave.c
@@ -6,6 +6,7 @@
#include <linux/soundwire/sdw_type.h>
#include "bus.h"

+#if IS_ENABLED(CONFIG_ACPI)
static void sdw_slave_release(struct device *dev)
{
struct sdw_slave *slave = dev_to_sdw_dev(dev);
@@ -60,7 +61,6 @@ static int sdw_slave_add(struct sdw_bus *bus,
return ret;
}

-#if IS_ENABLED(CONFIG_ACPI)
/*
* sdw_acpi_find_slaves() - Find Slave devices in Master ACPI node
* @bus: SDW bus instance
--
2.22.0


2019-08-30 18:58:44

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] soundwire: slave: Fix unused function warning on !ACPI

On 8/30/19 11:52 AM, Michal Suchanek wrote:
> Fixes the following warning on !ACPI systems:
>
> drivers/soundwire/slave.c:16:12: warning: ‘sdw_slave_add’ defined but
> not used [-Wunused-function]
> static int sdw_slave_add(struct sdw_bus *bus,
> ^~~~~~~~~~~~~
>
> Signed-off-by: Michal Suchanek <[email protected]>

Acked-by: Randy Dunlap <[email protected]>

I was about to send the same patch.
Thanks.

> ---
> drivers/soundwire/slave.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c
> index f39a5815e25d..34c7e65831d1 100644
> --- a/drivers/soundwire/slave.c
> +++ b/drivers/soundwire/slave.c
> @@ -6,6 +6,7 @@
> #include <linux/soundwire/sdw_type.h>
> #include "bus.h"
>
> +#if IS_ENABLED(CONFIG_ACPI)
> static void sdw_slave_release(struct device *dev)
> {
> struct sdw_slave *slave = dev_to_sdw_dev(dev);
> @@ -60,7 +61,6 @@ static int sdw_slave_add(struct sdw_bus *bus,
> return ret;
> }
>
> -#if IS_ENABLED(CONFIG_ACPI)
> /*
> * sdw_acpi_find_slaves() - Find Slave devices in Master ACPI node
> * @bus: SDW bus instance
>


--
~Randy

2019-09-04 09:33:12

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH] soundwire: slave: Fix unused function warning on !ACPI

On 30-08-19, 11:56, Randy Dunlap wrote:
> On 8/30/19 11:52 AM, Michal Suchanek wrote:
> > Fixes the following warning on !ACPI systems:
> >
> > drivers/soundwire/slave.c:16:12: warning: ‘sdw_slave_add’ defined but
> > not used [-Wunused-function]
> > static int sdw_slave_add(struct sdw_bus *bus,
> > ^~~~~~~~~~~~~
> >
> > Signed-off-by: Michal Suchanek <[email protected]>
>
> Acked-by: Randy Dunlap <[email protected]>
>
> I was about to send the same patch.

So I have applied Srini's patches which add DT support and they use
sdw_slave_add(). So next tomorrow should not see this error as it is now
used by DT parts as well.

So dropping this patch

--
~Vinod

2019-09-04 10:49:45

by Michal Suchánek

[permalink] [raw]
Subject: Re: [PATCH] soundwire: slave: Fix unused function warning on !ACPI

On Wed, 4 Sep 2019 15:00:52 +0530
Vinod Koul <[email protected]> wrote:

> On 30-08-19, 11:56, Randy Dunlap wrote:
> > On 8/30/19 11:52 AM, Michal Suchanek wrote:
> > > Fixes the following warning on !ACPI systems:
> > >
> > > drivers/soundwire/slave.c:16:12: warning: ‘sdw_slave_add’ defined but
> > > not used [-Wunused-function]
> > > static int sdw_slave_add(struct sdw_bus *bus,
> > > ^~~~~~~~~~~~~
> > >
> > > Signed-off-by: Michal Suchanek <[email protected]>
> >
> > Acked-by: Randy Dunlap <[email protected]>
> >
> > I was about to send the same patch.
>
> So I have applied Srini's patches which add DT support and they use
> sdw_slave_add(). So next tomorrow should not see this error as it is now
> used by DT parts as well.
>
> So dropping this patch
>

That should fix the issue for me. I wonder if !ACPI !DT platforms are
still a thing.

Thanks

Michal

2019-09-04 11:43:15

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH] soundwire: slave: Fix unused function warning on !ACPI

On 04-09-19, 12:48, Michal Suchánek wrote:
> On Wed, 4 Sep 2019 15:00:52 +0530
> Vinod Koul <[email protected]> wrote:
>
> > On 30-08-19, 11:56, Randy Dunlap wrote:
> > > On 8/30/19 11:52 AM, Michal Suchanek wrote:
> > > > Fixes the following warning on !ACPI systems:
> > > >
> > > > drivers/soundwire/slave.c:16:12: warning: ‘sdw_slave_add’ defined but
> > > > not used [-Wunused-function]
> > > > static int sdw_slave_add(struct sdw_bus *bus,
> > > > ^~~~~~~~~~~~~
> > > >
> > > > Signed-off-by: Michal Suchanek <[email protected]>
> > >
> > > Acked-by: Randy Dunlap <[email protected]>
> > >
> > > I was about to send the same patch.
> >
> > So I have applied Srini's patches which add DT support and they use
> > sdw_slave_add(). So next tomorrow should not see this error as it is now
> > used by DT parts as well.
> >
> > So dropping this patch
> >
>
> That should fix the issue for me. I wonder if !ACPI !DT platforms are
> still a thing.

Heh that should trigger this if we have one :D so should a lot more
which depend on some firmware!

--
~Vinod

2019-10-02 08:54:32

by Michal Suchánek

[permalink] [raw]
Subject: Re: [PATCH] soundwire: slave: Fix unused function warning on !ACPI

On Wed, Sep 04, 2019 at 05:10:59PM +0530, Vinod Koul wrote:
> On 04-09-19, 12:48, Michal Suchánek wrote:
> > On Wed, 4 Sep 2019 15:00:52 +0530
> > Vinod Koul <[email protected]> wrote:
> >
> > > On 30-08-19, 11:56, Randy Dunlap wrote:
> > > > On 8/30/19 11:52 AM, Michal Suchanek wrote:
> > > > > Fixes the following warning on !ACPI systems:
> > > > >
> > > > > drivers/soundwire/slave.c:16:12: warning: ‘sdw_slave_add’ defined but
> > > > > not used [-Wunused-function]
> > > > > static int sdw_slave_add(struct sdw_bus *bus,
> > > > > ^~~~~~~~~~~~~
> > > > >
> > > > > Signed-off-by: Michal Suchanek <[email protected]>
> > > >
> > > > Acked-by: Randy Dunlap <[email protected]>
> > > >
> > > > I was about to send the same patch.
> > >
> > > So I have applied Srini's patches which add DT support and they use
> > > sdw_slave_add(). So next tomorrow should not see this error as it is now
> > > used by DT parts as well.
> > >
> > > So dropping this patch
> > >
> >
> > That should fix the issue for me. I wonder if !ACPI !DT platforms are
> > still a thing.
>
> Heh that should trigger this if we have one :D so should a lot more
> which depend on some firmware!

Actually s390x is built with !ACPI and !OF. While it supports PCI an
virtio in practice only sound devices emulated by qemu are available.
Also AFAICT the sounwire driver is useless without ACPI or OF so it
should depend on them.

Thanks

Michal

2019-10-02 08:58:45

by Michal Suchánek

[permalink] [raw]
Subject: [PATCH 2/2] soundwire: depend on ACPI || OF

Now devicetree is supposrted for probing sondwire as well.

Fixes: a2e484585ad3 ("soundwire: core: add device tree support for slave devices")
Signed-off-by: Michal Suchanek <[email protected]>
---
drivers/soundwire/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig
index c73bfbaa2659..c8c80df090d1 100644
--- a/drivers/soundwire/Kconfig
+++ b/drivers/soundwire/Kconfig
@@ -5,7 +5,7 @@

menuconfig SOUNDWIRE
tristate "SoundWire support"
- depends on ACPI
+ depends on ACPI || OF
help
SoundWire is a 2-Pin interface with data and clock line ratified
by the MIPI Alliance. SoundWire is used for transporting data
--
2.23.0

2019-10-02 08:58:49

by Michal Suchánek

[permalink] [raw]
Subject: [PATCH 1/2] soundwire: depend on ACPI

The device cannot be probed on !ACPI and gives this warning:

drivers/soundwire/slave.c:16:12: warning: ‘sdw_slave_add’ defined but
not used [-Wunused-function]
static int sdw_slave_add(struct sdw_bus *bus,
^~~~~~~~~~~~~

Fixes: 7c3cd189b86d ("soundwire: Add Master registration")
Signed-off-by: Michal Suchanek <[email protected]>
---
drivers/soundwire/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig
index f518273cfbe3..c73bfbaa2659 100644
--- a/drivers/soundwire/Kconfig
+++ b/drivers/soundwire/Kconfig
@@ -5,6 +5,7 @@

menuconfig SOUNDWIRE
tristate "SoundWire support"
+ depends on ACPI
help
SoundWire is a 2-Pin interface with data and clock line ratified
by the MIPI Alliance. SoundWire is used for transporting data
--
2.23.0

2019-10-02 08:59:51

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 2/2] soundwire: depend on ACPI || OF

On Wed, Oct 02, 2019 at 10:33:30AM +0200, Michal Suchanek wrote:
> Now devicetree is supposrted for probing sondwire as well.
>
> Fixes: a2e484585ad3 ("soundwire: core: add device tree support for slave devices")
> Signed-off-by: Michal Suchanek <[email protected]>
> ---
> drivers/soundwire/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig
> index c73bfbaa2659..c8c80df090d1 100644
> --- a/drivers/soundwire/Kconfig
> +++ b/drivers/soundwire/Kconfig
> @@ -5,7 +5,7 @@
>
> menuconfig SOUNDWIRE
> tristate "SoundWire support"
> - depends on ACPI
> + depends on ACPI || OF
> help
> SoundWire is a 2-Pin interface with data and clock line ratified
> by the MIPI Alliance. SoundWire is used for transporting data
> --
> 2.23.0
>


<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

2019-10-02 09:01:36

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 1/2] soundwire: depend on ACPI

On Wed, Oct 02, 2019 at 10:33:29AM +0200, Michal Suchanek wrote:
> The device cannot be probed on !ACPI and gives this warning:
>
> drivers/soundwire/slave.c:16:12: warning: ‘sdw_slave_add’ defined but
> not used [-Wunused-function]
> static int sdw_slave_add(struct sdw_bus *bus,
> ^~~~~~~~~~~~~
>
> Fixes: 7c3cd189b86d ("soundwire: Add Master registration")
> Signed-off-by: Michal Suchanek <[email protected]>
> ---
> drivers/soundwire/Kconfig | 1 +
> 1 file changed, 1 insertion(+)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

2019-10-02 16:17:25

by Pierre-Louis Bossart

[permalink] [raw]
Subject: Re: [alsa-devel] [PATCH 2/2] soundwire: depend on ACPI || OF

On 10/2/19 3:33 AM, Michal Suchanek wrote:
> Now devicetree is supposrted for probing sondwire as well.

typos...

also it'd be simpler to squash the two patches together and add in the
commit message a mention that the s390 builds without ACPI and without OF.

>
> Fixes: a2e484585ad3 ("soundwire: core: add device tree support for slave devices")
> Signed-off-by: Michal Suchanek <[email protected]>
> ---
> drivers/soundwire/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig
> index c73bfbaa2659..c8c80df090d1 100644
> --- a/drivers/soundwire/Kconfig
> +++ b/drivers/soundwire/Kconfig
> @@ -5,7 +5,7 @@
>
> menuconfig SOUNDWIRE
> tristate "SoundWire support"
> - depends on ACPI
> + depends on ACPI || OF
> help
> SoundWire is a 2-Pin interface with data and clock line ratified
> by the MIPI Alliance. SoundWire is used for transporting data
>

2019-10-03 10:16:31

by Michal Suchánek

[permalink] [raw]
Subject: [PATCH v2 1/2] soundwire: depend on ACPI

The device cannot be probed on !ACPI and gives this warning:

drivers/soundwire/slave.c:16:12: warning: ‘sdw_slave_add’ defined but
not used [-Wunused-function]
static int sdw_slave_add(struct sdw_bus *bus,
^~~~~~~~~~~~~

Cc: [email protected]
Fixes: 7c3cd189b86d ("soundwire: Add Master registration")
Signed-off-by: Michal Suchanek <[email protected]>
---
drivers/soundwire/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig
index f518273cfbe3..c73bfbaa2659 100644
--- a/drivers/soundwire/Kconfig
+++ b/drivers/soundwire/Kconfig
@@ -5,6 +5,7 @@

menuconfig SOUNDWIRE
tristate "SoundWire support"
+ depends on ACPI
help
SoundWire is a 2-Pin interface with data and clock line ratified
by the MIPI Alliance. SoundWire is used for transporting data
--
2.23.0

2019-10-03 10:16:34

by Michal Suchánek

[permalink] [raw]
Subject: [PATCH v2 2/2] soundwire: depend on ACPI || OF

Now devicetree is supported for probing soundwire as well.

On platforms built with !ACPI !OF (ie s390x) the device still cannot be
probed and gives a build warning.

Cc: [email protected]
Fixes: a2e484585ad3 ("soundwire: core: add device tree support for slave devices")
Signed-off-by: Michal Suchanek <[email protected]>
---
drivers/soundwire/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig
index c73bfbaa2659..c8c80df090d1 100644
--- a/drivers/soundwire/Kconfig
+++ b/drivers/soundwire/Kconfig
@@ -5,7 +5,7 @@

menuconfig SOUNDWIRE
tristate "SoundWire support"
- depends on ACPI
+ depends on ACPI || OF
help
SoundWire is a 2-Pin interface with data and clock line ratified
by the MIPI Alliance. SoundWire is used for transporting data
--
2.23.0

2019-10-03 10:20:25

by Michal Suchánek

[permalink] [raw]
Subject: Re: [alsa-devel] [PATCH 2/2] soundwire: depend on ACPI || OF

On Wed, Oct 02, 2019 at 11:06:14AM -0500, Pierre-Louis Bossart wrote:
> On 10/2/19 3:33 AM, Michal Suchanek wrote:
> > Now devicetree is supposrted for probing sondwire as well.
>
> typos...
>
> also it'd be simpler to squash the two patches together and add in the

Except we have kernels with one or both of the patches these patches
fix.

> commit message a mention that the s390 builds without ACPI and without OF.
Makes sense.

Thanks

Michal
>
> >
> > Fixes: a2e484585ad3 ("soundwire: core: add device tree support for slave devices")
> > Signed-off-by: Michal Suchanek <[email protected]>
> > ---
> > drivers/soundwire/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig
> > index c73bfbaa2659..c8c80df090d1 100644
> > --- a/drivers/soundwire/Kconfig
> > +++ b/drivers/soundwire/Kconfig
> > @@ -5,7 +5,7 @@
> > menuconfig SOUNDWIRE
> > tristate "SoundWire support"
> > - depends on ACPI
> > + depends on ACPI || OF
> > help
> > SoundWire is a 2-Pin interface with data and clock line ratified
> > by the MIPI Alliance. SoundWire is used for transporting data
> >
>

2019-10-15 11:49:33

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] soundwire: depend on ACPI

On 03-10-19, 12:13, Michal Suchanek wrote:
> The device cannot be probed on !ACPI and gives this warning:
>
> drivers/soundwire/slave.c:16:12: warning: ‘sdw_slave_add’ defined but
> not used [-Wunused-function]
> static int sdw_slave_add(struct sdw_bus *bus,

Applied both, thanks
--
~Vinod