Re: [PATCH 1/1] SOUND: azt3328, fix broken AZF_FMT_XLATE macro

From: Takashi Iwai
Date: Sat Jan 22 2011 - 11:26:44 EST


At Sat, 22 Jan 2011 14:56:10 +0100,
Jiri Slaby wrote:
>
> Despite the AZF_FMT_XLATE macro looks totally weird and useless, it's
> heavily broken (apart it also broke my parser).
>
> The 'break' in the macro belongs to the do-while loop and not to the
> switch. So it always falls through the all cases till the end.
>
> Remove the do-while from the macro.
>
> Also people should terminate statements with semicolons. So force
> people to do so by removing the last one in the macro.
>
> I vote for removing that crap completely because it makes the code
> weird anyway -- you have to specify manually both of freq and bits
> which is I would expect to be avoided exactly by such a macro.

I agree. Andreas, please either revert back to the plain code,
or use a simple look-up table if you don't want switch/case.


thanks,

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