diff mbox

[v2,04/10] PCI: kirin: struct kirin_pcie_driver can be static

Message ID 20180321144254.7406-5-lorenzo.pieralisi@arm.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Lorenzo Pieralisi March 21, 2018, 2:42 p.m. UTC
From: Fengguang Wu <fengguang.wu@intel.com>

This was generated from 0-day builder.

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
[robh: add commit msg]
Signed-off-by: Rob Herring <robh@kernel.org>
[lorenzo.pieralisi@arm.com: reworked the commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
 drivers/pci/dwc/pcie-kirin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bjorn Helgaas March 27, 2018, 5:44 p.m. UTC | #1
[+cc Ingo]

On Wed, Mar 21, 2018 at 02:42:48PM +0000, Lorenzo Pieralisi wrote:
> From: Fengguang Wu <fengguang.wu@intel.com>
> 
> This was generated from 0-day builder.
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Hi Fengguang,

These patches to make things static are awesome :)

There might be a small way to make them even better: change the title
from "struct xxx can be static" to "Make struct xxx static" so it
starts with a capitalized verb and tells what the patch does (not just
what is possible).

This is based on Ingo's suggestions about changelogs [1].

It might be just my personal preference, but I also like to see a
non-empty changelog, even for trivial patches like this, because the
title and the body serve separate semantic purposes and neither should
be empty even if they are both the same.  E.g.,

  PCI: kirin: Make struct kirin_pcie_driver static

  Struct kirin_pcie_driver is only referenced inside pcie-kirin.c, so
  make it static.

  Signed-off-by: ...

[1] http://lkml.kernel.org/r/20120711080446.GA17713@gmail.com

> [robh: add commit msg]
> Signed-off-by: Rob Herring <robh@kernel.org>
> [lorenzo.pieralisi@arm.com: reworked the commit log]
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> ---
>  drivers/pci/dwc/pcie-kirin.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/dwc/pcie-kirin.c b/drivers/pci/dwc/pcie-kirin.c
> index dcc8cedf6e17..a6b88c7f6e3e 100644
> --- a/drivers/pci/dwc/pcie-kirin.c
> +++ b/drivers/pci/dwc/pcie-kirin.c
> @@ -504,7 +504,7 @@ static const struct of_device_id kirin_pcie_match[] = {
>  	{},
>  };
>  
> -struct platform_driver kirin_pcie_driver = {
> +static struct platform_driver kirin_pcie_driver = {
>  	.probe			= kirin_pcie_probe,
>  	.driver			= {
>  		.name			= "kirin-pcie",
> -- 
> 2.15.0
>
diff mbox

Patch

diff --git a/drivers/pci/dwc/pcie-kirin.c b/drivers/pci/dwc/pcie-kirin.c
index dcc8cedf6e17..a6b88c7f6e3e 100644
--- a/drivers/pci/dwc/pcie-kirin.c
+++ b/drivers/pci/dwc/pcie-kirin.c
@@ -504,7 +504,7 @@  static const struct of_device_id kirin_pcie_match[] = {
 	{},
 };
 
-struct platform_driver kirin_pcie_driver = {
+static struct platform_driver kirin_pcie_driver = {
 	.probe			= kirin_pcie_probe,
 	.driver			= {
 		.name			= "kirin-pcie",