Re: [PATCH v4 3/3] power: supply: add CellWise cw2015 fuel gauge driver

From: Sam Ravnborg
Date: Sun Mar 15 2020 - 07:16:50 EST


Hi Tobias.

On Sun, Mar 15, 2020 at 12:00:35PM +0100, Tobias Schramm wrote:
> Hi Andy,
>
> thanks for your feedback. Please find my comments inline.
>
> >
> >> + dev_err(cw_bat->dev,
> >> + "Failed to upload battery info\n");
> >
> > Indentation of the second line.
> >
> I've seen quite a few different indentation styles used in kernel
> source. Personally I'd indent like this:
>
> dev_warn(cw_bat->dev,
> "some long error message");
>
> However coding-style.rst specifies that spaces are never to be used for
> indentation. May I assume they are ok for alignment though?

Indent with tabs and align with spaces.

So this becomes

< tab >< tab >dev_warn(cw_bat->dev,
< tab >< tab ><tab >_"some long error message");

Where '_' represents a space.

This is the recommend kernel practice.

Sam