diff mbox series

ASoC: cs35l45: Corrects cs35l45_get_clk_freq_id function data type

Message ID 20240919151654.197337-1-rriveram@opensource.cirrus.com (mailing list archive)
State Accepted
Commit 01e709aeaf913a4d0e04f9957d399cf6fc3b5455
Headers show
Series ASoC: cs35l45: Corrects cs35l45_get_clk_freq_id function data type | expand

Commit Message

Ricardo Rivera-Matos Sept. 19, 2024, 3:16 p.m. UTC
Changes cs35l45_get_clk_freq_id() function data type from unsigned int
to int. This function is returns a positive index value if successful
or a negative error code if unsuccessful.

Functionally there should be no difference as long as the unsigned int
return is interpreted as an int, however it should be corrected for
readability.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
---
 sound/soc/codecs/cs35l45-tables.c | 2 +-
 sound/soc/codecs/cs35l45.h        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Charles Keepax Sept. 19, 2024, 4:44 p.m. UTC | #1
On Thu, Sep 19, 2024 at 03:16:52PM +0000, Ricardo Rivera-Matos wrote:
> Changes cs35l45_get_clk_freq_id() function data type from unsigned int
> to int. This function is returns a positive index value if successful
> or a negative error code if unsuccessful.
> 
> Functionally there should be no difference as long as the unsigned int
> return is interpreted as an int, however it should be corrected for
> readability.
> 
> Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles
Mark Brown Sept. 20, 2024, 8:22 a.m. UTC | #2
On Thu, 19 Sep 2024 15:16:52 +0000, Ricardo Rivera-Matos wrote:
> Changes cs35l45_get_clk_freq_id() function data type from unsigned int
> to int. This function is returns a positive index value if successful
> or a negative error code if unsuccessful.
> 
> Functionally there should be no difference as long as the unsigned int
> return is interpreted as an int, however it should be corrected for
> readability.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: cs35l45: Corrects cs35l45_get_clk_freq_id function data type
      commit: 01e709aeaf913a4d0e04f9957d399cf6fc3b5455

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
diff mbox series

Patch

diff --git a/sound/soc/codecs/cs35l45-tables.c b/sound/soc/codecs/cs35l45-tables.c
index e1cebb9e4dc6..405dab137b3b 100644
--- a/sound/soc/codecs/cs35l45-tables.c
+++ b/sound/soc/codecs/cs35l45-tables.c
@@ -315,7 +315,7 @@  static const struct {
 	{ 0x3B, 24576000 },
 };
 
-unsigned int cs35l45_get_clk_freq_id(unsigned int freq)
+int cs35l45_get_clk_freq_id(unsigned int freq)
 {
 	int i;
 
diff --git a/sound/soc/codecs/cs35l45.h b/sound/soc/codecs/cs35l45.h
index e2ebcf58d7e0..7a790d2acac7 100644
--- a/sound/soc/codecs/cs35l45.h
+++ b/sound/soc/codecs/cs35l45.h
@@ -507,7 +507,7 @@  extern const struct dev_pm_ops cs35l45_pm_ops;
 extern const struct regmap_config cs35l45_i2c_regmap;
 extern const struct regmap_config cs35l45_spi_regmap;
 int cs35l45_apply_patch(struct cs35l45_private *cs35l45);
-unsigned int cs35l45_get_clk_freq_id(unsigned int freq);
+int cs35l45_get_clk_freq_id(unsigned int freq);
 int cs35l45_probe(struct cs35l45_private *cs35l45);
 void cs35l45_remove(struct cs35l45_private *cs35l45);