From: Dan Carpenter <dan.carpenter@oracle.com>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
Takashi Sakamoto <o-takashi@sakamocchi.jp>,
alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: [patch] ALSA: bebob: sizeof() vs ARRAY_SIZE() typo
Date: Wed, 28 May 2014 19:43:30 +0300 [thread overview]
Message-ID: <20140528164330.GD1824@mwanda> (raw)
ARRAY_SIZE() was intended here instead of sizeof(). The
"bridgeco_freq_table" array holds integers so the original condition is
never true.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c
index 514c7c9..bc4f827 100644
--- a/sound/firewire/bebob/bebob_stream.c
+++ b/sound/firewire/bebob/bebob_stream.c
@@ -749,7 +749,7 @@ parse_stream_formation(u8 *buf, unsigned int len,
if (buf[2] == bridgeco_freq_table[i])
break;
}
- if (i == sizeof(bridgeco_freq_table))
+ if (i == ARRAY_SIZE(bridgeco_freq_table))
return -ENOSYS;
/* Avoid double count by different entries for the same rate. */
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
Takashi Sakamoto <o-takashi@sakamocchi.jp>,
alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: [patch] ALSA: bebob: sizeof() vs ARRAY_SIZE() typo
Date: Wed, 28 May 2014 16:43:30 +0000 [thread overview]
Message-ID: <20140528164330.GD1824@mwanda> (raw)
ARRAY_SIZE() was intended here instead of sizeof(). The
"bridgeco_freq_table" array holds integers so the original condition is
never true.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c
index 514c7c9..bc4f827 100644
--- a/sound/firewire/bebob/bebob_stream.c
+++ b/sound/firewire/bebob/bebob_stream.c
@@ -749,7 +749,7 @@ parse_stream_formation(u8 *buf, unsigned int len,
if (buf[2] = bridgeco_freq_table[i])
break;
}
- if (i = sizeof(bridgeco_freq_table))
+ if (i = ARRAY_SIZE(bridgeco_freq_table))
return -ENOSYS;
/* Avoid double count by different entries for the same rate. */
next reply other threads:[~2014-05-28 16:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 16:43 Dan Carpenter [this message]
2014-05-28 16:43 ` [patch] ALSA: bebob: sizeof() vs ARRAY_SIZE() typo Dan Carpenter
2014-05-28 21:58 ` Takashi Sakamoto
2014-05-28 21:58 ` [alsa-devel] " Takashi Sakamoto
2014-05-29 13:58 ` Takashi Iwai
2014-05-29 13:58 ` 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=20140528164330.GD1824@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=o-takashi@sakamocchi.jp \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.