[PATCH v4 18/22] soundwire: cadence_master: fix alignment issues

2019-05-01 Thread Pierre-Louis Bossart
Use Linux style Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 79 +++--- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c

[PATCH v4 22/22] soundwire: add missing newlines in dynamic debug logs

2019-05-01 Thread Pierre-Louis Bossart
For some reason the newlines are not used everywhere. Fix as needed. Reported-by: Joe Perches Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c| 74 +-- drivers/soundwire/cadence_master.c | 12 ++-- drivers/soundwire

[PATCH v4 15/22] soundwire: intel: fix alignment issues

2019-05-01 Thread Pierre-Louis Bossart
Use Linux style Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 59 +++ 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 70ca27ccad85

[PATCH v4 19/22] soundwire: cadence_master: balance parentheses

2019-05-01 Thread Pierre-Louis Bossart
While not strictly necessary, balanced parentheses help with code readability. Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/soundwire/cadence_master.c b

[PATCH v4 20/22] soundwire: cadence_master: fix boolean comparisons

2019-05-01 Thread Pierre-Louis Bossart
No need for explicit test against true Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index

[PATCH v4 17/22] soundwire: intel: fix boolean comparison

2019-05-01 Thread Pierre-Louis Bossart
No need for explicit test against true Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 8c653a563534..2852ce293fd4 100644

[PATCH v4 21/22] soundwire: cadence_master: remove spurious newline

2019-05-01 Thread Pierre-Louis Bossart
Extra newline does not improve readability. Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 50181752c2a4

[PATCH v4 11/22] soundwire: mipi_disco: fix boolean comparisons

2019-05-01 Thread Pierre-Louis Bossart
No need for explicit test against true Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/mipi_disco.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/mipi_disco.c b/drivers/soundwire/mipi_disco.c index 95efa82dc73b

[PATCH v4 04/22] soundwire: bus: fix alignment issues

2019-05-01 Thread Pierre-Louis Bossart
Use Linux style Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c | 66 - 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 688848637099

[PATCH v4 08/22] soundwire: bus: remove spurious newline

2019-05-01 Thread Pierre-Louis Bossart
tools complain here and the location of the newline does not improve readability. Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 863bf418e342

[PATCH v4 06/22] soundwire: bus: remove useless parentheses

2019-05-01 Thread Pierre-Louis Bossart
and make the code more readable Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index efdcefc62e1a..423dc6d17999 100644

[PATCH v4 00/22] soundwire: code cleanup

2019-05-01 Thread Pierre-Louis Bossart
the same as in v3. Changes since v2: fixed inversion of devm_kcalloc parameters, detected while rebasing additional patches. Changes since v1: added missing newlines in new patch (suggested by Joe Perches) Pierre-Louis Bossart (22): soundwire: Kconfig: fix help format soundwire: fix SPDX

[PATCH v4 02/22] soundwire: fix SPDX license for header files

2019-05-01 Thread Pierre-Louis Bossart
No C++ comments in .h files Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.h| 4 ++-- drivers/soundwire/cadence_master.h | 4 ++-- drivers/soundwire/intel.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH v4 01/22] soundwire: Kconfig: fix help format

2019-05-01 Thread Pierre-Louis Bossart
Move to the regular help format, --help-- is no longer recommended. Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig index

[PATCH v2] ACPI / device_sysfs: change _ADR representation to 64 bits

2019-05-01 Thread Pierre-Louis Bossart
e: Before: $ more /sys/bus/acpi/devices/device\:38/adr 0x5d07 After: $ more /sys/bus/acpi/devices/device\:38/adr 0x10025d07 Signed-off-by: Pierre-Louis Bossart --- v2: only use 64 bits when required to avoid compatibility issues (feedback from Vinod and Rafael) drivers/acpi/device_s

Re: [alsa-devel] [PATCH][next] ASoC: SOF: Intel: fix spelling mistake "incompatble" -> "incompatible"

2019-05-01 Thread Pierre-Louis Bossart
On 5/1/19 5:23 AM, Colin King wrote: From: Colin Ian King There is a spelling mistake in a hda_dsp_rom_msg message, fix it. Signed-off-by: Colin Ian King Acked-by: Pierre-Louis Bossart Thanks for the fix! --- sound/soc/sof/intel/hda.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [alsa-devel] [PATCH] ACPI / device_sysfs: change _ADR representation to 64 bits

2019-04-30 Thread Pierre-Louis Bossart
On 4/16/19 3:09 AM, Rafael J. Wysocki wrote: On Tue, Apr 16, 2019 at 5:29 AM Vinod Koul wrote: On 15-04-19, 10:18, Pierre-Louis Bossart wrote: Standards such as the MIPI DisCo for SoundWire 1.0 specification assume the _ADR field is 64 bits. _ADR is defined as an "Integer" r

Re: [PATCH] ACPI / property: fix handling of data_nodes in acpi_get_next_subnode()

2019-04-30 Thread Pierre-Louis Bossart
On 4/30/19 11:30 AM, Andy Shevchenko wrote: On Tue, Apr 30, 2019 at 10:52:29AM -0500, Pierre-Louis Bossart wrote: When the DSDT tables expose devices with subdevices and a set of hierarchical _DSD properties, the data returned by acpi_get_next_subnode() is incorrect, with the results suggesting

Re: [alsa-devel] [PATCH v3 2/5] soundwire: fix style issues

2019-04-30 Thread Pierre-Louis Bossart
On 4/30/19 9:54 AM, Vfiinod Koul wrote: On 30-04-19, 08:38, Pierre-Louis Bossart wrote: On 4/30/19 3:51 AM, Vinod Koul wrote: On 15-04-19, 08:09, Pierre-Louis Bossart wrote: Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Kconfig | 2 +- drivers/soundwire

[PATCH] ACPI / property: fix handling of data_nodes in acpi_get_next_subnode()

2019-04-30 Thread Pierre-Louis Bossart
d_node()")', so this should probably go to linux-stable all the way to 4.12 Signed-off-by: Pierre-Louis Bossart --- drivers/acpi/property.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c index 5815356ea6ad..efc74f912f39 10064

Re: [alsa-devel] [PATCH v3 2/5] soundwire: fix style issues

2019-04-30 Thread Pierre-Louis Bossart
My patch-bot would reject a patch that tried to do multiple types of different cleanups on the same file(s). Has done so for _years_, this is not a new thing. If there are tools let's use them (all the fixes in this series were reported by tools). Can you share pointers and location of

Re: [alsa-devel] [PATCH v3 2/5] soundwire: fix style issues

2019-04-30 Thread Pierre-Louis Bossart
On 4/30/19 3:51 AM, Vinod Koul wrote: On 15-04-19, 08:09, Pierre-Louis Bossart wrote: Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Kconfig | 2 +- drivers/soundwire/bus.c| 87 drivers/soundwire/bus.h| 16

Re: [PATCH v2] ASoC: Intel: avoid Oops if DMA setup fails

2019-04-29 Thread Pierre-Louis Bossart
a sst->pdata->resindex_dma_base being set to -1. Signed-off-by: Ross Zwisler Cc: sta...@vger.kernel.org Acked-by: Pierre-Louis Bossart Thanks Ross! FWIW we should start deprecating this driver now and transition to SOF. I'll double-check how the upcoming 1.3 release works on my Pixel 2015/

Re: [PATCH] ASoC: Intel: avoid Oops if DMA setup fails

2019-04-26 Thread Pierre-Louis Bossart
On 4/26/19 11:47 AM, Ross Zwisler wrote: Currently in sst_dsp_new() if we get an error return from sst_dma_new() we just print an error message and then still complete the function successfully. This means that we are trying to run without sst->dma properly set up, which will result in NULL

Re: [alsa-devel] [PATCH] ASoC: Intel: bytcht_es8316: fix cast warning

2019-04-24 Thread Pierre-Louis Bossart
On 4/24/19 6:41 AM, Anders Roxell wrote: When building bytcht_es8316 the following warning shows up: ../sound/soc/intel/boards/bytcht_es8316.c: In function ‘snd_byt_cht_es8316_mc_probe’: ../sound/soc/intel/boards/bytcht_es8316.c:508:11: warning: cast from pointer to integer of different size

[PATCH v2 1/2] soundwire: fix SOUNDWIRE_BUS option

2019-04-19 Thread Pierre-Louis Bossart
c49b32d3c09 ('soundwire: select REGMAP_SOUNDWIRE') Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig index 84876a74874f..d382d80d2fe1 100644 --- a/drivers/soundwire/Kconfig +++ b/dri

[PATCH v2 2/2] regmap: soundwire: fix Kconfig select/depend issue

2019-04-19 Thread Pierre-Louis Bossart
: 7c22ce6e2184 ('03fc8746f7915b5a391d8227f7e1') Signed-off-by: Pierre-Louis Bossart --- drivers/base/regmap/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig index 6ad5ef48b61e..c12e3f1fb110 100644 --- a/drivers/base

[PATCH v2 0/2] soundwire: fix Kconfig select/depend issues

2019-04-19 Thread Pierre-Louis Bossart
eless depend in REGMAP_SOUNDWIRE (select will ignore dependencies) Reordered patches to avoid circular dependencies with git bisect Pierre-Louis Bossart (2): soundwire: fix SOUNDWIRE_BUS option regmap: soundwire: fix Kconfig select/depend issue drivers/base/regmap/Kconfig | 2 +- drivers/sound

Re: [alsa-devel] [PATCH v3 0/5] soundwire: code cleanup

2019-04-19 Thread Pierre-Louis Bossart
On 4/15/19 7:57 AM, Pierre-Louis Bossart wrote: On 4/14/19 5:04 AM, Vinod Koul wrote: On 10-04-19, 22:16, Pierre-Louis Bossart wrote: SoundWire support will be provided in Linux with the Sound Open Firmware (SOF) on Intel platforms. Before we start adding the missing pieces

Re: [alsa-devel] [PATCH v3 2/5] soundwire: fix style issues

2019-04-19 Thread Pierre-Louis Bossart
  enum sdw_command_response   cdns_xfer_msg_defer(struct sdw_bus *bus, -    struct sdw_msg *msg, struct sdw_defer *defer) +    struct sdw_msg *msg, struct sdw_defer *defer) this one too..   static int cdns_port_params(struct sdw_bus *bus, -    struct sdw_port_params

Re: [alsa-devel] [PATCH v2 -next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type'

2019-04-18 Thread Pierre-Louis Bossart
-but-set-variable] It is never used since introduction in commit ba57f68235cf ("ASoC: Intel: create haswell folder and move haswell platform files in") Signed-off-by: YueHaibing Acked-by: Pierre-Louis Bossart Thanks! --- v2: also remove the variable declaration and the sta

Re: [alsa-devel] [PATCH -next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type'

2019-04-17 Thread Pierre-Louis Bossart
On 4/17/19 10:11 AM, Yue Haibing wrote: From: YueHaibing Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/intel/haswell/sst-haswell-ipc.c: In function 'hsw_stream_message': sound/soc/intel/haswell/sst-haswell-ipc.c:669:29: warning: variable 'stage_type' set but not used

Re: [alsa-devel] [PATCH v3 2/5] soundwire: fix style issues

2019-04-17 Thread Pierre-Louis Bossart
diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig index 19c8efb9a5ee..84876a74874f 100644 --- a/drivers/soundwire/Kconfig +++ b/drivers/soundwire/Kconfig @@ -4,7 +4,7 @@ menuconfig SOUNDWIRE bool "SoundWire support" - ---help--- + help Not sure if

[PATCH] ACPI / device_sysfs: change _ADR representation to 64 bits

2019-04-15 Thread Pierre-Louis Bossart
by: Pierre-Louis Bossart --- drivers/acpi/device_sysfs.c | 3 +-- include/acpi/acpi_bus.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 8940054d6250..f8d73ae42529 100644 --- a/drivers/acpi/device_sysfs.c +++

Re: [alsa-devel] [PATCH v3 2/5] soundwire: fix style issues

2019-04-15 Thread Pierre-Louis Bossart
Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Kconfig | 2 +- drivers/soundwire/bus.c| 87 drivers/soundwire/bus.h| 16 +-- drivers/soundwire/bus_type.c | 4 +- drivers/soundwire/cadence_master.c | 87

Re: [alsa-devel] [PATCH v3 0/5] soundwire: code cleanup

2019-04-15 Thread Pierre-Louis Bossart
On 4/14/19 5:04 AM, Vinod Koul wrote: On 10-04-19, 22:16, Pierre-Louis Bossart wrote: SoundWire support will be provided in Linux with the Sound Open Firmware (SOF) on Intel platforms. Before we start adding the missing pieces, there are a number of warnings and style issues reported

Re: [alsa-devel] [PATCH 0/2] soundwire: fix Kconfig select/depend issues

2019-04-15 Thread Pierre-Louis Bossart
On 4/14/19 5:13 AM, Vinod Koul wrote: On 11-04-19, 14:28, Pierre-Louis Bossart wrote: 0-day/Kbuild starts complaining about missed module dependencies and compilation issues. Since codecs and soc drivers need to be compilable independently, let's fix this using the following model: I have

Re: [alsa-devel] [PATCH] soundwire: cdns: Fix compilation error on arm64

2019-04-15 Thread Pierre-Louis Bossart
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index cb6a331f4..0b5bcc209 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -9,6 +9,7 @@ #include #include #include +#include Why not add asm/io.h which

Re: [alsa-devel] [PATCH 0/2] soundwire: fix Kconfig select/depend issues

2019-04-12 Thread Pierre-Louis Bossart
Removing SOUNDWIRE_BUS Kconfig did clean it up and made it bit more align with others Good point, but no. This is intentional and follows the Kconfig pattern pattern described by Takashi at https://lkml.org/lkml/2017/11/17/47 yes, this SOUNDWIRE is overkill for now, but let's assume

Re: [alsa-devel] [PATCH 0/2] soundwire: fix Kconfig select/depend issues

2019-04-12 Thread Pierre-Louis Bossart
On 4/12/19 5:06 AM, Srinivas Kandagatla wrote: On 11/04/2019 20:28, Pierre-Louis Bossart wrote: 0-day/Kbuild starts complaining about missed module dependencies and compilation issues. Since codecs and soc drivers need to be compilable independently, let's fix this using the following

Re: [alsa-devel] [PATCH 1/2] regmap: soundwire: fix Kconfig select/depend issue

2019-04-12 Thread Pierre-Louis Bossart
Thanks for the reviews The mechanism should be config CODEC_XYX_SDW depends on SOUNDWIRE select REGMAP_SOUNDWIRE config REGMAP_SOUNDWIRE depends on SOUNDWIRE select SOUNDWIRE_BUS To be noted, in general you can't do put both depends-on and select. The select

[PATCH 1/2] regmap: soundwire: fix Kconfig select/depend issue

2019-04-11 Thread Pierre-Louis Bossart
REGMAP_SOUNDWIRE. Fixes: 7c22ce6e2184 ('03fc8746f7915b5a391d8227f7e1') Signed-off-by: Pierre-Louis Bossart --- drivers/base/regmap/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig index 6ad5ef48b61e..4e422afe3c0d

[PATCH 2/2] soundwire: fix SOUNDWIRE_BUS option

2019-04-11 Thread Pierre-Louis Bossart
SOUNDWIRE_BUS can be selected independendly by the SOC driver (e.g. SOUNDWIRE_INTEL) or the codec driver (via REGMAP_SOUNDWIRE). Remove wrong-way link between SOUNDWIRE_BUS and REGMAP_SOUNDWIRE Fixes: 6c49b32d3c09 ('soundwire: select REGMAP_SOUNDWIRE') Signed-off-by: Pierre-Louis Bossart

[PATCH 0/2] soundwire: fix Kconfig select/depend issues

2019-04-11 Thread Pierre-Louis Bossart
--- | v REGMAP_SOUNDWIRE --- select ---> SOUNDWIRE_BUS Pierre-Louis Bossart (2): regmap: soundwire: fix Kconfig select/depend issue soundwire: fix SOUNDWIRE_BUS option drivers/base/regmap/Kconfig | 3 ++- drivers/soundwire/Kconfig | 1 - 2 files changed, 2 insertions(+)

[PATCH v3 0/5] soundwire: code cleanup

2019-04-10 Thread Pierre-Louis Bossart
inversion of devm_kcalloc parameters, detected while rebasing additional patches. Changes since v1: added missing newlines in new patch (suggested by Joe Perches) Pierre-Louis Bossart (5): soundwire: intel: fix inversion in devm_kcalloc parameters soundwire: fix style issues soundwire: bus: remove

[PATCH v3 4/5] soundwire: stream: remove useless initialization of local variable

2019-04-10 Thread Pierre-Louis Bossart
no need to reset return value. Detected with cppcheck: [drivers/soundwire/stream.c:332]: (style) Variable 'ret' is assigned a value that is never used. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v3 3/5] soundwire: bus: remove useless initializations

2019-04-10 Thread Pierre-Louis Bossart
No need for explicit initialization of page and ssp fields, they are already zeroed with a memset. Detected with cppcheck: [drivers/soundwire/bus.c:309]: (style) Variable 'msg->page' is reassigned a value before the old one has been used. Signed-off-by: Pierre-Louis Bossart --- driv

[PATCH v3 5/5] soundwire: add missing newlines in dynamic debug logs

2019-04-10 Thread Pierre-Louis Bossart
For some reason the newlines are not used everywhere. Fix as needed. Reported-by: Joe Perches Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c| 74 +-- drivers/soundwire/cadence_master.c | 12 ++-- drivers/soundwire/intel.c | 12

[PATCH v3 2/5] soundwire: fix style issues

2019-04-10 Thread Pierre-Louis Bossart
this. Fix Kconfig help, spelling, SPDX format, alignment, spurious parentheses, bool comparisons to true/false, macro argument protection. No new functionality added. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Kconfig | 2 +- drivers/soundwire/bus.c| 87

[PATCH v3 1/5] soundwire: intel: fix inversion in devm_kcalloc parameters

2019-04-10 Thread Pierre-Louis Bossart
the number of elements and size are inverted, fix. This probably only worked because the number of properties is hard-coded to 1. Fixes: 71bb8a1b059e ('soundwire: intel: Add Intel Master driver') Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 4 ++-- 1 file changed, 2

[PATCH v2 1/4] soundwire: fix style issues

2019-04-08 Thread Pierre-Louis Bossart
this. Fix Kconfig help, spelling, SPDX format, alignment, spurious parentheses, bool comparisons to true/false, macro argument protection. No new functionality added. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Kconfig | 2 +- drivers/soundwire/bus.c| 87

[PATCH v2 3/4] soundwire: stream: remove useless initialization of local variable

2019-04-08 Thread Pierre-Louis Bossart
no need to reset return value. Detected with cppcheck: [drivers/soundwire/stream.c:332]: (style) Variable 'ret' is assigned a value that is never used. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v2 4/4] soundwire: add missing newlines in dynamic debug logs

2019-04-08 Thread Pierre-Louis Bossart
For some reason the newlines are not used everywhere. Fix as needed. Reported-by: Joe Perches Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c| 74 +-- drivers/soundwire/cadence_master.c | 12 ++-- drivers/soundwire/intel.c | 12

[PATCH v2 2/4] soundwire: bus: remove useless initializations

2019-04-08 Thread Pierre-Louis Bossart
No need for explicit initialization of page and ssp fields, they are already zeroed with a memset. Detected with cppcheck: [drivers/soundwire/bus.c:309]: (style) Variable 'msg->page' is reassigned a value before the old one has been used. Signed-off-by: Pierre-Louis Bossart --- driv

[PATCH v2 0/4] soundwire: code cleanup

2019-04-08 Thread Pierre-Louis Bossart
newlines in new patch (suggested by Joe Perches) Pierre-Louis Bossart (4): soundwire: fix style issues soundwire: bus: remove useless initializations soundwire: stream: remove useless initialization of local variable soundwire: add missing newlines in dynamic debug logs drivers/soundwire

Re: [alsa-devel] [PATCH] soundwire: fix pm_runtime_get_sync return code checks

2019-04-08 Thread Pierre-Louis Bossart
On 4/8/19 2:12 AM, Jan Kotas wrote: On 5 Apr 2019, at 17:04, Pierre-Louis Bossart wrote: On 4/5/19 2:26 AM, Jan Kotas wrote: ret = pm_runtime_get_sync(slave->bus->dev); - if (ret < 0) + if (ret < 0 && ret != -EACCES) There was a patch submitted

Re: [alsa-devel] [PATCH 1/3] soundwire: fix style issues

2019-04-04 Thread Pierre-Louis Bossart
Thanks for the review Joe, @@ -458,13 +458,13 @@ static int sdw_assign_device_num(struct sdw_slave *slave) mutex_unlock(>bus->bus_lock); if (dev_num < 0) { dev_err(slave->bus->dev, "Get dev_num failed: %d", -

[PATCH 1/3] soundwire: fix style issues

2019-04-04 Thread Pierre-Louis Bossart
this. Fix Kconfig help, spelling, SPDX format, alignment, spurious parentheses, bool comparisons to true/false, macro argument protection. No new functionality added. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Kconfig | 2 +- drivers/soundwire/bus.c| 87

[PATCH 2/3] soundwire: bus: remove useless initializations

2019-04-04 Thread Pierre-Louis Bossart
No need for explicit initialization of page and ssp fields, they are already zeroed with a memset. Detected with cppcheck: [drivers/soundwire/bus.c:309]: (style) Variable 'msg->page' is reassigned a value before the old one has been used. Signed-off-by: Pierre-Louis Bossart --- driv

[PATCH 3/3] soundwire: stream: remove useless initialization of local variable

2019-04-04 Thread Pierre-Louis Bossart
no need to reset return value. Detected with cppcheck: [drivers/soundwire/stream.c:332]: (style) Variable 'ret' is assigned a value that is never used. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 0/3] soundwire: code cleanup

2019-04-04 Thread Pierre-Louis Bossart
as is is a good solution (email bounces, etc). I also don't think providing a non-Intel address is correct since the work was funded by Intel. Is there a recommended practice here? Pierre-Louis Bossart (3): soundwire: fix style issues soundwire: bus: remove useless initializations soundwire: stream: remove

Re: [alsa-devel] [PATCH] ASoC: intel: Fix crash at suspend/resume after failed codec registration

2019-03-25 Thread Pierre-Louis Bossart
On 3/25/19 8:12 AM, Mark Brown wrote: On Sat, Mar 23, 2019 at 09:55:46AM -0400, Pierre-Louis Bossart wrote: I'd like to highlight that there is a fundamental flaw in the way the machine drivers are handled. Since we don't have a hook for the machine driver in the BIOS, the DSP driver creates

Re: [alsa-devel] [PATCH] ASoC: intel: Fix crash at suspend/resume after failed codec registration

2019-03-23 Thread Pierre-Louis Bossart
t is already set, but it is not cleared if the device is subsequently removed. Adding a remove function to clear the pointer fixes the problem. Makes sense Acked-by: Pierre-Louis Bossart I'd like to highlight that there is a fundamental flaw in the way the machine drivers are handled. Since we d

Re: [alsa-devel] [PATCH] ASoC: dapm: Fix NULL pointer dereference in snd_soc_dapm_free_kcontrol

2019-03-22 Thread Pierre-Louis Bossart
lue); + + if (!w_param_text) + return; Acked-by: Pierre-Louis Bossart next time, try using git format-patch -v2 to signal it's an updated version, it helps reviewers. Thanks! + for (count = 0 ; count < num_params; count++) devm_kfree(card->dev, (void *)w_param_t

Re: Regression found (Stop-marking-clocks-as-CLK_IS_CRITICAL)

2019-01-25 Thread Pierre-Louis Bossart
The only minor annoyance I'm experiencing now, is a large amount of debug output from something in kernel log when audio is played on the system: writing to lpe: : 01 01 01 01 00 00 08 00 ff ff ff ff 55 00 00 00 U... writing to lpe: : 01 01 01 01 00 00 1a 00 ff ff

Re: Regression found (Stop-marking-clocks-as-CLK_IS_CRITICAL)

2019-01-25 Thread Pierre-Louis Bossart
On 1/24/19 11:16 PM, Mogens Jensen wrote: ‐‐‐ Original Message ‐‐‐ On Tuesday, January 22, 2019 7:27 PM, Pierre-Louis Bossart wrote: On 1/20/19 11:55 PM, Mogens Jensen wrote: The only minor annoyance I'm experiencing now, is a large amount of debug output from something

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-24 Thread Pierre-Louis Bossart
changes are legitimate. To move forward, maybe it's not worth spending too much time on a grand unification of string theory, there are simpler solutions: the Intel machine drivers already do get the platform driver name as an platform_data argument, so we could modify the dailinks platform

Re: [PATCH][V2] ASoC: Intel: make const arrays static, reduces object code size

2019-01-24 Thread Pierre-Louis Bossart
After: textdata bss dec hex filename 140158896 224 231355a5f bytcht_es8316.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King Acked-by: Pierre-Louis Bossart --- V2: also fix up bytcr_rt5640.c and bytcr_rt5651.c, thanks to Pierre-Louis Bossart

Re: [alsa-devel] [PATCH][next] ASoC: Intel: bytcht_es8316: make mic_name static, reduces object code size

2019-01-24 Thread Pierre-Louis Bossart
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index fa9c4cf97686..1364e4e601d8 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -437,7 +437,7 @@ static const struct acpi_gpio_mapping

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-22 Thread Pierre-Louis Bossart
On 1/22/19 7:36 PM, Curtis Malainey wrote: Curtis Malainey | Software Engineer | cujomalai...@google.com | 650-898-3849 On Wed, Jan 23, 2019 at 4:11 AM Pierre-Louis Bossart wrote: The issue was that we were seeing a memory corruption bug on an AMD chromebooks with that function already

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-22 Thread Pierre-Louis Bossart
The issue was that we were seeing a memory corruption bug on an AMD chromebooks with that function already (not observed on Intel). I was testing some SOF integrations and was seeing this in the kernel logs. I had Dylan verify my logic before I sent the patch because it took so long to

Re: Regression found (Stop-marking-clocks-as-CLK_IS_CRITICAL)

2019-01-22 Thread Pierre-Louis Bossart
On 1/20/19 11:55 PM, Mogens Jensen wrote: The only minor annoyance I'm experiencing now, is a large amount of debug output from something in kernel log when audio is played on the system: writing to lpe: : 01 01 01 01 00 00 08 00 ff ff ff ff 55 00 00 00 U... writing to

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-18 Thread Pierre-Louis Bossart
On 1/15/19 3:16 PM, Pierre-Louis Bossart wrote: Beyond the fact that the platform_name seems to be totally useless, additional tests show that the patch ('ASoC: soc-core: defer card probe until all component is added to list') adds a new restriction which contradicts existing error checks

Re: [PATCH 6/8] ASoC: intel: skylake: change snprintf to scnprintf for possible overflow

2019-01-16 Thread Pierre-Louis Bossart
diff --git a/sound/soc/intel/skylake/skl-debug.c b/sound/soc/intel/skylake/skl-debug.c index 5d7ac2ee7a3c..bb28db734fb7 100644 --- a/sound/soc/intel/skylake/skl-debug.c +++ b/sound/soc/intel/skylake/skl-debug.c @@ -43,7 +43,7 @@ static ssize_t skl_print_pins(struct skl_module_pin *m_pin,

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-15 Thread Pierre-Louis Bossart
Beyond the fact that the platform_name seems to be totally useless, additional tests show that the patch ('ASoC: soc-core: defer card probe until all component is added to list') adds a new restriction which contradicts existing error checks. None of the Intel machine drivers set the dailink

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-15 Thread Pierre-Louis Bossart
On 1/14/19 6:06 PM, Mark Brown wrote: On Fri, Jan 11, 2019 at 03:49:08PM -0600, Pierre-Louis Bossart wrote: Adding some traces I can see that the the platform name we use doesn't seem compatible with your logic. All the Intel boards used a constant platform name matching the PCI ID, see e.g

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-14 Thread Pierre-Louis Bossart
On 1/14/19 6:06 PM, Mark Brown wrote: On Fri, Jan 11, 2019 at 03:49:08PM -0600, Pierre-Louis Bossart wrote: Adding some traces I can see that the the platform name we use doesn't seem compatible with your logic. All the Intel boards used a constant platform name matching the PCI ID, see e.g

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-11 Thread Pierre-Louis Bossart
Thanks for the overnight fix. This update fixes the issue on my Skylake XPS13 test device (blind testing since I don't understand what the code does). Tested-by: Pierre-Louis Bossart I need to take this back, this set of changes (initial+fix) causes an error with our HDMI support

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-11 Thread Pierre-Louis Bossart
the issue on my Skylake XPS13 test device (blind testing since I don't understand what the code does). Tested-by: Pierre-Louis Bossart Fixes: 8780cf1142a5 ("ASoC: soc-core: defer card probe until all component is added to list") Reported-by: Pierre-Louis Bossart Signed-off-by: Ajit Pand

Re: [alsa-devel] [PATCH v2] ASoC: soc-core: defer card probe until all component is added to list

2019-01-10 Thread Pierre-Louis Bossart
While debugging Skylake audio stuff, I came across a kernel oops introduced by this commit. It's quite late here and my brain is fried, submitting as is but my money is on the use of link->platform->of_node which is quite unlikely to work on ACPI platforms. and btw you may want to fix the

Re: [alsa-devel] [PATCH -next v2] ASoC: Intel: bytcht_es8316: use correct drvdata in snd_byt_cht_es8316_mc_remove()

2019-01-09 Thread Pierre-Louis Bossart
(). Fixes: 0d3e91da0750 ("ASoC: Intel: bytcht_es8316: Add external speaker mux support") Signed-off-by: Wei Yongjun Acked-by: Pierre-Louis Bossart --- v1 -> v2: fix snd_byt_cht_es8316_mc_remove() instead, suggested by Dan. --- sound/soc/intel/boards/bytcht_es8316.c | 3 ++- 1 fi

Re: [GIT PULL] sound updates for 4.21

2019-01-04 Thread Pierre-Louis Bossart
On 1/4/19 6:34 PM, Azat Khuzhin wrote: This is unfortunately a known issue with this driver, Takashi and I had a couple of email threads on this. Even without errors removing the module doesn't seem to release all resources. I don't like this at all, and for the Sound Open Firmware (SOF)

[PATCH 10/21] ASoC: rt274: fix boolean tests

2019-01-04 Thread Pierre-Louis Bossart
-Louis Bossart --- sound/soc/codecs/rt274.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c index e2855ab9a2c6..9e88f7b25d38 100644 --- a/sound/soc/codecs/rt274.c +++ b/sound/soc/codecs/rt274.c @@ -381,10 +381,10

[PATCH 19/21] ASoC: da7219: use logical AND

2019-01-04 Thread Pierre-Louis Bossart
Reported by Sparse: da7219.c:841:57: warning: dubious: x & !y Cc: Adam Thomson Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/da7219.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index ce165047

[PATCH 16/21] ASoC: tscs42xx.c: fix boolean test

2019-01-04 Thread Pierre-Louis Bossart
Reported by Coccinelle: sound/soc/codecs/tscs42xx.c:392:5-31: WARNING: Comparison to bool Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/tscs42xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/tscs42xx.c b/sound/soc/codecs/tscs42xx.c index

[PATCH 15/21] ASoC: nau8824: fix boolean assignment

2019-01-04 Thread Pierre-Louis Bossart
Reported by Coccinelle: nau8824.c:810:6-12: ERROR: Assignment of bool to non-0/1 constant Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/nau8824.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c index

[PATCH 13/21] ASoC: max98927: fix boolean assignments

2019-01-04 Thread Pierre-Louis Bossart
: Assignment of bool to 0/1 Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/max98927.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c index 065303a46535..e53d2007f3be 100644 --- a/sound/soc/codecs/max98927.c

[PATCH 20/21] ASoC: rt5645: store eq kcontrol byte in __be

2019-01-04 Thread Pierre-Louis Bossart
ned-off-by: Bard liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5645.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 52ce380c8f3a..9a0751978090 100644 --- a/sound/

[PATCH 17/21] ASoC: mt6351: remove unneeded variable

2019-01-04 Thread Pierre-Louis Bossart
Reported by Coccinelle: mt6351.c:1418:5-8: Unneeded variable: "ret". Return "0" on line 1437 Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/mt6351.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/codecs/mt6351.c b/sound/soc/c

[PATCH 21/21] ASoC: rl6437a: use __be32 for a __be32 buf

2019-01-04 Thread Pierre-Louis Bossart
From: Bard liao The buf in rl6347a_hw_read is __be32. Cc: Oder Chiou Signed-off-by: Bard liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rl6347a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rl6347a.c b/sound/soc/codecs/rl6347a.c

[PATCH 18/21] ASoC: da7219: fix endianness issues

2019-01-04 Thread Pierre-Louis Bossart
-aad.c:157:37:got restricted __le16 [usertype] Cc: Adam Thomson Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/da7219-aad.c | 2 +- sound/soc/codecs/da7219.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/da7219-aad.c b/sound/soc

[PATCH 11/21] ASoc: rt286: fix boolean tests

2019-01-04 Thread Pierre-Louis Bossart
-Louis Bossart --- sound/soc/codecs/rt286.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index 0b0f748bffbe..c9457c247a03 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c @@ -296,10 +296,10 @@ static

[PATCH 04/21] ASoC: codecs: fix kernel doc descriptions

2019-01-04 Thread Pierre-Louis Bossart
Missing or spurious parameter descriptions. Fix warnings with W=1 Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/nau8825.c | 1 + sound/soc/codecs/rt5514.c | 1 + sound/soc/codecs/rt5677.c | 8 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs

[PATCH 08/21] ASoC: rt298: fix boolean tests

2019-01-04 Thread Pierre-Louis Bossart
:348:5-7: WARNING: Comparison to bool sound/soc/codecs/rt298.c:351:5-8: WARNING: Comparison to bool Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt298.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c

[PATCH 12/21] ASoC: rt5640: fix boolean assignments

2019-01-04 Thread Pierre-Louis Bossart
Reported by Coccinelle: sound/soc/codecs/rt5640.c:980:2-17: WARNING: Assignment of bool to 0/1 sound/soc/codecs/rt5640.c:984:2-17: WARNING: Assignment of bool to 0/1 sound/soc/codecs/rt5640.c:2825:1-16: WARNING: Assignment of bool to 0/1 Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs

[PATCH 02/21] ASoC: max98090: remove unused constant variables

2019-01-04 Thread Pierre-Louis Bossart
Fix warnings with W=1 If these variables are useful then this driver should be modified to expose them. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/max98090.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs

[PATCH 14/21] ASoC: rt5651: fix boolean assignments

2019-01-04 Thread Pierre-Louis Bossart
Reported by Coccinelle: sound/soc/codecs/rt5651.c:750:2-17: WARNING: Assignment of bool to 0/1 sound/soc/codecs/rt5651.c:754:2-17: WARNING: Assignment of bool to 0/1 sound/soc/codecs/rt5651.c:2192:1-16: WARNING: Assignment of bool to 0/1 Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs

[PATCH 09/21] ASoC: cs4271: fix boolean assignments

2019-01-04 Thread Pierre-Louis Bossart
Reported by Coccinelle: sound/soc/codecs/cs4271.c:226:2-16: WARNING: Assignment of bool to 0/1 sound/soc/codecs/cs4271.c:229:2-16: WARNING: Assignment of bool to 0/1 Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/cs4271.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 01/21] ASoC: dmic: declare trigger function as static

2019-01-04 Thread Pierre-Louis Bossart
No reason why this is global, fix warnings with W=1 Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/dmic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c index da921da50ef0..de041369e5a7 100644 --- a/sound/soc

[PATCH 03/21] ASoC: es8316: remove unused constant variables

2019-01-04 Thread Pierre-Louis Bossart
Fix warnings with W=1 If these variables are useful this driver should be modified to expose them. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/es8316.c | 4 1 file changed, 4 deletions(-) diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c index e97d12d578b0

<    5   6   7   8   9   10   11   12   13   14   >