Re: [PATCH] Keep kernel coding style rule of hfs-s+/sp source

From: Joe Perches
Date: Thu Feb 02 2012 - 14:12:06 EST


On Thu, 2012-02-02 at 20:01 +0100, Karsten Keil wrote:
> > >> This was probably there to eliminate compiler warnings or avoid the
> Yes it was.
[]
> I think in this case a coding style violation is minor to a warning or
> potencial miscompiling.
> Do not misunderstand me that I do not like to make the code better and more
> readable, but such small style violations should be only fixed when here is
> a strong need or the driver is reworked in bigger parts and full testing
> is done.

I agree, but in the future (or perhaps even today)
it's better to mark these odd coding style uses with
macros to indicate the reason for their use.

Perhaps something akin to the ACCESS_ONCE macro like

#define PERFORM_ONCE(expr) \
do { \
if ((expr)) \
; \
} while (0)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/