]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
[media] cx88: Remove duplicate const
authorEmil Goode <emilgoode@gmail.com>
Fri, 4 May 2012 08:33:37 +0000 (05:33 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 13 Aug 2012 22:47:56 +0000 (19:47 -0300)
This patch fixes the following sparse warnings
by removing use of duplicate const.

drivers/media/video/cx88/cx88.h:152:40:
warning: duplicate const
drivers/media/video/cx88/cx88-core.c:256:33:
warning: duplicate const
drivers/media/video/cx88/cx88-alsa.c:769:41:
warning: duplicate const

As commented by Jonathan Nieder:

These double "const" were introduced in v2.6.37-rc1~64^2~464 (V4L/DVB:
drivers/media: Make static data tables and strings const, 2010-08-25).

The address of an array is already immutable by definition, so for
what it's worth, with or without a clarified commit message,

[mchehab@redhat.com: Tested with "gcc -s" (version 4.7.0):
 the produced asm is indeed equal before and after this patch]
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx88/cx88-alsa.c
drivers/media/video/cx88/cx88-core.c
drivers/media/video/cx88/cx88.h

index dfac6e34859fc2d7b8647ac4c8afdd70f6e2de8b..3aa6856ead3b2f13f71db61ee9ea329808c01be4 100644 (file)
@@ -749,7 +749,7 @@ static struct snd_kcontrol_new snd_cx88_alc_switch = {
  * Only boards with eeprom and byte 1 at eeprom=1 have it
  */
 
-static const struct pci_device_id const cx88_audio_pci_tbl[] __devinitdata = {
+static const struct pci_device_id cx88_audio_pci_tbl[] __devinitdata = {
        {0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
        {0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0},
        {0, }
index e81c735f012a263b918bfdb324aff12578b06c1d..c97b174be3ab6313e9810c0c27b13b97ce2f3384 100644 (file)
@@ -253,7 +253,7 @@ cx88_free_buffer(struct videobuf_queue *q, struct cx88_buffer *buf)
  *    0x0c00 -           FIFOs
  */
 
-const struct sram_channel const cx88_sram_channels[] = {
+const struct sram_channel cx88_sram_channels[] = {
        [SRAM_CH21] = {
                .name       = "video y / packed",
                .cmds_start = 0x180040,
index 0cae0fd9e1647d50f73b4826c2a35861f71a771c..44ffc8b3d45f9f7a586404a0b37e8520ae804fa0 100644 (file)
@@ -141,7 +141,7 @@ struct sram_channel {
        u32  cnt1_reg;
        u32  cnt2_reg;
 };
-extern const struct sram_channel const cx88_sram_channels[];
+extern const struct sram_channel cx88_sram_channels[];
 
 /* ----------------------------------------------------------- */
 /* card configuration                                          */