Re: [3/6] kgdb: core

From: Marcin Slusarz
Date: Sun Feb 10 2008 - 09:00:48 EST


On Sun, Feb 10, 2008 at 02:19:06PM +0100, Jesper Juhl wrote:
> On 10/02/2008, Marcin Slusarz <marcin.slusarz@xxxxxxxxx> wrote:
> > On Sun, Feb 10, 2008 at 08:13:31AM +0100, Ingo Molnar wrote:
> ...
> > > +
> > > + if (CACHE_FLUSH_IS_SAFE) {
> > > + if (current->mm && addr < TASK_SIZE) {
> > > + flush_cache_range(current->mm->mmap_cache,
> > > + addr, addr + BREAK_INSTR_SIZE);
> > > + } else {
> > > + flush_icache_range(addr, addr +
> > > + BREAK_INSTR_SIZE);
> > > + }
> > > + }
> > unneeded braces (here and in many other places)
> >
>
> While they are not strictly needed, I for one would argue they should
> probably stay.
>
> if (foo)
> bar();
>
> is not always safe in case bar() is a macro.
then fix this broken macro and leave calling code alone

> is always safe and is more robust when the code gets changed later
> since you don't accidentally end up with someone mistakenly turning it
> into
>
> if (foo)
> bar();
> baz();
following coding style and reading code before submission will
catch this kind of bugs

Marcin
--
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/