[alsa-devel] [PATCH 0/2] soundwire: cadence: remove warnings
Fix warnings reported by cppcheck and make W=1
Pierre-Louis Bossart (2): soundwire: cadence: update kernel-doc parameter descriptions soundwire: cadence: remove useless variable incrementation
drivers/soundwire/cadence_master.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
make W=1 reports inconsistencies with parameter descriptions, fix
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- drivers/soundwire/cadence_master.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index fed21e2b2277..377628de380d 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -814,6 +814,7 @@ EXPORT_SYMBOL(sdw_cdns_exit_reset); /** * sdw_cdns_enable_interrupt() - Enable SDW interrupts and update config * @cdns: Cadence instance + * @state: True if we are trying to enable interrupt. */ int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns, bool state) { @@ -1224,8 +1225,10 @@ EXPORT_SYMBOL(cdns_set_sdw_stream); * cdns_find_pdi() - Find a free PDI * * @cdns: Cadence instance + * @offset: Starting offset * @num: Number of PDIs * @pdi: PDI instances + * @dai_id: DAI id * * Find a PDI for a given PDI array. The PDI num and dai_id are * expected to match, return NULL otherwise. @@ -1277,6 +1280,7 @@ EXPORT_SYMBOL(sdw_cdns_config_stream); * @stream: Stream to be allocated * @ch: Channel count * @dir: Data direction + * @dai_id: DAI id */ struct sdw_cdns_pdi *sdw_cdns_alloc_pdi(struct sdw_cdns *cdns, struct sdw_cdns_streams *stream,
Fix cppcheck warning:
drivers/soundwire/cadence_master.c:992:9: style: Variable 'offset' is assigned a value that is never used. [unreadVariable] offset += stream->num_out; ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- drivers/soundwire/cadence_master.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 377628de380d..d8d476a9fd21 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -949,8 +949,6 @@ int sdw_cdns_pdi_init(struct sdw_cdns *cdns, ret = cdns_allocate_pdi(cdns, &stream->out, stream->num_out, offset);
- offset += stream->num_out; - if (ret) return ret;
participants (2)
-
Pierre-Louis Bossart
-
Vinod Koul