Re: [PATCH 7/7] MFD:rtsx: Fix checkpatch warning

From: Borislav Petkov
Date: Mon Dec 24 2012 - 11:10:18 EST


On Mon, Dec 24, 2012 at 02:03:56PM +0800, wei_wang@xxxxxxxxxxxxxx wrote:
> From: Wei WANG <wei_wang@xxxxxxxxxxxxxx>
>
> WARNING: Avoid CamelCase: <min_N>
> + u8 N, min_N, max_N, clk_divider;
>
> WARNING: Avoid CamelCase: <max_N>
> + u8 N, min_N, max_N, clk_divider;
>
> Signed-off-by: Wei WANG <wei_wang@xxxxxxxxxxxxxx>
> ---
> drivers/mfd/rtsx_pcr.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
> index cc28f17..f843c73 100644
> --- a/drivers/mfd/rtsx_pcr.c
> +++ b/drivers/mfd/rtsx_pcr.c
> @@ -590,7 +590,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
> u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk)
> {
> int err, clk;
> - u8 N, min_N, max_N, clk_divider;
> + u8 n, min_n, max_n, clk_divider;
> u8 mcu_cnt, div, max_div;
> u8 depth[] = {
> [RTSX_SSC_DEPTH_4M] = SSC_DEPTH_4M,
> @@ -615,8 +615,8 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
> card_clock /= 1000000;
> dev_dbg(&(pcr->pci->dev), "Switch card clock to %dMHz\n", card_clock);
>
> - min_N = 80;
> - max_N = 208;
> + min_n = 80;
> + max_n = 208;

Naked magic values? Maybe macro defines with descriptive names instead?

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/