Re: [PATCH][RESEND] power: supply: ab8500: clean up warnings found by cppcheck

From: Dan Carpenter
Date: Mon Jul 19 2021 - 06:22:11 EST


On Mon, Jul 19, 2021 at 11:16:48AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> Clean up a handful of checkpatch warnings:

The subject says cppcheck but it's actually checkpatch.

> - static const char * array should probably be static const char * const
> - function arguments should have identifier names
> - else should follow close brace '}'
> - suspect code indent for conditional statements
> - unnecessary parentheses in an if condition
> - avoid multiple line dereference
> - prefer using '"%s...", __func__' to using 'ab8500_chargalg_wd_work'

This printk should just be deleted. Use ftrace instea.

> - prefer 'long' over 'long int' as the int is unnecessary
>

regards,
dan carpenter