ASoC: Intel: avs: Correctly access topology fields
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Fri, 13 Jan 2023 19:03:09 +0000 (20:03 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 13 Jan 2023 12:30:28 +0000 (12:30 +0000)
Fixes following warning:
sound/soc/intel/avs/topology.c:1636:20: sparse: sparse: restricted __le32 degrades to integer

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20230113190310.1451693-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/topology.c

index 5fee7a8..cdb4ec5 100644 (file)
@@ -1633,7 +1633,7 @@ avs_control_load(struct snd_soc_component *comp, int index, struct snd_kcontrol_
        size_t block_size;
        int ret;
 
-       switch (hdr->type) {
+       switch (le32_to_cpu(hdr->type)) {
        case SND_SOC_TPLG_TYPE_MIXER:
                tmc = container_of(hdr, typeof(*tmc), hdr);
                tuples = tmc->priv.array;