Messages in this thread | | | Date | Sat, 22 Jan 2011 17:26:39 +0100 | From | Takashi Iwai <> | Subject | Re: [PATCH 1/1] SOUND: azt3328, fix broken AZF_FMT_XLATE macro |
| |
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
| |