[U-Boot] [PATCH 1/5] mmc: uniphier-sd: Factor out register IO

Marek Vasut marek.vasut at gmail.com
Sat Aug 5 19:23:37 UTC 2017


On 08/03/2017 02:36 PM, Masahiro Yamada wrote:
> Hi Marek,

Hi,

[...]

>> +static u32 uniphier_sd_readl(struct uniphier_sd_priv *priv, const u32 reg)
> 
> "const" is unneeded here.

Why? The function should not modify reg , so it is const.

> Also, could you use "unsigned int" or "int" for reg?

Why?

>> +{
>> +       return readl(priv->regbase + reg);
>> +}
>> +
>> +static void uniphier_sd_writel(struct uniphier_sd_priv *priv,
>> +                              const u32 val, const u32 reg)
> 
> Same here.  Please drop "const".
> 
> Please use "unsigned int" or "int" for reg
> 
> It is OK to use u32 for val.
> 
> 
> 
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list