Skip to contentSkip to conversation

ASoC: fsl_ssi: Remove an outdated comment

PATCH In review Fabio Estevam 4 participants 6 messages Apr 5, 2017 – Apr 10, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ASoC: fsl_ssi: Remove an outdated comment

The comment for the FSLSSI_I2S_RATES definition states that the driver currently only supports I2S slave mode, which is no longer correct.

Remove such outdated comment.

---
 sound/soc/fsl/fsl_ssi.c | 8 --------
 1 file changed, 8 deletions(-)
sound/soc/fsl/fsl_ssi.c +0 -8
index fde08660..b450d8d 100644
@@ -54,14 +54,6 @@
 #include "fsl_ssi.h"
 #include "imx-pcm.h"
 
-/**
- * FSLSSI_I2S_RATES: sample rates supported by the I2S
- *
- * This driver currently only supports the SSI running in I2S slave mode,
- * which means the codec determines the sample rate.  Therefore, we tell
- * ALSA that we support all rates and let the codec driver decide what rates
- * are really supported.
- */
 #define FSLSSI_I2S_RATES SNDRV_PCM_RATE_CONTINUOUS
 
 /**
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 ASoC: fsl_ssi: Use the tolower() function

Code can be simplified by using the standard tolower() funtion.

---
 sound/soc/fsl/fsl_ssi.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
sound/soc/fsl/fsl_ssi.c +5 -8
index b450d8d..4981493 100644
@@ -35,6 +35,7 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/clk.h>
+#include <linux/ctype.h>
 #include <linux/device.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
@@ -1317,14 +1318,10 @@ static struct snd_ac97_bus_ops fsl_ssi_ac97_ops = {
  */
 static void make_lowercase(char *s)
 {
-	char *p = s;
-	char c;
-
-	while ((c = *p)) {
-		if ((c >= 'A') && (c <= 'Z'))
-			*p = c + ('a' - 'A');
-		p++;
-	}
+	if (!s)
+		return;
+	for (; *s; s++)
+		*s = tolower(*s);
 }
 
 static int fsl_ssi_imx_probe(struct platform_device *pdev,
Signature · 1 line
2.7.4
maintainer
#2 lore raw

Applied "ASoC: fsl_ssi: Use the tolower() function" to the asoc tree

The patch

ASoC: fsl_ssi: Use the tolower() function

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

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

Quoted 1 line

From c6682fedee47e3914af366f876728b3f77ba0272 Mon Sep 17 00:00:00 2001

From: Fabio Estevam <[email protected]>
Date: Wed, 5 Apr 2017 16:44:06 -0300
Subject: [PATCH] ASoC: fsl_ssi: Use the tolower() function

Code can be simplified by using the standard tolower() funtion.

---
 sound/soc/fsl/fsl_ssi.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
sound/soc/fsl/fsl_ssi.c +5 -8
index 184a47360f84..549a598d030e 100644
@@ -35,6 +35,7 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/clk.h>
+#include <linux/ctype.h>
 #include <linux/device.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
@@ -1320,14 +1321,10 @@ static struct snd_ac97_bus_ops fsl_ssi_ac97_ops = {
  */
 static void make_lowercase(char *s)
 {
-	char *p = s;
-	char c;
-
-	while ((c = *p)) {
-		if ((c >= 'A') && (c <= 'Z'))
-			*p = c + ('a' - 'A');
-		p++;
-	}
+	if (!s)
+		return;
+	for (; *s; s++)
+		*s = tolower(*s);
 }
 
 static int fsl_ssi_imx_probe(struct platform_device *pdev,
Signature · 1 line
2.11.0
#3 lore raw
In reply to Fabio Estevam
Quoted 4 lines · Fabio Estevam

Therefore, we tell
- * ALSA that we support all rates and let the codec driver decide what rates
- * are really supported.

This part is still true, though, isn't it?

reviewer
#4 lore raw
Quoted 7 lines · Timur Tabi
Quoted 4 lines · Fabio Estevam

Therefore, we tell
- * ALSA that we support all rates and let the codec driver decide what rates
- * are really supported.

This part is still true, though, isn't it?

I have sent a v2 that keeps this part, but after thinking more about it the "codec driver decide what rates are supported" part applies only to SSI slave mode,
so IMHO we could just remove the entire comment.

#5 lore raw
Quoted 4 lines · Fabio Estevam

I have sent a v2 that keeps this part, but after thinking more about it the "codec driver decide what rates are supported" part applies only to SSI slave mode,
so IMHO we could just remove the entire comment.

Then why not remove FSLSSI_I2S_RATES altogether?