dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] PCI: Add dummy implement for pci_clear_master() function
@ 2023-05-31 10:27 Sui Jingfeng
  0 siblings, 0 replies; 4+ messages in thread
From: Sui Jingfeng @ 2023-05-31 10:27 UTC (permalink / raw)
  To: Bjorn Helgaas, Matthew Wilcox, Ben Hutchings, Jesse Barnes
  Cc: kernel test robot, Li Yi, linux-kernel, dri-devel,
	loongson-kernel, Geert Uytterhoeven, linux-pci

As some arch(m68k for example) doesn't have config_pci enabled, drivers[1]
call pci_clear_master() without config_pci guard can not pass compile test.

   drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c:
   In function 'etnaviv_gpu_pci_fini':
>> drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c:32:9:
   error: implicit declaration of function 'pci_clear_master';
   did you mean 'pci_set_master'? [-Werror=implicit-function-declaration]
      32 |         pci_clear_master(pdev);
         |         ^~~~~~~~~~~~~~~~
         |         pci_set_master
   cc1: some warnings being treated as errors

[1] https://patchwork.freedesktop.org/patch/539977/?series=118522&rev=1

V2:
	* Adjust commit log style to meet the convention and add Fixes tag

Fixes: 6a479079c072 ("PCI: Add pci_clear_master() as opposite of pci_set_master()")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202305301659.4guSLavL-lkp@intel.com/
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
---
 include/linux/pci.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index d0c19ff0c958..71c85380676c 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1904,6 +1904,7 @@ static inline int pci_dev_present(const struct pci_device_id *ids)
 #define pci_dev_put(dev)	do { } while (0)
 
 static inline void pci_set_master(struct pci_dev *dev) { }
+static inline void pci_clear_master(struct pci_dev *dev) { }
 static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; }
 static inline void pci_disable_device(struct pci_dev *dev) { }
 static inline int pcim_enable_device(struct pci_dev *pdev) { return -EIO; }
-- 
2.25.1


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

* Re: [PATCH v2] PCI: Add dummy implement for pci_clear_master() function
       [not found] <459cf0c7-4111-6e76-8124-da1a10666f50@189.cn>
@ 2023-06-20 11:06 ` Bjorn Helgaas
  2023-06-20 11:37   ` Sui Jingfeng
  2023-06-20 11:52   ` Bjorn Helgaas
  0 siblings, 2 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2023-06-20 11:06 UTC (permalink / raw)
  To: Sui Jingfeng
  Cc: kernel test robot, Li Yi, dri-devel, linux-kernel, Jesse Barnes,
	loongson-kernel, Ben Hutchings, Geert Uytterhoeven,
	Matthew Wilcox, linux-pci, Bjorn Helgaas

On Tue, Jun 20, 2023 at 12:04:40PM +0800, Sui Jingfeng wrote:
> Where is the formal(unstream) PCI git branch where we could see the latest
> patch ?

Here's the "misc" branch: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=misc

And here's the "next" branch that will be merged for v6.5, which
includes "misc" and other things: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=next

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

* Re: [PATCH v2] PCI: Add dummy implement for pci_clear_master() function
  2023-06-20 11:06 ` [PATCH v2] PCI: Add dummy implement for pci_clear_master() function Bjorn Helgaas
@ 2023-06-20 11:37   ` Sui Jingfeng
  2023-06-20 11:52   ` Bjorn Helgaas
  1 sibling, 0 replies; 4+ messages in thread
From: Sui Jingfeng @ 2023-06-20 11:37 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: kernel test robot, Li Yi, dri-devel, linux-kernel, Jesse Barnes,
	loongson-kernel, Ben Hutchings, Geert Uytterhoeven,
	Matthew Wilcox, linux-pci, Bjorn Helgaas

Hi,

On 2023/6/20 19:06, Bjorn Helgaas wrote:
> On Tue, Jun 20, 2023 at 12:04:40PM +0800, Sui Jingfeng wrote:
>> Where is the formal(unstream) PCI git branch where we could see the latest
>> patch ?
> Here's the "misc" branch: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=misc
>
> And here's the "next" branch that will be merged for v6.5, which
> includes "misc" and other things: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=next


Thanks for you kindness reply and guidance, now I know that.


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

* Re: [PATCH v2] PCI: Add dummy implement for pci_clear_master() function
  2023-06-20 11:06 ` [PATCH v2] PCI: Add dummy implement for pci_clear_master() function Bjorn Helgaas
  2023-06-20 11:37   ` Sui Jingfeng
@ 2023-06-20 11:52   ` Bjorn Helgaas
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2023-06-20 11:52 UTC (permalink / raw)
  To: Sui Jingfeng
  Cc: kernel test robot, Li Yi, dri-devel, linux-kernel, Jesse Barnes,
	loongson-kernel, Ben Hutchings, Geert Uytterhoeven,
	Matthew Wilcox, linux-pci, Bjorn Helgaas

On Tue, Jun 20, 2023 at 06:06:00AM -0500, Bjorn Helgaas wrote:
> On Tue, Jun 20, 2023 at 12:04:40PM +0800, Sui Jingfeng wrote:
> > Where is the formal(unstream) PCI git branch where we could see the latest
> > patch ?
> 
> Here's the "misc" branch: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=misc
> 
> And here's the "next" branch that will be merged for v6.5, which
> includes "misc" and other things: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=next

I forgot to mention: in case you need to find other git branches, most
subsystems list this in the MAINTAINERS file, e.g.,

  PCI SUBSYSTEM
  ...
  T:      git git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git


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

end of thread, other threads:[~2023-06-20 11:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <459cf0c7-4111-6e76-8124-da1a10666f50@189.cn>
2023-06-20 11:06 ` [PATCH v2] PCI: Add dummy implement for pci_clear_master() function Bjorn Helgaas
2023-06-20 11:37   ` Sui Jingfeng
2023-06-20 11:52   ` Bjorn Helgaas
2023-05-31 10:27 Sui Jingfeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox