From: Yang Li Date: Tue, 16 May 2023 08:11:16 +0000 (+0800) Subject: ASoC: SOF: ipc4-topology: Fix an unsigned comparison which can never be negative X-Git-Tag: v6.6.17~3959^2~32^2~139 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fcbc3aaccfd57c7e71eac36bf1a8f063f19ceefa;p=platform%2Fkernel%2Flinux-rpi.git ASoC: SOF: ipc4-topology: Fix an unsigned comparison which can never be negative The return value from the call to sof_ipc4_get_valid_bits() is int. However, the return value is being assigned to an unsigned int variable 'out_ref_valid_bits', so making it an int. Eliminate the following warning: ./sound/soc/sof/ipc4-topology.c:1537:6-24: WARNING: Unsigned expression compared with zero: out_ref_valid_bits < 0 Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4985 Signed-off-by: Yang Li Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230516081116.71370-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 681239d..56887e4 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -1386,8 +1386,8 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget, void **ipc_config_data; int *ipc_config_size; u32 **data; - int ipc_size, ret; - u32 out_ref_rate, out_ref_channels, out_ref_valid_bits; + int ipc_size, ret, out_ref_valid_bits; + u32 out_ref_rate, out_ref_channels; u32 deep_buffer_dma_ms = 0; int output_fmt_index;