All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Jui <rjui@broadcom.com>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Arnd Bergmann <arnd@arndb.de>, Hauke Mehrtens <hauke@hauke-m.de>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Dmitry Torokhov <dtor@google.com>,
	Anatol Pomazau <anatol@google.com>,
	Scott Branden <sbranden@broadcom.com>,
	<linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<bcm-kernel-feedback-list@broadcom.com>,
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] pci: iproc: Add Broadcom iProc PCIe support
Date: Fri, 6 Mar 2015 09:26:05 -0800	[thread overview]
Message-ID: <54F9E32D.4090005@broadcom.com> (raw)
In-Reply-To: <1425639640.24292.271.camel@x220>

Hi Paul,

On 3/6/2015 3:00 AM, Paul Bolle wrote:
> On Thu, 2015-03-05 at 17:01 -0800, Ray Jui wrote:
>> --- a/drivers/pci/host/Kconfig
>> +++ b/drivers/pci/host/Kconfig
>> @@ -106,4 +106,21 @@ config PCI_VERSATILE
>>  	bool "ARM Versatile PB PCI controller"
>>  	depends on ARCH_VERSATILE
>>  
>> +config PCIE_IPROC
>> +	bool "Broadcom iProc PCIe controller"
> 
> bool symbol.
> 
>> +	help
>> +	  This enables the iProc PCIe core controller support for Broadcom's
>> +	  iProc family of SoCs. An appropriate bus interface driver also needs
>> +	  to be enabled
>> +
>> +config PCIE_IPROC_PLTFM
>> +	bool "Broadcom iProc PCIe platform bus driver"
> 
> Another bool symbol.
> 
>> +	depends on ARCH_BCM_IPROC || COMPILE_TEST
>> +	depends on OF
>> +	select PCIE_IPROC
>> +	default ARCH_BCM_IPROC
>> +	help
>> +	  Say Y here if you want to use the Broadcom iProc PCIe controller
>> +	  through the generic platform bus interface
>> +
>>  endmenu
> 
>> --- a/drivers/pci/host/Makefile
>> +++ b/drivers/pci/host/Makefile
> 
>> +obj-$(CONFIG_PCIE_IPROC) += pcie-iproc.o
>> +obj-$(CONFIG_PCIE_IPROC_PLTFM) += pcie-iproc-pltfm.o
> 
> Both objectfiles will never be part of a module.
> 
>> --- /dev/null
>> +++ b/drivers/pci/host/pcie-iproc-pltfm.c
> 
>> +#include <linux/module.h>
> 
> Is this needed?
> 
>> +MODULE_DEVICE_TABLE(of, iproc_pcie_of_match_table);
> 
> This macro will be preprocessed away, won't it?
> 
>> +static struct platform_driver iproc_pcie_pltfm_driver = {
>> +	.driver = {
>> +		.name = "iproc-pcie",
>> +		.of_match_table = of_match_ptr(iproc_pcie_of_match_table),
>> +		.suppress_bind_attrs = true,
>> +	},
>> +	.probe = iproc_pcie_pltfm_probe,
>> +};
>> +module_platform_driver(iproc_pcie_pltfm_driver);
> 
> Perhaps it's clearer to have make this a call to
> platform_driver_register(), put that in a wrapper function, and invoke
> that wrapper function through device_initcall() or similar. I haven't
> actually tested that, so the details could be off.
> 
>> +MODULE_AUTHOR("Ray Jui <rjui@broadcom.com>");
>> +MODULE_DESCRIPTION("Broadcom iPROC PCIe platform driver");
>> +MODULE_LICENSE("GPL v2");
> 
> And these three macros will, effectively, be preprocessed away.
> 
>> --- /dev/null
>> +++ b/drivers/pci/host/pcie-iproc.c
> 
>> +#include <linux/module.h>
> 
> See above.
> 
>> +MODULE_AUTHOR("Ray Jui <rjui@broadcom.com>");
>> +MODULE_DESCRIPTION("Broadcom iPROC PCIe common driver");
>> +MODULE_LICENSE("GPL v2");
> 
> Ditto.
> 
> 
> Paul Bolle
> 

So every single PCIe host driver under drivers/pci/host/* has their
config flag of "bool" type, and all of them except pci-keystone-dw.c
have these MODULE based macros in their driver. While I agree with you
that these macros will preprocessed away while compiled as statically
linked in, I thought it's a convention to have these macros in the
driver. At least it provides information on the author, driver
description, and license (although one can also argue you can find all
of those info from the maintainer list, Kconfig, and license header).

Would you be able to sort this out with a developer or subsystem
maintainer who is familiar with this matter and let us know what is the
convention for MODULE macros usage in a driver when its config flag is
set to "bool" instead of "tristate"?

Thanks,

Ray

WARNING: multiple messages have this Message-ID (diff)
From: Ray Jui <rjui@broadcom.com>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Arnd Bergmann <arnd@arndb.de>, Hauke Mehrtens <hauke@hauke-m.de>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Dmitry Torokhov <dtor@google.com>,
	Anatol Pomazau <anatol@google.com>,
	Scott Branden <sbranden@broadcom.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	bcm-kernel-feedback-list@broadcom.com,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v3 2/3] pci: iproc: Add Broadcom iProc PCIe support
Date: Fri, 6 Mar 2015 09:26:05 -0800	[thread overview]
Message-ID: <54F9E32D.4090005@broadcom.com> (raw)
In-Reply-To: <1425639640.24292.271.camel@x220>

Hi Paul,

On 3/6/2015 3:00 AM, Paul Bolle wrote:
> On Thu, 2015-03-05 at 17:01 -0800, Ray Jui wrote:
>> --- a/drivers/pci/host/Kconfig
>> +++ b/drivers/pci/host/Kconfig
>> @@ -106,4 +106,21 @@ config PCI_VERSATILE
>>  	bool "ARM Versatile PB PCI controller"
>>  	depends on ARCH_VERSATILE
>>  
>> +config PCIE_IPROC
>> +	bool "Broadcom iProc PCIe controller"
> 
> bool symbol.
> 
>> +	help
>> +	  This enables the iProc PCIe core controller support for Broadcom's
>> +	  iProc family of SoCs. An appropriate bus interface driver also needs
>> +	  to be enabled
>> +
>> +config PCIE_IPROC_PLTFM
>> +	bool "Broadcom iProc PCIe platform bus driver"
> 
> Another bool symbol.
> 
>> +	depends on ARCH_BCM_IPROC || COMPILE_TEST
>> +	depends on OF
>> +	select PCIE_IPROC
>> +	default ARCH_BCM_IPROC
>> +	help
>> +	  Say Y here if you want to use the Broadcom iProc PCIe controller
>> +	  through the generic platform bus interface
>> +
>>  endmenu
> 
>> --- a/drivers/pci/host/Makefile
>> +++ b/drivers/pci/host/Makefile
> 
>> +obj-$(CONFIG_PCIE_IPROC) += pcie-iproc.o
>> +obj-$(CONFIG_PCIE_IPROC_PLTFM) += pcie-iproc-pltfm.o
> 
> Both objectfiles will never be part of a module.
> 
>> --- /dev/null
>> +++ b/drivers/pci/host/pcie-iproc-pltfm.c
> 
>> +#include <linux/module.h>
> 
> Is this needed?
> 
>> +MODULE_DEVICE_TABLE(of, iproc_pcie_of_match_table);
> 
> This macro will be preprocessed away, won't it?
> 
>> +static struct platform_driver iproc_pcie_pltfm_driver = {
>> +	.driver = {
>> +		.name = "iproc-pcie",
>> +		.of_match_table = of_match_ptr(iproc_pcie_of_match_table),
>> +		.suppress_bind_attrs = true,
>> +	},
>> +	.probe = iproc_pcie_pltfm_probe,
>> +};
>> +module_platform_driver(iproc_pcie_pltfm_driver);
> 
> Perhaps it's clearer to have make this a call to
> platform_driver_register(), put that in a wrapper function, and invoke
> that wrapper function through device_initcall() or similar. I haven't
> actually tested that, so the details could be off.
> 
>> +MODULE_AUTHOR("Ray Jui <rjui@broadcom.com>");
>> +MODULE_DESCRIPTION("Broadcom iPROC PCIe platform driver");
>> +MODULE_LICENSE("GPL v2");
> 
> And these three macros will, effectively, be preprocessed away.
> 
>> --- /dev/null
>> +++ b/drivers/pci/host/pcie-iproc.c
> 
>> +#include <linux/module.h>
> 
> See above.
> 
>> +MODULE_AUTHOR("Ray Jui <rjui@broadcom.com>");
>> +MODULE_DESCRIPTION("Broadcom iPROC PCIe common driver");
>> +MODULE_LICENSE("GPL v2");
> 
> Ditto.
> 
> 
> Paul Bolle
> 

So every single PCIe host driver under drivers/pci/host/* has their
config flag of "bool" type, and all of them except pci-keystone-dw.c
have these MODULE based macros in their driver. While I agree with you
that these macros will preprocessed away while compiled as statically
linked in, I thought it's a convention to have these macros in the
driver. At least it provides information on the author, driver
description, and license (although one can also argue you can find all
of those info from the maintainer list, Kconfig, and license header).

Would you be able to sort this out with a developer or subsystem
maintainer who is familiar with this matter and let us know what is the
convention for MODULE macros usage in a driver when its config flag is
set to "bool" instead of "tristate"?

Thanks,

Ray

WARNING: multiple messages have this Message-ID (diff)
From: rjui@broadcom.com (Ray Jui)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/3] pci: iproc: Add Broadcom iProc PCIe support
Date: Fri, 6 Mar 2015 09:26:05 -0800	[thread overview]
Message-ID: <54F9E32D.4090005@broadcom.com> (raw)
In-Reply-To: <1425639640.24292.271.camel@x220>

Hi Paul,

On 3/6/2015 3:00 AM, Paul Bolle wrote:
> On Thu, 2015-03-05 at 17:01 -0800, Ray Jui wrote:
>> --- a/drivers/pci/host/Kconfig
>> +++ b/drivers/pci/host/Kconfig
>> @@ -106,4 +106,21 @@ config PCI_VERSATILE
>>  	bool "ARM Versatile PB PCI controller"
>>  	depends on ARCH_VERSATILE
>>  
>> +config PCIE_IPROC
>> +	bool "Broadcom iProc PCIe controller"
> 
> bool symbol.
> 
>> +	help
>> +	  This enables the iProc PCIe core controller support for Broadcom's
>> +	  iProc family of SoCs. An appropriate bus interface driver also needs
>> +	  to be enabled
>> +
>> +config PCIE_IPROC_PLTFM
>> +	bool "Broadcom iProc PCIe platform bus driver"
> 
> Another bool symbol.
> 
>> +	depends on ARCH_BCM_IPROC || COMPILE_TEST
>> +	depends on OF
>> +	select PCIE_IPROC
>> +	default ARCH_BCM_IPROC
>> +	help
>> +	  Say Y here if you want to use the Broadcom iProc PCIe controller
>> +	  through the generic platform bus interface
>> +
>>  endmenu
> 
>> --- a/drivers/pci/host/Makefile
>> +++ b/drivers/pci/host/Makefile
> 
>> +obj-$(CONFIG_PCIE_IPROC) += pcie-iproc.o
>> +obj-$(CONFIG_PCIE_IPROC_PLTFM) += pcie-iproc-pltfm.o
> 
> Both objectfiles will never be part of a module.
> 
>> --- /dev/null
>> +++ b/drivers/pci/host/pcie-iproc-pltfm.c
> 
>> +#include <linux/module.h>
> 
> Is this needed?
> 
>> +MODULE_DEVICE_TABLE(of, iproc_pcie_of_match_table);
> 
> This macro will be preprocessed away, won't it?
> 
>> +static struct platform_driver iproc_pcie_pltfm_driver = {
>> +	.driver = {
>> +		.name = "iproc-pcie",
>> +		.of_match_table = of_match_ptr(iproc_pcie_of_match_table),
>> +		.suppress_bind_attrs = true,
>> +	},
>> +	.probe = iproc_pcie_pltfm_probe,
>> +};
>> +module_platform_driver(iproc_pcie_pltfm_driver);
> 
> Perhaps it's clearer to have make this a call to
> platform_driver_register(), put that in a wrapper function, and invoke
> that wrapper function through device_initcall() or similar. I haven't
> actually tested that, so the details could be off.
> 
>> +MODULE_AUTHOR("Ray Jui <rjui@broadcom.com>");
>> +MODULE_DESCRIPTION("Broadcom iPROC PCIe platform driver");
>> +MODULE_LICENSE("GPL v2");
> 
> And these three macros will, effectively, be preprocessed away.
> 
>> --- /dev/null
>> +++ b/drivers/pci/host/pcie-iproc.c
> 
>> +#include <linux/module.h>
> 
> See above.
> 
>> +MODULE_AUTHOR("Ray Jui <rjui@broadcom.com>");
>> +MODULE_DESCRIPTION("Broadcom iPROC PCIe common driver");
>> +MODULE_LICENSE("GPL v2");
> 
> Ditto.
> 
> 
> Paul Bolle
> 

So every single PCIe host driver under drivers/pci/host/* has their
config flag of "bool" type, and all of them except pci-keystone-dw.c
have these MODULE based macros in their driver. While I agree with you
that these macros will preprocessed away while compiled as statically
linked in, I thought it's a convention to have these macros in the
driver. At least it provides information on the author, driver
description, and license (although one can also argue you can find all
of those info from the maintainer list, Kconfig, and license header).

Would you be able to sort this out with a developer or subsystem
maintainer who is familiar with this matter and let us know what is the
convention for MODULE macros usage in a driver when its config flag is
set to "bool" instead of "tristate"?

Thanks,

Ray

  reply	other threads:[~2015-03-06 17:26 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-06  1:01 [PATCH v3 0/3] pci: iproc: Add Broadcom iProc PCIe support Ray Jui
2015-03-06  1:01 ` Ray Jui
2015-03-06  1:01 ` Ray Jui
2015-03-06  1:01 ` [PATCH v3 1/3] pci: iProc: define iProc PCIe platform bus binding Ray Jui
2015-03-06  1:01   ` Ray Jui
2015-03-06  1:01   ` Ray Jui
2015-03-06  1:01 ` [PATCH v3 2/3] pci: iproc: Add Broadcom iProc PCIe support Ray Jui
2015-03-06  1:01   ` Ray Jui
2015-03-06  1:01   ` Ray Jui
2015-03-06 11:00   ` Paul Bolle
2015-03-06 11:00     ` Paul Bolle
2015-03-06 11:00     ` Paul Bolle
2015-03-06 17:26     ` Ray Jui [this message]
2015-03-06 17:26       ` Ray Jui
2015-03-06 17:26       ` Ray Jui
2015-03-06 17:35       ` Dmitry Torokhov
2015-03-06 17:35         ` Dmitry Torokhov
2015-03-06 18:00         ` Ray Jui
2015-03-06 18:00           ` Ray Jui
2015-03-06 18:00           ` Ray Jui
2015-03-09 12:35           ` Arnd Bergmann
2015-03-09 12:35             ` Arnd Bergmann
2015-03-09 12:35             ` Arnd Bergmann
2015-03-09 23:45             ` Ray Jui
2015-03-09 23:45               ` Ray Jui
2015-03-09 23:45               ` Ray Jui
2015-03-06  1:01 ` [PATCH v3 3/3] ARM: dts: enable PCIe support for Cygnus Ray Jui
2015-03-06  1:01   ` Ray Jui
2015-03-06  1:01   ` Ray Jui

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=54F9E32D.4090005@broadcom.com \
    --to=rjui@broadcom.com \
    --cc=anatol@google.com \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dtor@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    --cc=sbranden@broadcom.com \
    /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.