Gilles Chanteperdrix wrote: > Jan Kiszka wrote: >> #ifdef CONFIG_XENO_SPINLOCK_DEBUG >> @@ -343,7 +340,7 @@ static inline spl_t __xnlock_get_irqsave >> #else /* !CONFIG_XENO_SPINLOCK_DEBUG */ >> static inline spl_t __xnlock_get_irqsave (xnlock_t *lock) >> { >> -#endif /* !CONFIG_XENO_SPINLOCK_DEBUG */ >> +#endif /* CONFIG_XENO_SPINLOCK_DEBUG */ > > I prefer the notation: > > #if cond > #endif /* cond */ > > and > > #if cond > #else /* !cond */ > #endif /* !cond */ > > to > > #if cond > #endif /* cond */ > > and > > #if cond > #else /* !cond */ > #endif /* cond */ > > Because in the first case, when I see a #endif in the middle of a lot of > code, I immediately know what predicate is true above the #endif. > Ok, I understand the logic. Nevertheless, I had the impression the first scheme is used far more often than the second one in Xenomai and I-pipe, so I took the chance to consolidate the code. So, what should be the common rule from now on? Is there a kernel-style rule for this issue we should follow, or are we free and should convert to your preferred scheme? Jan