Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: pci/rme9652/hdspm: remove always true condition

Fix W=1 warning:

sound/pci/rme9652/hdspm.c: In function ‘hdspm_autosync_ref’:
sound/pci/rme9652/hdspm.c:3030:16: warning: comparison of unsigned
expression >= 0 is always true [-Wtype-limits]
3030 | if ((syncref >= HDSPM_AES32_AUTOSYNC_FROM_WORD) &&
| ^~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Pierre-Louis Bossart and committed by
Takashi Iwai
ab3ee092 6cdc01eb

+2 -2
+2 -2
sound/pci/rme9652/hdspm.c
··· 3027 3027 3028 3028 unsigned int status = hdspm_read(hdspm, HDSPM_statusRegister); 3029 3029 unsigned int syncref = (status >> HDSPM_AES32_syncref_bit) & 0xF; 3030 - if ((syncref >= HDSPM_AES32_AUTOSYNC_FROM_WORD) && 3031 - (syncref <= HDSPM_AES32_AUTOSYNC_FROM_SYNC_IN)) { 3030 + /* syncref >= HDSPM_AES32_AUTOSYNC_FROM_WORD is always true */ 3031 + if (syncref <= HDSPM_AES32_AUTOSYNC_FROM_SYNC_IN) { 3032 3032 return syncref; 3033 3033 } 3034 3034 return HDSPM_AES32_AUTOSYNC_FROM_NONE;