ASoC: SDCA: fix __leXX types in find_sdca_control_range
Subsystems (3)
Charles Keepax
maintainerPATCH v2 1/1 ASoC: SDCA: fix __leXX types in find_sdca_control_range
From: Ben Dooks <[email protected]>
The find_sdca_control_range passes u16 and u32 values to the leXX_to_cpu() functions. Change this type and for the data loop use the le32_to_cpus() to convert the value.
Fixes the following sparse warnings:
sound/soc/sdca/sdca_functions.c:868:23: warning: cast to restricted __le16 sound/soc/sdca/sdca_functions.c:869:23: warning: cast to restricted __le16 sound/soc/sdca/sdca_functions.c:877:34: warning: cast to restricted __le32
---
Changes since v1:
- Updated the data loop from le32_to_cpup to le32_to_cpus
sound/soc/sdca/sdca_functions.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/sdca/sdca_functions.c +3 -3
@@ -851,7 +851,7 @@ static int find_sdca_control_range(struct device *dev, {u8 *range_list;int num_range; -u16 *limits; +__le16 *limits;int i; num_range =fwnode_property_count_u8 (control_node,"mipi-sdca-control-range" );
@@ -869,7 +869,7 @@ static int find_sdca_control_range(struct device *dev,fwnode_property_read_u8_array (control_node,"mipi-sdca-control-range" , range_list, num_range); - limits = (u16 *)range_list; + limits = (__le16 *)range_list; range->cols =le16_to_cpu (limits[0 ]); range->rows =le16_to_cpu (limits[1 ]);
@@ -880,7 +880,7 @@ static int find_sdca_control_range(struct device *dev,return -EINVAL ;for (i =0 ; i < num_range; i++) - range->data[i] =le32_to_cpu (range->data[i]); +le32_to_cpus (&range->data[i]);return 0 ; }
Signature · 1 line
2.47.3
Mark Brown
maintainerQuoted 1 line · Charles Keepax
ASoC: SDCA: fix
__leXXtypes infind_sdca_control_range
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.5
Thanks!
[1/1] ASoC: SDCA: fix __leXX types in find_sdca_control_range
https://git.kernel.org/broonie/sound/c/584b499bfabf
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark