imx: mmdc_size: Fix checkpatch warnings
The original imx_ddr_size() implementation had some issues reported by checkpatch like this: CHECK: Prefer kernel type 'u32' over 'uint32_t' #127: FILE: arch/arm/mach-imx/mmdc_size.c:16: + uint32_t ctl; WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #151: FILE: arch/arm/mach-imx/mmdc_size.c:40: + unsigned ctl = readl(&mem->ctl); Fix all of them. Signed-off-by: Fabio Estevam <festevam@gmail.com>
This commit is contained in:
		
							parent
							
								
									89bc388a32
								
							
						
					
					
						commit
						a02a5fb6ff
					
				|  | @ -13,13 +13,13 @@ static const unsigned char bank_lookup[] = {3, 2}; | ||||||
| 
 | 
 | ||||||
| /* these MMDC registers are common to the IMX53 and IMX6 */ | /* these MMDC registers are common to the IMX53 and IMX6 */ | ||||||
| struct esd_mmdc_regs { | struct esd_mmdc_regs { | ||||||
| 	uint32_t	ctl; | 	u32 ctl; | ||||||
| 	uint32_t	pdc; | 	u32 pdc; | ||||||
| 	uint32_t	otc; | 	u32 otc; | ||||||
| 	uint32_t	cfg0; | 	u32 cfg0; | ||||||
| 	uint32_t	cfg1; | 	u32 cfg1; | ||||||
| 	uint32_t	cfg2; | 	u32 cfg2; | ||||||
| 	uint32_t	misc; | 	u32 misc; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #define ESD_MMDC_CTL_GET_ROW(mdctl)	((ctl >> 24) & 7) | #define ESD_MMDC_CTL_GET_ROW(mdctl)	((ctl >> 24) & 7) | ||||||
|  | @ -34,11 +34,11 @@ struct esd_mmdc_regs { | ||||||
|  * width and the MMDC MDMISC register holds the number of banks. Combine |  * width and the MMDC MDMISC register holds the number of banks. Combine | ||||||
|  * all these bits to determine the meme size the MMDC has been configured for |  * all these bits to determine the meme size the MMDC has been configured for | ||||||
|  */ |  */ | ||||||
| unsigned imx_ddr_size(void) | unsigned int imx_ddr_size(void) | ||||||
| { | { | ||||||
| 	struct esd_mmdc_regs *mem = (struct esd_mmdc_regs *)MEMCTL_BASE; | 	struct esd_mmdc_regs *mem = (struct esd_mmdc_regs *)MEMCTL_BASE; | ||||||
| 	unsigned ctl = readl(&mem->ctl); | 	unsigned int ctl = readl(&mem->ctl); | ||||||
| 	unsigned misc = readl(&mem->misc); | 	unsigned int misc = readl(&mem->misc); | ||||||
| 	int bits = 11 + 0 + 0 + 1;      /* row + col + bank + width */ | 	int bits = 11 + 0 + 0 + 1;      /* row + col + bank + width */ | ||||||
| 
 | 
 | ||||||
| 	bits += ESD_MMDC_CTL_GET_ROW(ctl); | 	bits += ESD_MMDC_CTL_GET_ROW(ctl); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue