Re: [PATCH] ALSA: synth: emux: remove redundant test for r <= 13

2017-11-17 Thread walter harms
Am 17.11.2017 12:07, schrieb Colin Ian King: > On 17/11/17 11:06, Takashi Iwai wrote: >> On Tue, 14 Nov 2017 18:26:53 +0100, >> Colin King wrote: >>> >>> From: Colin Ian King >>> >>> The calculation r = (3 - ((rate >> 6) & 3)) * 3 results in r being >>> 0, 3, 6 or 9 and so the check (13 > r) is

Re: [PATCH] ALSA: synth: emux: remove redundant test for r <= 13

2017-11-17 Thread Colin Ian King
On 17/11/17 11:06, Takashi Iwai wrote: > On Tue, 14 Nov 2017 18:26:53 +0100, > Colin King wrote: >> >> From: Colin Ian King >> >> The calculation r = (3 - ((rate >> 6) & 3)) * 3 results in r being >> 0, 3, 6 or 9 and so the check (13 > r) is always true and hence we >> can remove the redundant che

Re: [PATCH] ALSA: synth: emux: remove redundant test for r <= 13

2017-11-17 Thread Takashi Iwai
On Tue, 14 Nov 2017 18:26:53 +0100, Colin King wrote: > > From: Colin Ian King > > The calculation r = (3 - ((rate >> 6) & 3)) * 3 results in r being > 0, 3, 6 or 9 and so the check (13 > r) is always true and hence we > can remove the redundant check and the else path. > > Detected by Coverity

[PATCH] ALSA: synth: emux: remove redundant test for r <= 13

2017-11-14 Thread Colin King
From: Colin Ian King The calculation r = (3 - ((rate >> 6) & 3)) * 3 results in r being 0, 3, 6 or 9 and so the check (13 > r) is always true and hence we can remove the redundant check and the else path. Detected by CoverityScan, CID#744415 ("Logically dead code") Signed-off-by: Colin Ian King