lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 8 Aug 2016 09:41:25 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	York Sun <york.sun@....com>
Cc:	linux-edac@...r.kernel.org, morbidrsa@...il.com, oss@...error.net,
	stuart.yoder@....com, Doug Thompson <dougthompson@...ssion.com>,
	mchehab@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [Patch v3 06/11] driver/edac/fsl_ddr: Rename macros and names

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ