From: Takashi Iwai <tiwai@suse.de>
To: "Sudip Mukherjee" <sudipm.mukherjee@gmail.com>
Cc: "Mark Brown" <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] ASoC: hdac_hdmi: convert num_nodes to int
Date: Thu, 26 Nov 2015 09:23:44 +0100 [thread overview]
Message-ID: <s5htwo96uen.wl-tiwai@suse.de> (raw)
In-Reply-To: <1448525299-7011-1-git-send-email-sudipm.mukherjee@gmail.com>
On Thu, 26 Nov 2015 09:08:19 +0100,
Sudip Mukherjee wrote:
>
> All uses of num_nodes are considering it as a signed integer and that is
> very much clear when we try to save the error value in it and later try
> to compare it with less than 0.
No. The point is that the value checked *there* has to be int, not
the value used for the success case. Just have a temporary value,
e.g. int num_nodes, assign there, check it, then assign the value to
codec->num_nodes field. The num_nodes field itself is obviously an
unsigned.
Takashi
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> include/sound/hdaudio.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
> index e2b712c..c5fad14 100644
> --- a/include/sound/hdaudio.h
> +++ b/include/sound/hdaudio.h
> @@ -71,7 +71,7 @@ struct hdac_device {
> unsigned int flags, unsigned int *res);
>
> /* widgets */
> - unsigned int num_nodes;
> + int num_nodes;
> hda_nid_t start_nid, end_nid;
>
> /* misc flags */
> --
> 1.9.1
>
>
prev parent reply other threads:[~2015-11-26 8:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 8:08 [PATCH v2] ASoC: hdac_hdmi: convert num_nodes to int Sudip Mukherjee
2015-11-26 8:23 ` Takashi Iwai [this message]
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=s5htwo96uen.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sudipm.mukherjee@gmail.com \
/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