lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Sep 2007 11:09:06 -0700
From:	Joe Perches <joe@...ches.com>
To:	Denys Vlasenko <vda.linux@...glemail.com>
Cc:	Takashi Iwai <tiwai@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] add consts where appropriate in sound/pci/hda/*

On Fri, 2007-09-14 at 18:48 +0100, Denys Vlasenko wrote:

> Patch is attached.

The SND_HDA_PRESETS define doesn't seem useful.
It's only used once.

diff -urp linux-2.6.23-rc6/sound/pci/hda/hda_codec.c linux-2.6.23-rc6.bigdata/sound/pci/hda/hda_codec.c
--- linux-2.6.23-rc6/sound/pci/hda/hda_codec.c	2007-07-09 00:32:17.000000000 +0100
+++ linux-2.6.23-rc6.bigdata/sound/pci/hda/hda_codec.c	2007-09-14 18:32:24.000000000 +0100
@@ -57,6 +57,10 @@ static struct hda_vendor_id hda_vendor_i
 
 /* codec presets */
 #include "hda_patch.h"
+static const struct hda_codec_preset *const hda_preset_tables[] = {
+	SND_HDA_PRESETS,
+	NULL
+};
diff -urp linux-2.6.23-rc6/sound/pci/hda/hda_patch.h linux-2.6.23-rc6.bigdata/sound/pci/hda/hda_patch.h
--- linux-2.6.23-rc6/sound/pci/hda/hda_patch.h	2007-07-09 00:32:17.000000000 +0100
+++ linux-2.6.23-rc6.bigdata/sound/pci/hda/hda_patch.h	2007-09-14 18:30:17.000000000 +0100
@@ -1,32 +1,30 @@
 /*
- * HDA Patches - included by hda_codec.c
+ * HDA Patches
  */
 
 /* Realtek codecs */
-extern struct hda_codec_preset snd_hda_preset_realtek[];
+extern const struct hda_codec_preset snd_hda_preset_realtek[];
 /* C-Media codecs */
-extern struct hda_codec_preset snd_hda_preset_cmedia[];
+extern const struct hda_codec_preset snd_hda_preset_cmedia[];
 /* Analog Devices codecs */
-extern struct hda_codec_preset snd_hda_preset_analog[];
+extern const struct hda_codec_preset snd_hda_preset_analog[];
 /* SigmaTel codecs */
-extern struct hda_codec_preset snd_hda_preset_sigmatel[];
+extern const struct hda_codec_preset snd_hda_preset_sigmatel[];
 /* SiLabs 3054/3055 modem codecs */
-extern struct hda_codec_preset snd_hda_preset_si3054[];
+extern const struct hda_codec_preset snd_hda_preset_si3054[];
 /* ATI HDMI codecs */
-extern struct hda_codec_preset snd_hda_preset_atihdmi[];
+extern const struct hda_codec_preset snd_hda_preset_atihdmi[];
 /* Conexant audio codec */
-extern struct hda_codec_preset snd_hda_preset_conexant[];
+extern const struct hda_codec_preset snd_hda_preset_conexant[];
 /* VIA codecs */
-extern struct hda_codec_preset snd_hda_preset_via[];
+extern const struct hda_codec_preset snd_hda_preset_via[];
 
-static const struct hda_codec_preset *hda_preset_tables[] = {
-	snd_hda_preset_realtek,
-	snd_hda_preset_cmedia,
-	snd_hda_preset_analog,
-	snd_hda_preset_sigmatel,
-	snd_hda_preset_si3054,
-	snd_hda_preset_atihdmi,
-	snd_hda_preset_conexant,
-	snd_hda_preset_via,
-	NULL
-};
+#define SND_HDA_PRESETS \
+	snd_hda_preset_realtek, \
+	snd_hda_preset_cmedia, \
+	snd_hda_preset_analog, \
+	snd_hda_preset_sigmatel, \
+	snd_hda_preset_si3054, \
+	snd_hda_preset_atihdmi, \
+	snd_hda_preset_conexant, \
+	snd_hda_preset_via


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ