linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: Add const type for comparison function parameter
@ 2021-05-28 17:02 Kai-Heng Feng
  2021-05-28 19:19 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Kai-Heng Feng @ 2021-05-28 17:02 UTC (permalink / raw)
  To: bhelgaas
  Cc: Kai-Heng Feng, kernel test robot, open list:PCI SUBSYSTEM, open list

Commit 4f0f586bf0c8 ("treewide: Change list_sort to use const pointers")
added const on parameter "struct list_head *".

So add const to match the type.

Fixes: 276b15de5287 ("PCI: Coalesce host bridge contiguous apertures")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/pci/probe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index bf58e5dd1d82..bd862b612633 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -875,7 +875,8 @@ static void pci_set_bus_msi_domain(struct pci_bus *bus)
 	dev_set_msi_domain(&bus->dev, d);
 }
 
-static int res_cmp(void *priv, struct list_head *a, struct list_head *b)
+static int res_cmp(void *priv, const struct list_head *a,
+		   const struct list_head *b)
 {
 	struct resource_entry *entry1, *entry2;
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI: Add const type for comparison function parameter
  2021-05-28 17:02 [PATCH] PCI: Add const type for comparison function parameter Kai-Heng Feng
@ 2021-05-28 19:19 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2021-05-28 19:19 UTC (permalink / raw)
  To: Kai-Heng Feng
  Cc: bhelgaas, kernel test robot, open list:PCI SUBSYSTEM, open list

On Sat, May 29, 2021 at 01:02:42AM +0800, Kai-Heng Feng wrote:
> Commit 4f0f586bf0c8 ("treewide: Change list_sort to use const pointers")
> added const on parameter "struct list_head *".
> 
> So add const to match the type.
> 
> Fixes: 276b15de5287 ("PCI: Coalesce host bridge contiguous apertures")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

Squashed into "PCI: Coalesce host bridge contiguous apertures",
thanks!

> ---
>  drivers/pci/probe.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index bf58e5dd1d82..bd862b612633 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -875,7 +875,8 @@ static void pci_set_bus_msi_domain(struct pci_bus *bus)
>  	dev_set_msi_domain(&bus->dev, d);
>  }
>  
> -static int res_cmp(void *priv, struct list_head *a, struct list_head *b)
> +static int res_cmp(void *priv, const struct list_head *a,
> +		   const struct list_head *b)
>  {
>  	struct resource_entry *entry1, *entry2;
>  
> -- 
> 2.31.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-28 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 17:02 [PATCH] PCI: Add const type for comparison function parameter Kai-Heng Feng
2021-05-28 19:19 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).