Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1278052 > unrolled thread
| Started by | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| First post | 2015-11-26 09:10 +0100 |
| Last post | 2015-11-26 09:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] ASoC: hdac_hdmi: convert num_nodes to int Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-11-26 09:10 +0100
Re: [PATCH v2] ASoC: hdac_hdmi: convert num_nodes to int Takashi Iwai <tiwai@suse.de> - 2015-11-26 09:30 +0100
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-11-26 09:10 +0100 |
| Subject | [PATCH v2] ASoC: hdac_hdmi: convert num_nodes to int |
| Message-ID | <qyZMS-2jO-11@gated-at.bofh.it> |
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.
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2015-11-26 09:30 +0100 |
| Message-ID | <qz06e-2tb-25@gated-at.bofh.it> |
| In reply to | #1278052 |
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
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web