[SLOF] [PATCH slof] readme: Add a note about coding style
aik at ozlabs.ru
Wed Jan 27 14:10:55 AEDT 2016
On 01/25/2016 09:22 PM, Thomas Huth wrote:
> On 25.01.2016 02:41, Alexey Kardashevskiy wrote:
>> This is an attempt to standartize the coding style in the project.
>> @@ -247,6 +248,21 @@ 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  with the following exceptions:
> Currently, it's only one exception, so maybe remove the "s" at the end
> of exceptions?
Nope, this is a list, new additions won't have to change the clause above
=> profit :)
>> +- in the event that you require a specific width, use a standard type
>> +like int32_t, uint32_t, uint64_t, etc. Don't use Linux kernel internal
>> +types like u32, __u32 or __le32.
> I'd maybe indent the "like ..." and "types ..." lines with two spaces so
> that they match the "in" of the first line? Or remove the "-" in the
> first line since this there is only this one item for now?
2 spaces it is then.
>> +New forth code should use 4 space indentations and no tabs. Patches for
>> +the old code should keep the existing style which usually is
>> +3 space indentation.
> BTW, what about assembler code? Maybe mention the indentation rules for
> that, too? (indent with tabs?)
New assembly code submitted to SLOF should follow the coding style
guidelines for the Linux kernel  with no exception.
More information about the SLOF