From: Takashi Iwai <tiwai@suse.de>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: Re: [sound-unstable:master 118/143] sound/pci/hda/patch_cirrus.c:1414:10: sparse: Initializer entry
Date: Thu, 13 Sep 2012 08:01:34 +0000 [thread overview]
Message-ID: <s5ha9wue4gx.wl%tiwai@suse.de> (raw)
In-Reply-To: <20120913074940.GA25767@localhost>
At Thu, 13 Sep 2012 15:49:40 +0800,
Fengguang Wu wrote:
>
> Hi Takashi,
>
> FYI, there are new sparse warnings show up in
>
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-unstable.git master
> head: 82cb521360dfd32f4f03ceaa74ef6b83ae983593
> commit: ef596a57b4d7d8b258beb570ed309ef85bf24dd1 [118/143] ALSA: hda - Add support for MacBook Pro 10,1
>
> All sparse warnings:
>
> + sound/pci/hda/patch_cirrus.c:1414:10: sparse: Initializer entry defined twice
> sound/pci/hda/patch_cirrus.c:1418:10: also defined here
>
> The root cause is, CS420X_MBP101 = CS420X_GPIO_23:
I fixed it quickly now with the patch below. Thanks!
Takashi
---
Subject: [PATCH] ALSA: hda - Fix disordered enum definitions in patch_cirrus.c
Due to the definitions of CS420X_IMAC27_122 and CS420X_APPLE as
aliases, the rest enums are set to duplicated values unexpectedly.
Move the alias definitions at the end so that the enum values are
defined in the proper order.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/patch_cirrus.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 82253f1..fcfc9f0 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -83,11 +83,12 @@ enum {
CS420X_IMAC27,
CS420X_GPIO_13,
CS420X_GPIO_23,
- CS420X_IMAC27_122 = CS420X_GPIO_23,
- CS420X_APPLE = CS420X_GPIO_13,
CS420X_MBP101,
CS420X_MBP101_COEF,
CS420X_AUTO,
+ /* aliases */
+ CS420X_IMAC27_122 = CS420X_GPIO_23,
+ CS420X_APPLE = CS420X_GPIO_13,
};
/* CS421x boards */
--
1.7.11.5
prev parent reply other threads:[~2012-09-13 8:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 7:49 [sound-unstable:master 118/143] sound/pci/hda/patch_cirrus.c:1414:10: sparse: Initializer entry defi Fengguang Wu
2012-09-13 8:01 ` 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=s5ha9wue4gx.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=fengguang.wu@intel.com \
--cc=kernel-janitors@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