public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: "Krzysztof Wilczyński" <kw@linux.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: Only declare struct pci_filp_private when HAVE_PCI_MMAP is set
Date: Mon, 14 Mar 2022 13:03:52 -0500	[thread overview]
Message-ID: <20220314180352.GA395778@bhelgaas> (raw)
In-Reply-To: <20210706003145.3054881-1-kw@linux.com>

On Tue, Jul 06, 2021 at 12:31:45AM +0000, Krzysztof Wilczyński wrote:
> At the moment, the struct pci_filp_private does not have any other users
> outside of the drivers/pci/proc.c file, and additionally its also only
> ever used (alongside all of its users) when the macro HAVE_PCI_MMAP is
> set.
> 
> Thus, enclose struct pci_filp_private in an preprocessor condition so
> that it's only declared when the HAVE_PCI_MMAP macro is set, which
> otherwise would be unused should the macro hasn't been set.
> 
> Signed-off-by: Krzysztof Wilczyński <kw@linux.com>

Applied to pci/misc for v5.18, thanks!

> ---
>  drivers/pci/proc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
> index 9bab07302bbf..3467a8e019f9 100644
> --- a/drivers/pci/proc.c
> +++ b/drivers/pci/proc.c
> @@ -187,10 +187,12 @@ static ssize_t proc_bus_pci_write(struct file *file, const char __user *buf,
>  	return nbytes;
>  }
>  
> +#ifdef HAVE_PCI_MMAP
>  struct pci_filp_private {
>  	enum pci_mmap_state mmap_state;
>  	int write_combine;
>  };
> +#endif /* HAVE_PCI_MMAP */
>  
>  static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
>  			       unsigned long arg)
> -- 
> 2.32.0
> 

      reply	other threads:[~2022-03-14 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06  0:31 [PATCH] PCI: Only declare struct pci_filp_private when HAVE_PCI_MMAP is set Krzysztof Wilczyński
2022-03-14 18:03 ` Bjorn Helgaas [this message]

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=20220314180352.GA395778@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox