Alsa-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [alsa-devel] [PATCH 0/2] soundwire: cadence: remove warnings
@ 2020-01-13 21:10 Pierre-Louis Bossart
  2020-01-13 21:10 ` [alsa-devel] [PATCH 1/2] soundwire: cadence: update kernel-doc parameter descriptions Pierre-Louis Bossart
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-13 21:10 UTC (permalink / raw)
  To: alsa-devel
  Cc: Pierre-Louis Bossart, tiwai, gregkh, linux-kernel,
	Ranjani Sridharan, vkoul, broonie, srinivas.kandagatla, jank,
	slawomir.blauciak, Bard liao, Rander Wang

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(-)

-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [alsa-devel] [PATCH 1/2] soundwire: cadence: update kernel-doc parameter descriptions
  2020-01-13 21:10 [alsa-devel] [PATCH 0/2] soundwire: cadence: remove warnings Pierre-Louis Bossart
@ 2020-01-13 21:10 ` Pierre-Louis Bossart
  2020-01-13 21:10 ` [alsa-devel] [PATCH 2/2] soundwire: cadence: remove useless variable incrementation Pierre-Louis Bossart
  2020-01-14  6:33 ` [alsa-devel] [PATCH 0/2] soundwire: cadence: remove warnings Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-13 21:10 UTC (permalink / raw)
  To: alsa-devel
  Cc: Pierre-Louis Bossart, tiwai, gregkh, linux-kernel,
	Ranjani Sridharan, vkoul, broonie, srinivas.kandagatla, jank,
	slawomir.blauciak, Sanyog Kale, Bard liao, Rander Wang

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,
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [alsa-devel] [PATCH 2/2] soundwire: cadence: remove useless variable incrementation
  2020-01-13 21:10 [alsa-devel] [PATCH 0/2] soundwire: cadence: remove warnings Pierre-Louis Bossart
  2020-01-13 21:10 ` [alsa-devel] [PATCH 1/2] soundwire: cadence: update kernel-doc parameter descriptions Pierre-Louis Bossart
@ 2020-01-13 21:10 ` Pierre-Louis Bossart
  2020-01-14  6:33 ` [alsa-devel] [PATCH 0/2] soundwire: cadence: remove warnings Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-13 21:10 UTC (permalink / raw)
  To: alsa-devel
  Cc: Pierre-Louis Bossart, tiwai, gregkh, linux-kernel,
	Ranjani Sridharan, vkoul, broonie, srinivas.kandagatla, jank,
	slawomir.blauciak, Sanyog Kale, Bard liao, Rander Wang

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;
 
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [alsa-devel] [PATCH 0/2] soundwire: cadence: remove warnings
  2020-01-13 21:10 [alsa-devel] [PATCH 0/2] soundwire: cadence: remove warnings Pierre-Louis Bossart
  2020-01-13 21:10 ` [alsa-devel] [PATCH 1/2] soundwire: cadence: update kernel-doc parameter descriptions Pierre-Louis Bossart
  2020-01-13 21:10 ` [alsa-devel] [PATCH 2/2] soundwire: cadence: remove useless variable incrementation Pierre-Louis Bossart
@ 2020-01-14  6:33 ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2020-01-14  6:33 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: alsa-devel, tiwai, gregkh, linux-kernel, Ranjani Sridharan,
	broonie, srinivas.kandagatla, jank, slawomir.blauciak, Bard liao,
	Rander Wang

On 13-01-20, 15:10, Pierre-Louis Bossart wrote:
> Fix warnings reported by cppcheck and make W=1

Applied, thanks

-- 
~Vinod
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-13 21:10 [alsa-devel] [PATCH 0/2] soundwire: cadence: remove warnings Pierre-Louis Bossart
2020-01-13 21:10 ` [alsa-devel] [PATCH 1/2] soundwire: cadence: update kernel-doc parameter descriptions Pierre-Louis Bossart
2020-01-13 21:10 ` [alsa-devel] [PATCH 2/2] soundwire: cadence: remove useless variable incrementation Pierre-Louis Bossart
2020-01-14  6:33 ` [alsa-devel] [PATCH 0/2] soundwire: cadence: remove warnings Vinod Koul

Alsa-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/alsa-devel/0 alsa-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 alsa-devel alsa-devel/ https://lore.kernel.org/alsa-devel \
		alsa-devel@alsa-project.org
	public-inbox-index alsa-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.alsa-project.alsa-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git