All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pci: Add include guard to include/linux/pci_ids.h
Date: Thu, 10 Jul 2014 16:02:33 -0600	[thread overview]
Message-ID: <20140710220233.GA21053@google.com> (raw)
In-Reply-To: <1404993911-10544-1-git-send-email-linux@rasmusvillemoes.dk>

On Thu, Jul 10, 2014 at 02:05:11PM +0200, Rasmus Villemoes wrote:
> 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>

Applied to pci/misc for v3.17, thanks!

> ---
>  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
> 

  reply	other threads:[~2014-07-10 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 12:05 [PATCH] pci: Add include guard to include/linux/pci_ids.h Rasmus Villemoes
2014-07-10 22:02 ` Bjorn Helgaas [this message]
2014-07-12 12:09   ` Rasmus Villemoes
2014-07-12 17:31     ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140710220233.GA21053@google.com \
    --to=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.