Ok, then I don't see any need to "protect" existing code that's already checkpatch clean.
On Wednesday, August 19, 2015, Mike Holmes <mike.hol...@linaro.org> wrote: > On 19 August 2015 at 13:26, Bill Fischofer <bill.fischo...@linaro.org > <javascript:;>> wrote: > > Is clang-format intended to be used as a convenience or as something > that is > > a standard part of ODP? > > I don’t see it as mandatory, just to help those who find their > favourite editor does not play well with checkpatch rules. > It also fixes 99% of the current mess generated when we moved to the > newer checkpatch automatically, I expect to run it and fix all those > warnings in 1.3 as Nicloas had proposed. > > I have no problem with offering it as a convenience > > to help submitters in creating clean patches, but what's the point of > having > > a style guide if code is going to be run through a formatter? > That would > > suggest that folks really don't need to pay attention to style since they > > can assume that some tools is going to reformat things anyway. > > > > We want code to be written to the ODP style, not converted into that for > > publication from the "real" style used by each author. > > By providing this as an option those with editors that are correctly > set to a style that is generating different but still checkpatch > compliant code will be fine. > We don’t need to enforce this single tools view of the code, > checkpatch already enforces the ODP rule. > > > > > On Wed, Aug 19, 2015 at 11:20 AM, Mike Holmes <mike.hol...@linaro.org > <javascript:;>> > > wrote: > >> > >> The odp_format tool is not infallible, in this case it is better to omit > >> the macro from formatting > >> > >> Signed-off-by: Mike Holmes <mike.hol...@linaro.org <javascript:;>> > >> --- > >> platform/linux-generic/include/odp_buffer_internal.h | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a/platform/linux-generic/include/odp_buffer_internal.h > >> b/platform/linux-generic/include/odp_buffer_internal.h > >> index a7638da..db9defa 100644 > >> --- a/platform/linux-generic/include/odp_buffer_internal.h > >> +++ b/platform/linux-generic/include/odp_buffer_internal.h > >> @@ -30,7 +30,7 @@ extern "C" { > >> #include <odp/thread.h> > >> #include <odp/event.h> > >> > >> - > >> +/* clang-format off */ > >> #define ODP_BITSIZE(x) \ > >> ((x) <= 2 ? 1 : \ > >> ((x) <= 4 ? 2 : \ > >> @@ -49,6 +49,7 @@ extern "C" { > >> ((x) <= 32768 ? 15 : \ > >> ((x) <= 65536 ? 16 : \ > >> (0/0))))))))))))))))) > >> +/* clang-format on */ > >> > >> _ODP_STATIC_ASSERT(ODP_CONFIG_PACKET_SEG_LEN_MIN >= 256, > >> "ODP Segment size must be a minimum of 256 bytes"); > >> -- > >> 2.1.4 > >> > >> _______________________________________________ > >> lng-odp mailing list > >> lng-odp@lists.linaro.org <javascript:;> > >> https://lists.linaro.org/mailman/listinfo/lng-odp > > > > > > > > -- > Mike Holmes > Technical Manager - Linaro Networking Group > Linaro.org │ Open source software for ARM SoCs >
_______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp