Patchwork PCI: drop duplicate const in DECLARE_PCI_FIXUP_SECTION

login
register
mail settings
Submitter Mathias Krause
Date Sept. 2, 2012, 9:37 p.m.
Message ID <1346621844-31211-1-git-send-email-minipli@googlemail.com>
Download mbox | patch
Permalink /patch/181229/
State Accepted
Headers show

Comments

Mathias Krause - Sept. 2, 2012, 9:37 p.m.
It's redundant and makes sparse complain about it.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
 include/linux/pci.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Mathias Krause - Sept. 9, 2012, 4:54 p.m.
On Sun, Sep 2, 2012 at 11:37 PM, Mathias Krause <minipli@googlemail.com> wrote:
> It's redundant and makes sparse complain about it.
>
> Signed-off-by: Mathias Krause <minipli@googlemail.com>
> ---
>  include/linux/pci.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 5faa831..aee24a8 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1472,7 +1472,7 @@ enum pci_fixup_pass {
>  /* Anonymous variables would be nice... */
>  #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class,        \
>                                   class_shift, hook)                    \
> -       static const struct pci_fixup const __pci_fixup_##name __used   \
> +       static const struct pci_fixup __pci_fixup_##name __used         \
>         __attribute__((__section__(#section), aligned((sizeof(void *)))))    \
>                 = { vendor, device, class, class_shift, hook };
>
> --
> 1.7.10.4
>

Ping? It's janitor work, but hey, it fixes a sparse warning.

Mathias
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bjorn Helgaas - Sept. 11, 2012, 12:07 a.m.
On Sun, Sep 9, 2012 at 10:54 AM, Mathias Krause <minipli@googlemail.com> wrote:
> On Sun, Sep 2, 2012 at 11:37 PM, Mathias Krause <minipli@googlemail.com> wrote:
>> It's redundant and makes sparse complain about it.
>>
>> Signed-off-by: Mathias Krause <minipli@googlemail.com>
>> ---
>>  include/linux/pci.h |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/pci.h b/include/linux/pci.h
>> index 5faa831..aee24a8 100644
>> --- a/include/linux/pci.h
>> +++ b/include/linux/pci.h
>> @@ -1472,7 +1472,7 @@ enum pci_fixup_pass {
>>  /* Anonymous variables would be nice... */
>>  #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class,        \
>>                                   class_shift, hook)                    \
>> -       static const struct pci_fixup const __pci_fixup_##name __used   \
>> +       static const struct pci_fixup __pci_fixup_##name __used         \
>>         __attribute__((__section__(#section), aligned((sizeof(void *)))))    \
>>                 = { vendor, device, class, class_shift, hook };
>>
>> --
>> 1.7.10.4
>>
>
> Ping? It's janitor work, but hey, it fixes a sparse warning.

Yep, it's worth doing; I'm just slow.  I applied it to my
"pci/trivial" branch.  Thanks!

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 5faa831..aee24a8 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1472,7 +1472,7 @@  enum pci_fixup_pass {
 /* Anonymous variables would be nice... */
 #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class,	\
 				  class_shift, hook)			\
-	static const struct pci_fixup const __pci_fixup_##name __used	\
+	static const struct pci_fixup __pci_fixup_##name __used		\
 	__attribute__((__section__(#section), aligned((sizeof(void *)))))    \
 		= { vendor, device, class, class_shift, hook };