Re: [PATCH v3 07/14] ASoC: SOF: Add DSP firmware logger support

Pierre-Louis Bossart
2019-01-22T20:33:55Z

>>>> + /* make sure count is <= avail */
>>>> + count = avail > count ? count : avail;
>>> min()?
>> I tried to use min() but then Sparse started complaining so went back to an
>> explicit test+assign.
>> I don't have a strong opinion on this, but we've found so many improvements
>> with the tools that I tend to favor warning-free code.
> Why was sparse complaining - was it spotting something that is an actual
> issue here and you've just masked the warning?

It was about the use of typeof/sizeof() in min(), not an actual issue in
the code

sound/soc/sof/trace.c:90:17: warning: expression using sizeof(void)
sound/soc/sof/trace.c:90:17: warning: expression using sizeof(void)