Re: [Sound-open-firmware] [alsa-devel] [PATCH v3 07/14] ASoC: SOF: Add DSP firmware logger support
22 Jan
2019
22 Jan
'19
10:33 p.m.
- /* 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)
2115
Age (days ago)
2115
Last active (days ago)
0 comments
1 participants
participants (1)
-
Pierre-Louis Bossart