[SLOF] [PATCH v2 02/19] fix code style in byteorder.h
thuth at redhat.com
Fri Jan 22 17:41:33 AEDT 2016
On 22.01.2016 04:47, Alexey Kardashevskiy wrote:
> On 01/20/2016 11:32 PM, Thomas Huth wrote:
>> Maybe we should also introduce a proper CODING_STYLE document for SLOF
>> that mandates how format functions? (pointing to the Linux kernel coding
>> style document for C code should likely be enough, but some coding style
>> for Forth code would be good, too)
> Like this?
> [vpl2 slof]$ git diff
> diff --git a/README b/README
> index 7895045..d5b758d 100644
> --- a/README
> +++ b/README
> @@ -12,7 +12,7 @@ Index
> 2.4 Extending the Forth engine
> 3.0 Limitations
> 4.0 Submitting patches
> +5.0 Coding style
> 1.0 Introduction to Slimline Open Firmware
> @@ -247,6 +247,14 @@ confirm that you certify the Developer Certificate
> of Origin Version 1.1,
> see  for details.
> +5.0 Coding style
> +New C code submitted to SLOF should follow the coding style guidelines
> +for the Linux kernel .
Maybe add a sentence that the "uintXX_t" types should be used instead of
the kernel "uXX" and "__uXX" types (e.g. uint32_t instead of u32) ...
otherwise people might start to introduce these again ...
> +New forth code should use 3 space intents and no tabs.
Theoretically ACK since this was the style that we originally used in
the SLOF sources and which is also used in the examples of IEEE 1275 (so
you could refer to that spec here).
Question is: Do we still want this? The 3 space indentation never really
worked well - people are just not used to indent with 3 spaces, and some
already configured their editor to use tabs (because of the C code), so
result in new patches is really a mess most of the time.
Not sure how to improve this situation, though. Maybe new code should be
indented with 4 spaces? Or simply with tabs, just like the C code?
... it's Friday, let's start some bike-shed painting discussion!
More information about the SLOF