Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457593 > unrolled thread

Re: [Patch v3 06/11] driver/edac/fsl_ddr: Rename macros and names

Started byBorislav Petkov <bp@alien8.de>
First post2016-08-08 09:50 +0200
Last post2016-08-08 17:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [Patch v3 06/11] driver/edac/fsl_ddr: Rename macros and names Borislav Petkov <bp@alien8.de> - 2016-08-08 09:50 +0200
    Re: [Patch v3 06/11] driver/edac/fsl_ddr: Rename macros and names york sun <york.sun@nxp.com> - 2016-08-08 17:50 +0200

#1457593 — Re: [Patch v3 06/11] driver/edac/fsl_ddr: Rename macros and names

FromBorislav Petkov <bp@alien8.de>
Date2016-08-08 09:50 +0200
SubjectRe: [Patch v3 06/11] driver/edac/fsl_ddr: Rename macros and names
Message-ID<s3NtU-6TB-11@gated-at.bofh.it>
On Thu, Aug 04, 2016 at 03:58:31PM -0700, York Sun wrote:
> Use generic names for macros, variables and functions.
> 
> Signed-off-by: York Sun <york.sun@nxp.com>
> 
> ---
> Change log
>   v3: Absort changes from previous patch after reording
>   v2: Separated from "House cleaning" patch of v1
> 
>  drivers/edac/fsl_ddr_edac.c | 153 ++++++++++++++++++++++----------------------
>  drivers/edac/fsl_ddr_edac.h |  43 ++++++-------
>  drivers/edac/mpc85xx_edac.c |   4 +-
>  3 files changed, 98 insertions(+), 102 deletions(-)

...

> diff --git a/drivers/edac/fsl_ddr_edac.h b/drivers/edac/fsl_ddr_edac.h
> index 94c6907..556bac5 100644
> --- a/drivers/edac/fsl_ddr_edac.h
> +++ b/drivers/edac/fsl_ddr_edac.h
> @@ -12,7 +12,7 @@
>  #ifndef _FSL_DDR_EDAC_H_
>  #define _FSL_DDR_EDAC_H_
>  
> -#define mpc85xx_mc_printk(mci, level, fmt, arg...) \
> +#define fsl_ddr_mc_printk(mci, level, fmt, arg...) \
>  	edac_mc_chipset_printk(mci, level, "FSL_DDR", fmt, ##arg)
>  
>  /*
> @@ -20,26 +20,23 @@
>   */
>  
>  /* DDR_SDRAM_CFG */
> -#define MPC85XX_MC_DDR_SDRAM_CFG	0x0110
> -#define MPC85XX_MC_CS_BNDS_0		0x0000
> -#define MPC85XX_MC_CS_BNDS_1		0x0008
> -#define MPC85XX_MC_CS_BNDS_2		0x0010
> -#define MPC85XX_MC_CS_BNDS_3		0x0018
> -#define MPC85XX_MC_CS_BNDS_OFS		0x0008
> +#define MC_DDR_SDRAM_CFG	0x0110
> +#define MC_CS_BNDS_0		0x0000
> +#define MC_CS_BNDS_OFS		0x0008
>  
> -#define MPC85XX_MC_DATA_ERR_INJECT_HI	0x0e00
> -#define MPC85XX_MC_DATA_ERR_INJECT_LO	0x0e04
> -#define MPC85XX_MC_ECC_ERR_INJECT	0x0e08
> -#define MPC85XX_MC_CAPTURE_DATA_HI	0x0e20
> -#define MPC85XX_MC_CAPTURE_DATA_LO	0x0e24
> -#define MPC85XX_MC_CAPTURE_ECC		0x0e28
> -#define MPC85XX_MC_ERR_DETECT		0x0e40
> -#define MPC85XX_MC_ERR_DISABLE		0x0e44
> -#define MPC85XX_MC_ERR_INT_EN		0x0e48
> -#define MPC85XX_MC_CAPTURE_ATRIBUTES	0x0e4c
> -#define MPC85XX_MC_CAPTURE_ADDRESS	0x0e50
> -#define MPC85XX_MC_CAPTURE_EXT_ADDRESS	0x0e54
> -#define MPC85XX_MC_ERR_SBE		0x0e58
> +#define MC_DATA_ERR_INJECT_HI	0x0e00
> +#define MC_DATA_ERR_INJECT_LO	0x0e04
> +#define MC_ECC_ERR_INJECT	0x0e08
> +#define MC_CAPTURE_DATA_HI	0x0e20
> +#define MC_CAPTURE_DATA_LO	0x0e24
> +#define MC_CAPTURE_ECC		0x0e28
> +#define MC_ERR_DETECT		0x0e40
> +#define MC_ERR_DISABLE		0x0e44
> +#define MC_ERR_INT_EN		0x0e48
> +#define MC_CAPTURE_ATRIBUTES	0x0e4c
> +#define MC_CAPTURE_ADDRESS	0x0e50
> +#define MC_CAPTURE_EXT_ADDRESS	0x0e54
> +#define MC_ERR_SBE		0x0e58

You should choose one name prefix for all driver symbols and stick to
it. Either "FSL" or "LSC" for "Layerscape" or whatever but please be
consistent.

MC_ is too generic.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

[toc] | [next] | [standalone]


#1457868

Fromyork sun <york.sun@nxp.com>
Date2016-08-08 17:50 +0200
Message-ID<s3UYq-3dx-29@gated-at.bofh.it>
In reply to#1457593
On 08/08/2016 12:41 AM, Borislav Petkov wrote:
> On Thu, Aug 04, 2016 at 03:58:31PM -0700, York Sun wrote:
>> Use generic names for macros, variables and functions.
>>
>> Signed-off-by: York Sun <york.sun@nxp.com>
>>
>> ---
>> Change log
>>   v3: Absort changes from previous patch after reording
>>   v2: Separated from "House cleaning" patch of v1
>>
>>  drivers/edac/fsl_ddr_edac.c | 153 ++++++++++++++++++++++----------------------
>>  drivers/edac/fsl_ddr_edac.h |  43 ++++++-------
>>  drivers/edac/mpc85xx_edac.c |   4 +-
>>  3 files changed, 98 insertions(+), 102 deletions(-)
>
> ...
>
>> diff --git a/drivers/edac/fsl_ddr_edac.h b/drivers/edac/fsl_ddr_edac.h
>> index 94c6907..556bac5 100644
>> --- a/drivers/edac/fsl_ddr_edac.h
>> +++ b/drivers/edac/fsl_ddr_edac.h
>> @@ -12,7 +12,7 @@
>>  #ifndef _FSL_DDR_EDAC_H_
>>  #define _FSL_DDR_EDAC_H_
>>
>> -#define mpc85xx_mc_printk(mci, level, fmt, arg...) \
>> +#define fsl_ddr_mc_printk(mci, level, fmt, arg...) \
>>  	edac_mc_chipset_printk(mci, level, "FSL_DDR", fmt, ##arg)
>>
>>  /*
>> @@ -20,26 +20,23 @@
>>   */
>>
>>  /* DDR_SDRAM_CFG */
>> -#define MPC85XX_MC_DDR_SDRAM_CFG	0x0110
>> -#define MPC85XX_MC_CS_BNDS_0		0x0000
>> -#define MPC85XX_MC_CS_BNDS_1		0x0008
>> -#define MPC85XX_MC_CS_BNDS_2		0x0010
>> -#define MPC85XX_MC_CS_BNDS_3		0x0018
>> -#define MPC85XX_MC_CS_BNDS_OFS		0x0008
>> +#define MC_DDR_SDRAM_CFG	0x0110
>> +#define MC_CS_BNDS_0		0x0000
>> +#define MC_CS_BNDS_OFS		0x0008
>>
>> -#define MPC85XX_MC_DATA_ERR_INJECT_HI	0x0e00
>> -#define MPC85XX_MC_DATA_ERR_INJECT_LO	0x0e04
>> -#define MPC85XX_MC_ECC_ERR_INJECT	0x0e08
>> -#define MPC85XX_MC_CAPTURE_DATA_HI	0x0e20
>> -#define MPC85XX_MC_CAPTURE_DATA_LO	0x0e24
>> -#define MPC85XX_MC_CAPTURE_ECC		0x0e28
>> -#define MPC85XX_MC_ERR_DETECT		0x0e40
>> -#define MPC85XX_MC_ERR_DISABLE		0x0e44
>> -#define MPC85XX_MC_ERR_INT_EN		0x0e48
>> -#define MPC85XX_MC_CAPTURE_ATRIBUTES	0x0e4c
>> -#define MPC85XX_MC_CAPTURE_ADDRESS	0x0e50
>> -#define MPC85XX_MC_CAPTURE_EXT_ADDRESS	0x0e54
>> -#define MPC85XX_MC_ERR_SBE		0x0e58
>> +#define MC_DATA_ERR_INJECT_HI	0x0e00
>> +#define MC_DATA_ERR_INJECT_LO	0x0e04
>> +#define MC_ECC_ERR_INJECT	0x0e08
>> +#define MC_CAPTURE_DATA_HI	0x0e20
>> +#define MC_CAPTURE_DATA_LO	0x0e24
>> +#define MC_CAPTURE_ECC		0x0e28
>> +#define MC_ERR_DETECT		0x0e40
>> +#define MC_ERR_DISABLE		0x0e44
>> +#define MC_ERR_INT_EN		0x0e48
>> +#define MC_CAPTURE_ATRIBUTES	0x0e4c
>> +#define MC_CAPTURE_ADDRESS	0x0e50
>> +#define MC_CAPTURE_EXT_ADDRESS	0x0e54
>> +#define MC_ERR_SBE		0x0e58
>
> You should choose one name prefix for all driver symbols and stick to
> it. Either "FSL" or "LSC" for "Layerscape" or whatever but please be
> consistent.

Will replace MPC85XX with FSL.

York

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web