[SLOF] [PATCH slof] readme: Add a note about coding style

Alexey Kardashevskiy aik at ozlabs.ru
Fri Jan 29 17:13:08 AEDT 2016


On 01/27/2016 06:40 PM, Thomas Huth wrote:
> On 27.01.2016 04:10, Alexey Kardashevskiy wrote:
>> 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 [3] for details.
>>>>
>>>>
>>>> +5.0 Coding style
>>>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>> +
>>>> +New C code submitted to SLOF should follow the coding style guidelines
>>>> +for the Linux kernel [4] 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 [4] with no exception.
>> ===
>
> I'd maybe say:
>
> New assembly code submitted to SLOF should follow the coding style
> guidelines for the Linux kernel [4], i.e. indent with tabs, not with spaces.
>
> ?


Ok, thanks, I'll push this.



-- 
Alexey


More information about the SLOF mailing list