Re: [libgpiod][PATCH 02/11] treewide: apply formatting changes with clang-format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 30, 2022 at 01:42:22PM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> 
> Use linux kernel's .clang-format file to automatically improve the coding
> style of libgpiod's C code base. We don't import the file into the
> repository as it's not perfect and certain converted fragments were
> rolled back because they looked better before the conversion.

...

>  		if (gpiod_line_settings_get_direction(
> -				per_line->node->settings) !=
> +			    per_line->node->settings) !=
>  		    GPIOD_LINE_DIRECTION_OUTPUT)
>  			continue;

Personally I percept this as an ugly indented code...

One reason is too strict 80 or whatever rule (we are almost in
the second quarter of the 21st century!), another is that trailing
opening parenthesis.

That said, some of the changes in this patch I like, some I disgust.
Quite controversial to me, but it's your project and esp. taking into
account that it's a user space, the kernel or other project rules are
not applicable in a general sense anyway.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux