soundwire: intel: Make sdw_intel_init static
PATCH 1/1 soundwire: intel: Make sdw_intel_init static
Fix sparse warning:
drivers/soundwire/intel_init.c:193:6: warning:
symbol 'sdw_intel_init' was not declared. Should it be static?
--- drivers/soundwire/intel_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soundwire/intel_init.c +2 -1
@@ -190,7 +190,8 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,* This scans the namespace and creates SoundWire link controller devices * based on the info queried. */ -void *sdw_intel_init (acpi_handle *parent_handle,struct sdw_intel_res *res) +static void *sdw_intel_init (acpi_handle *parent_handle, +struct sdw_intel_res *res) {acpi_status status;
Signature · 1 line
2.17.1
Quoted 16 lines · YueHaibing
Fix sparse warning:
drivers/soundwire/intel_init.c:193:6: warning:
symbol 'sdw_intel_init' was not declared. Should it be static?Reported-by Hulk Robot <[email protected]>Signed-off-by YueHaibing <[email protected]>--- drivers/soundwire/intel_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/soundwire/intel_init.c +0
-0
drivers/soundwire/intel_init.c static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level, · line 194
Quoted 6 lines
drivers/soundwire/intel_init.c +2
-1@@ -190,7 +190,8 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,* This scans the namespace and creates SoundWire link controller devices * based on the info queried. */ -void *sdw_intel_init (acpi_handle *parent_handle,struct sdw_intel_res *res) +static void *sdw_intel_init (acpi_handle *parent_handle, +struct sdw_intel_res *res)
This declaration has been this way since 2017, there are no users and it will be removed with the Intel patchsets, so fixing this warning doesn't really add much value. No sustained objection though.
Quoted 4 lines
drivers/soundwire/intel_init.c +0
-0{acpi_status status;
Quoted 4 lines · YueHaibing
Fix sparse warning:
drivers/soundwire/intel_init.c:193:6: warning:
symbol 'sdw_intel_init' was not declared. Should it be static?
Applied, thanks
Signature · 1 line
~Vinod
Quoted 10 lines · Vinod Koul
Quoted 4 lines · YueHaibing
Fix sparse warning:
drivers/soundwire/intel_init.c:193:6: warning:
symbol 'sdw_intel_init' was not declared. Should it be static?Applied, thanks
Signature · 1 line
~Vinod
Why was this applied? It replaces one warning with another (that is actually visible during a normal kernel build):
$ make -j$(nproc) -s allyesconfig drivers/soundwire/intel_init.o
drivers/soundwire/intel_init.c:193:14: warning: ‘sdw_intel_init’ defined
but not used [-Wunused-function]
static void *sdw_intel_init(acpi_handle *parent_handle,
^~~~~~~~~~~~~~Cheers,
Nathan