mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Clemens Ladisch <clemens@ladisch.de>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] ALSA: oxfw: fix detect_loud_models() return value
Date: Sat, 13 Dec 2014 13:45:55 +0900	[thread overview]
Message-ID: <548BC483.4090703@sakamocchi.jp> (raw)
In-Reply-To: <20141212192810.GB22234@mwanda>

On Dec 13 2014 04:28, Dan Carpenter wrote:
> This code causes a static checker warning:
> 
> 	sound/firewire/oxfw/oxfw.c:46 detect_loud_models()
> 	warn: signedness bug returning '(-2)'
> 
> The detect_loud_models() function should return false on falure, so that
> we don't try to set up the loud code for hardware that doesn't support
> it.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c
> index cf1d0b5..60e5cad 100644
> --- a/sound/firewire/oxfw/oxfw.c
> +++ b/sound/firewire/oxfw/oxfw.c
> @@ -43,7 +43,7 @@ static bool detect_loud_models(struct fw_unit *unit)
>  	err = fw_csr_string(unit->directory, CSR_MODEL,
>  			    model, sizeof(model));
>  	if (err < 0)
> -		return err;
> +		return false;
>  
>  	for (i = 0; i < ARRAY_SIZE(models); i++) {
>  		if (strcmp(models[i], model) == 0)

Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>


Thanks

Takashi Sakamoto
o-takashi@sakamocchi.jp

  reply	other threads:[~2014-12-13  4:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-12 19:28 Dan Carpenter
2014-12-13  4:45 ` Takashi Sakamoto [this message]
2014-12-14 15:05   ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=548BC483.4090703@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®