Re: [PATCH] [PATCHv2 TRIVIAL] auxdisplay: remove unnecessary braces
From: Miguel Ojeda
Date: Sat Oct 06 2018 - 17:00:26 EST
Hi Ben,
On Sun, Sep 23, 2018 at 7:26 PM <benmoore422@xxxxxxxxx> wrote:
> I have removed some unnecessary braces from if statements.
> As well as inspecting the other driverfiles for similar
> style issues.
Thanks for the new version!
> - if (err) {
> + if (err)
> dft_brightness = MAX_BRIGHTNESS;
> - } else if (dft_brightness > MAX_BRIGHTNESS) {
> + else if (dft_brightness > MAX_BRIGHTNESS) {
This one breaks the braces-if-the-other-branch-has-them that Geert
told you about:
https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
> - if (byte & 1) {
> + if (byte & 1)
> set_bit(LCD_BIT_DA, bits);
> - } else {
> + else
> clear_bit(LCD_BIT_DA, bits);
> - }
This one seems fine.
Cheers,
Miguel