[alsa-devel] [PATCH v3 07/14] ASoC: SOF: Add DSP firmware logger support

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Tue Jan 22 21:33:55 CET 2019


>>>> +	/* 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)





More information about the Alsa-devel mailing list