Re: [PATCH] [media] cx88: Remove duplicate const

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Emil Goode wrote:

> This patch fixes the following sparse warnings
> by removing use of duplicate const.

Is this really just about quieting sparse noise?

I would find it clearer to read a more straightforward explanation
like

	Remove some redundant uses of "const" detected by sparse:

but that is only a nitpick.

[...]
> --- a/drivers/media/video/cx88/cx88-alsa.c
> +++ b/drivers/media/video/cx88/cx88-alsa.c
> @@ -766,7 +766,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 = {

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,

Acked-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux