Re: [Patch v3 06/11] driver/edac/fsl_ddr: Rename macros and names
From: york sun
Date: Mon Aug 08 2016 - 11:46:06 EST
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@xxxxxxx>
>>
>> ---
>> 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