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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[+cc Ingo]

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

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@xxxxxxxxx

> [robh: add commit msg]
> Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
> [lorenzo.pieralisi@xxxxxxx: reworked the commit log]
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
> ---
>  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
> 



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux