Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>, linux-pci@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH] PCI: Update pci_find_capability() stub return values
Date: Wed, 27 Mar 2024 14:49:34 -0700	[thread overview]
Message-ID: <a144b96b-6ec4-4a62-b2ab-1ed631d81544@linux.intel.com> (raw)
In-Reply-To: <20240327180234.1529164-1-helgaas@kernel.org>


On 3/27/24 11:02 AM, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> f646c2a0a668 ("PCI: Return u8 from pci_find_capability() and similar") and
> ee8b1c478a9f ("PCI: Return u16 from pci_find_ext_capability() and similar")
> updated the return type of the extern declarations, but neglected to update
> the type of the stubs used CONFIG_PCI is not enabled.
>
> Update them to match the extern declarations.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---

This change looks fine to me.

Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>

But the callers of these functions still seems to use int declaration to store
the output. Any reason for not changing them? Like the usages in
drivers/pci/pci.c?

>  include/linux/pci.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index b19992a5dfaf..6a09bd9636d5 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -2011,10 +2011,9 @@ static inline int pci_register_driver(struct pci_driver *drv)
>  static inline void pci_unregister_driver(struct pci_driver *drv) { }
>  static inline u8 pci_find_capability(struct pci_dev *dev, int cap)
>  { return 0; }
> -static inline int pci_find_next_capability(struct pci_dev *dev, u8 post,
> -					   int cap)
> +static inline u8 pci_find_next_capability(struct pci_dev *dev, u8 post, int cap)
>  { return 0; }
> -static inline int pci_find_ext_capability(struct pci_dev *dev, int cap)
> +static inline u16 pci_find_ext_capability(struct pci_dev *dev, int cap)
>  { return 0; }
>  
>  static inline u64 pci_get_dsn(struct pci_dev *dev)

-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer


  parent reply	other threads:[~2024-03-27 21:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 18:02 [PATCH] PCI: Update pci_find_capability() stub return values Bjorn Helgaas
2024-03-27 18:12 ` Bjorn Helgaas
2024-03-27 21:49 ` Kuppuswamy Sathyanarayanan [this message]
2024-03-28 16:18   ` Bjorn Helgaas
2024-03-28 22:36     ` Kuppuswamy Sathyanarayanan

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=a144b96b-6ec4-4a62-b2ab-1ed631d81544@linux.intel.com \
    --to=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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