lkml.org 
[lkml]   [2014]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] pci: Add include guard to include/linux/pci_ids.h
    Date
    Adding an include guard frees the preprocessor from reparsing over
    2600 #defines in the cases where pci_ids.h is somehow included more
    than once. This gives a tiny-but-measurable performance improvement
    when compiling such files.

    Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    ---
    include/linux/pci_ids.h | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
    index 7fa3173..6ed0bb7 100644
    --- a/include/linux/pci_ids.h
    +++ b/include/linux/pci_ids.h
    @@ -6,6 +6,8 @@
    * Do not add new entries to this file unless the definitions
    * are shared between multiple drivers.
    */
    +#ifndef _LINUX_PCI_IDS_H
    +#define _LINUX_PCI_IDS_H

    /* Device classes and subclasses */

    @@ -2968,3 +2970,5 @@
    #define PCI_DEVICE_ID_XEN_PLATFORM 0x0001

    #define PCI_VENDOR_ID_OCZ 0x1b85
    +
    +#endif /* _LINUX_PCI_IDS_H */
    --
    1.9.2


    \
     
     \ /
      Last update: 2014-07-10 14:41    [W:4.196 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site