alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [patch v2] ASoC: Intel: Skylake: Fix a couple signedness bugs
@ 2015-12-15  9:20 Dan Carpenter
  2015-12-16 15:59 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-12-15  9:20 UTC (permalink / raw)
  To: Liam Girdwood, Dharageswari R
  Cc: alsa-devel, Vinod Koul, kernel-janitors, Takashi Iwai, Mark Brown,
	Jeeja KP, Subhransu S. Prusty

These need to be signed because they hold negative error codes.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Fix a typo in the change log.  s/unsigned/signed/

diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c
index 8cd5cdb..e26f474 100644
--- a/sound/soc/intel/skylake/skl-sst.c
+++ b/sound/soc/intel/skylake/skl-sst.c
@@ -208,7 +208,7 @@ static unsigned int skl_get_errorcode(struct sst_dsp *ctx)
  * since get/set_module are called from DAPM context,
  * we don't need lock for usage count
  */
-static unsigned int skl_get_module(struct sst_dsp *ctx, u16 mod_id)
+static int skl_get_module(struct sst_dsp *ctx, u16 mod_id)
 {
 	struct skl_module_table *module;
 
@@ -220,7 +220,7 @@ static unsigned int skl_get_module(struct sst_dsp *ctx, u16 mod_id)
 	return -EINVAL;
 }
 
-static unsigned int skl_put_module(struct sst_dsp *ctx, u16 mod_id)
+static int skl_put_module(struct sst_dsp *ctx, u16 mod_id)
 {
 	struct skl_module_table *module;
 
@@ -340,7 +340,7 @@ static int skl_load_module(struct sst_dsp *ctx, u16 mod_id, char *guid)
 
 static int skl_unload_module(struct sst_dsp *ctx, u16 mod_id)
 {
-	unsigned int usage_cnt;
+	int usage_cnt;
 	struct skl_sst *skl = ctx->thread_context;
 	int ret = 0;
 

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

* Re: [patch v2] ASoC: Intel: Skylake: Fix a couple signedness bugs
  2015-12-15  9:20 [patch v2] ASoC: Intel: Skylake: Fix a couple signedness bugs Dan Carpenter
@ 2015-12-16 15:59 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2015-12-16 15:59 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Liam Girdwood, Dharageswari R, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Jeeja KP, Subhransu S. Prusty, alsa-devel,
	kernel-janitors

On Tue, Dec 15, 2015 at 12:20:14PM +0300, Dan Carpenter wrote:
> These need to be signed because they hold negative error codes.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by Vinod Koul <vinod.koul@intel.com>

> ---
> Fix a typo in the change log.  s/unsigned/signed/
> 
> diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c
> index 8cd5cdb..e26f474 100644
> --- a/sound/soc/intel/skylake/skl-sst.c
> +++ b/sound/soc/intel/skylake/skl-sst.c
> @@ -208,7 +208,7 @@ static unsigned int skl_get_errorcode(struct sst_dsp *ctx)
>   * since get/set_module are called from DAPM context,
>   * we don't need lock for usage count
>   */
> -static unsigned int skl_get_module(struct sst_dsp *ctx, u16 mod_id)
> +static int skl_get_module(struct sst_dsp *ctx, u16 mod_id)
>  {
>  	struct skl_module_table *module;
>  
> @@ -220,7 +220,7 @@ static unsigned int skl_get_module(struct sst_dsp *ctx, u16 mod_id)
>  	return -EINVAL;
>  }
>  
> -static unsigned int skl_put_module(struct sst_dsp *ctx, u16 mod_id)
> +static int skl_put_module(struct sst_dsp *ctx, u16 mod_id)
>  {
>  	struct skl_module_table *module;
>  
> @@ -340,7 +340,7 @@ static int skl_load_module(struct sst_dsp *ctx, u16 mod_id, char *guid)
>  
>  static int skl_unload_module(struct sst_dsp *ctx, u16 mod_id)
>  {
> -	unsigned int usage_cnt;
> +	int usage_cnt;
>  	struct skl_sst *skl = ctx->thread_context;
>  	int ret = 0;
>  

-- 
~Vinod

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

end of thread, other threads:[~2015-12-16 15:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-15  9:20 [patch v2] ASoC: Intel: Skylake: Fix a couple signedness bugs Dan Carpenter
2015-12-16 15:59 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).