From: Nenghua Cao <nhcao@marvell.com>
To: Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Mark Brown <broonie@kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Nenghua Cao <nhcao@marvell.com>
Subject: [PATCH 2/2] asoc: soc-core: fix coccinelle warnings
Date: Fri, 21 Feb 2014 16:06:10 +0800 [thread overview]
Message-ID: <1392969970-28037-1-git-send-email-nhcao@marvell.com> (raw)
From: Nenghua Cao <nhcao@marvell.com>
sound/soc/soc-core.c:2708:6-13: WARNING: Assignment of
bool to 0/1
sound/soc/soc-core.c:2726:3-10: WARNING: Assignment of
bool to 0/1
sound/soc/soc-core.c:2264:1-7: Replace memcpy with
struct assignment
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Nenghua Cao <nhcao@marvell.com>
---
sound/soc/soc-core.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index fb598cb..c59b3ea 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2413,7 +2413,7 @@ struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template,
struct snd_kcontrol *kcontrol;
char *name = NULL;
- memcpy(&template, _template, sizeof(template));
+ memcpy(&template, _template, sizeof(struct snd_kcontrol_new));
template.index = 0;
if (!long_name)
@@ -2818,7 +2818,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
unsigned int mask = (1 << fls(max)) - 1;
unsigned int invert = mc->invert;
int err;
- bool type_2r = 0;
+ bool type_2r = false;
unsigned int val2 = 0;
unsigned int val, val_mask;
@@ -2836,7 +2836,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
val |= val2 << rshift;
} else {
val2 = val2 << shift;
- type_2r = 1;
+ type_2r = true;
}
}
err = snd_soc_update_bits_locked(codec, reg, val_mask, val);
--
1.7.0.4
next reply other threads:[~2014-02-21 8:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 8:06 Nenghua Cao [this message]
2014-02-22 2:52 ` Mark Brown
2014-02-24 3:05 ` Nenghua Cao
2014-02-24 5:40 ` Mark Brown
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=1392969970-28037-1-git-send-email-nhcao@marvell.com \
--to=nhcao@marvell.com \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
/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®