Re: [PATCH] ata: Drop commas after OF match table sentinels

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

 



On 2022/03/02 10:30, Geert Uytterhoeven wrote:
> It does not make sense to have a comma after a sentinel, as any new
> elements must be added before the sentinel.
> 
> Add comments to clarify the purpose of the empty elements.

Some nits below.

> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
>  drivers/ata/ahci_brcm.c        | 2 +-
>  drivers/ata/ahci_ceva.c        | 2 +-
>  drivers/ata/ahci_da850.c       | 2 +-
>  drivers/ata/ahci_dm816.c       | 2 +-
>  drivers/ata/ahci_imx.c         | 2 +-
>  drivers/ata/ahci_mtk.c         | 2 +-
>  drivers/ata/ahci_mvebu.c       | 2 +-
>  drivers/ata/ahci_octeon.c      | 2 +-
>  drivers/ata/ahci_platform.c    | 2 +-
>  drivers/ata/ahci_qoriq.c       | 2 +-
>  drivers/ata/ahci_st.c          | 2 +-
>  drivers/ata/ahci_sunxi.c       | 2 +-
>  drivers/ata/ahci_xgene.c       | 2 +-
>  drivers/ata/pata_ftide010.c    | 2 +-
>  drivers/ata/pata_ixp4xx_cf.c   | 2 +-
>  drivers/ata/pata_macio.c       | 2 +-
>  drivers/ata/pata_mpc52xx.c     | 2 +-
>  drivers/ata/pata_octeon_cf.c   | 2 +-
>  drivers/ata/pata_of_platform.c | 2 +-
>  drivers/ata/sata_fsl.c         | 2 +-
>  drivers/ata/sata_gemini.c      | 2 +-
>  drivers/ata/sata_highbank.c    | 2 +-
>  drivers/ata/sata_mv.c          | 2 +-
>  drivers/ata/sata_rcar.c        | 2 +-
>  24 files changed, 24 insertions(+), 24 deletions(-)

[...]

> diff --git a/drivers/ata/pata_ftide010.c b/drivers/ata/pata_ftide010.c
> index 34cb104f6b43e5cf..2a92797b5e11a9aa 100644
> --- a/drivers/ata/pata_ftide010.c
> +++ b/drivers/ata/pata_ftide010.c
> @@ -557,7 +557,7 @@ static const struct of_device_id pata_ftide010_of_match[] = {
>  	{
>  		.compatible = "faraday,ftide010",
>  	},

While at it, could you rewrap this one to a single line to have a consistent style ?

> -	{},
> +	{ /* sentinel */ }
>  };
>  
>  static struct platform_driver pata_ftide010_driver = {
> diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
> index 17b557c91e1c78fc..e225913a619d8414 100644
> --- a/drivers/ata/pata_ixp4xx_cf.c
> +++ b/drivers/ata/pata_ixp4xx_cf.c
> @@ -293,7 +293,7 @@ static int ixp4xx_pata_probe(struct platform_device *pdev)
>  
>  static const struct of_device_id ixp4xx_pata_of_match[] = {
>  	{ .compatible = "intel,ixp4xx-compact-flash", },
> -	{ },
> +	{ /* sentinel */ }
>  };
>  
>  static struct platform_driver ixp4xx_pata_platform_driver = {
> diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
> index 16e8aa184a75793f..8cf778723fd6d049 100644
> --- a/drivers/ata/pata_macio.c
> +++ b/drivers/ata/pata_macio.c
> @@ -1345,7 +1345,7 @@ static const struct of_device_id pata_macio_match[] =
>  	{
>  	.type		= "ata",
>  	},

Here too.

> -	{},
> +	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, pata_macio_match);
>  
> diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
> index f1d352d5f128537a..bc9d9df3b5aced64 100644
> --- a/drivers/ata/pata_mpc52xx.c
> +++ b/drivers/ata/pata_mpc52xx.c
> @@ -849,7 +849,7 @@ mpc52xx_ata_resume(struct platform_device *op)
>  static const struct of_device_id mpc52xx_ata_of_match[] = {
>  	{ .compatible = "fsl,mpc5200-ata", },
>  	{ .compatible = "mpc5200-ata", },
> -	{},
> +	{ /* sentinel */ }
>  };
>  
>  
> diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
> index 05c2ab3757568c62..bdaec863171a14cf 100644
> --- a/drivers/ata/pata_octeon_cf.c
> +++ b/drivers/ata/pata_octeon_cf.c
> @@ -1009,7 +1009,7 @@ static const struct of_device_id octeon_cf_match[] = {
>  	{
>  		.compatible = "cavium,ebt3000-compact-flash",
>  	},

And here as well.

> -	{},
> +	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, octeon_cf_match);
>  
> diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
> index c3a40b717dcdcc2a..ac5a633c00a57ac1 100644
> --- a/drivers/ata/pata_of_platform.c
> +++ b/drivers/ata/pata_of_platform.c
> @@ -79,7 +79,7 @@ static int pata_of_platform_probe(struct platform_device *ofdev)
>  
>  static const struct of_device_id pata_of_platform_match[] = {
>  	{ .compatible = "ata-generic", },
> -	{ },
> +	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, pata_of_platform_match);
>  
> diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
> index 556034a15430461f..11867a7eb4691771 100644
> --- a/drivers/ata/sata_fsl.c
> +++ b/drivers/ata/sata_fsl.c
> @@ -1583,7 +1583,7 @@ static const struct of_device_id fsl_sata_match[] = {
>  	{
>  		.compatible = "fsl,pq-sata-v2",
>  	},

Same.

> -	{},
> +	{ /* sentinel */ }
>  };
>  
>  MODULE_DEVICE_TABLE(of, fsl_sata_match);
> diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c
> index 440a63de20d01a07..c7e9efc0025f1a91 100644
> --- a/drivers/ata/sata_gemini.c
> +++ b/drivers/ata/sata_gemini.c
> @@ -422,7 +422,7 @@ static const struct of_device_id gemini_sata_of_match[] = {
>  	{
>  		.compatible = "cortina,gemini-sata-bridge",
>  	},

Another...

> -	{},
> +	{ /* sentinel */ }
>  };
>  
>  static struct platform_driver gemini_sata_driver = {
> diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
> index b29d3f1d64b03317..cd375e4df9644e33 100644
> --- a/drivers/ata/sata_highbank.c
> +++ b/drivers/ata/sata_highbank.c
> @@ -444,7 +444,7 @@ static struct scsi_host_template ahci_highbank_platform_sht = {
>  
>  static const struct of_device_id ahci_of_match[] = {
>  	{ .compatible = "calxeda,hb-ahci" },
> -	{},
> +	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, ahci_of_match);
>  
> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
> index 53446b997740d5fd..13d92b71e6659cda 100644
> --- a/drivers/ata/sata_mv.c
> +++ b/drivers/ata/sata_mv.c
> @@ -4277,7 +4277,7 @@ static int mv_platform_resume(struct platform_device *pdev)
>  static const struct of_device_id mv_sata_dt_ids[] = {
>  	{ .compatible = "marvell,armada-370-sata", },
>  	{ .compatible = "marvell,orion-sata", },
> -	{},
> +	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, mv_sata_dt_ids);
>  #endif
> diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
> index 3d96b6faa3f0e1c6..1483d3efeb7e220e 100644
> --- a/drivers/ata/sata_rcar.c
> +++ b/drivers/ata/sata_rcar.c
> @@ -857,7 +857,7 @@ static const struct of_device_id sata_rcar_match[] = {
>  		.compatible = "renesas,rcar-gen3-sata",
>  		.data = (void *)RCAR_GEN3_SATA
>  	},
> -	{ },
> +	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, sata_rcar_match);
>  


-- 
Damien Le Moal
Western Digital Research



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux