Message ID | 20190830185212.25144-1-msuchanek@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | soundwire: slave: Fix unused function warning on !ACPI | expand |
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 <msuchanek@suse.de> > > Acked-by: Randy Dunlap <rdunlap@infradead.org> > > 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
On Wed, 4 Sep 2019 15:00:52 +0530 Vinod Koul <vkoul@kernel.org> 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 <msuchanek@suse.de> > > > > Acked-by: Randy Dunlap <rdunlap@infradead.org> > > > > 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
On 04-09-19, 12:48, Michal Suchánek wrote: > On Wed, 4 Sep 2019 15:00:52 +0530 > Vinod Koul <vkoul@kernel.org> 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 <msuchanek@suse.de> > > > > > > Acked-by: Randy Dunlap <rdunlap@infradead.org> > > > > > > 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!
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 <vkoul@kernel.org> 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 <msuchanek@suse.de> > > > > > > > > Acked-by: Randy Dunlap <rdunlap@infradead.org> > > > > > > > > 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
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
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 <msuchanek@suse.de> --- drivers/soundwire/slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)