Skip to contentSkip to conversation

Staging: sound: drivers: aloop.c: fix a trailing whitespace issue.

PATCH In review Sanjana Sanikommu 3 participants 3 messages Mar 17, 2019 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: sound: drivers: aloop.c: fix a trailing whitespace issue.

fix a trailing white space error.Issue found by checkpatch.pl semantic patch results for aloop.c.

ERROR: trailing white space.

---
 sound/drivers/aloop.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)
sound/drivers/aloop.c +5 -13
index 8c3fbe1276be..0c27e17a19e5 100644
@@ -273,7 +273,7 @@ static int loopback_trigger(struct snd_pcm_substream *substream, int cmd)
 		dpcm->last_jiffies = jiffies;
 		dpcm->pcm_rate_shift = 0;
 		dpcm->last_drift = 0;
-		spin_lock(&cable->lock);	
+		spin_lock(&cable->lock);
 		cable->running |= stream;
 		cable->pause &= ~stream;
 		loopback_timer_start(dpcm);
@@ -282,7 +282,7 @@ static int loopback_trigger(struct snd_pcm_substream *substream, int cmd)
 			loopback_active_notify(dpcm);
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
-		spin_lock(&cable->lock);	
+		spin_lock(&cable->lock);
 		cable->running &= ~stream;
 		cable->pause &= ~stream;
 		loopback_timer_stop(dpcm);
@@ -292,7 +292,7 @@ static int loopback_trigger(struct snd_pcm_substream *substream, int cmd)
 		break;
 	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
 	case SNDRV_PCM_TRIGGER_SUSPEND:
-		spin_lock(&cable->lock);	
+		spin_lock(&cable->lock);
 		cable->pause |= stream;
 		loopback_timer_stop(dpcm);
 		spin_unlock(&cable->lock);
@@ -879,7 +879,6 @@ static int loopback_notify_put(struct snd_kcontrol *kcontrol,
 	mutex_unlock(&loopback->cable_lock);
 	return change;
 }
-
 static int loopback_active_get(struct snd_kcontrol *kcontrol,
 			       struct snd_ctl_elem_value *ucontrol)
 {
@@ -899,7 +898,6 @@ static int loopback_active_get(struct snd_kcontrol *kcontrol,
 	ucontrol->value.integer.value[0] = val;
 	return 0;
 }
-
 static int loopback_format_info(struct snd_kcontrol *kcontrol,   
 				struct snd_ctl_elem_info *uinfo) 
 {
@@ -909,8 +907,7 @@ static int loopback_format_info(struct snd_kcontrol *kcontrol,
 	uinfo->value.integer.max = SNDRV_PCM_FORMAT_LAST;
 	uinfo->value.integer.step = 1;
 	return 0;
-}                                  
-
+}
 static int loopback_format_get(struct snd_kcontrol *kcontrol,
 			       struct snd_ctl_elem_value *ucontrol)
 {
@@ -921,7 +918,6 @@ static int loopback_format_get(struct snd_kcontrol *kcontrol,
 			       [kcontrol->id.device].format;
 	return 0;
 }
-
 static int loopback_rate_info(struct snd_kcontrol *kcontrol,   
 			      struct snd_ctl_elem_info *uinfo) 
 {
@@ -931,7 +927,7 @@ static int loopback_rate_info(struct snd_kcontrol *kcontrol,
 	uinfo->value.integer.max = 192000;
 	uinfo->value.integer.step = 1;
 	return 0;
-}                                  
+}                                 
 
 static int loopback_rate_get(struct snd_kcontrol *kcontrol,
 			     struct snd_ctl_elem_value *ucontrol)
@@ -1156,7 +1152,6 @@ static int loopback_probe(struct platform_device *devptr)
 		pcm_substreams[dev] = 1;
 	if (pcm_substreams[dev] > MAX_PCM_SUBSTREAMS)
 		pcm_substreams[dev] = MAX_PCM_SUBSTREAMS;
-	
 	loopback->card = card;
 	mutex_init(&loopback->cable_lock);
 
@@ -1198,7 +1193,6 @@ static int loopback_suspend(struct device *pdev)
 	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
-	
 static int loopback_resume(struct device *pdev)
 {
 	struct snd_card *card = dev_get_drvdata(pdev);
@@ -1206,13 +1200,11 @@ static int loopback_resume(struct device *pdev)
 	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
-
 static SIMPLE_DEV_PM_OPS(loopback_pm, loopback_suspend, loopback_resume);
 #define LOOPBACK_PM_OPS	&loopback_pm
 #else
 #define LOOPBACK_PM_OPS	NULL
 #endif
-
 #define SND_LOOPBACK_DRIVER	"snd_aloop"
 
 static struct platform_driver loopback_driver = {
Signature · 1 line
2.17.1
#1 lore raw
Quoted 2 lines · Sanjana Sanikommu

fix a trailing white space error.Issue found by checkpatch.pl semantic patch results for aloop.c.

A sentence should start with a capital letter.

When you end a sentence, please put at least one space after the period.

Try to avoid using fix in the log message. Here "Remove trailing whitespace" is shorter and explains what was done to fix the problem.

julia

Quoted 122 lines

ERROR: trailing white space.

---
 sound/drivers/aloop.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)
sound/drivers/aloop.c +5 -14
index 8c3fbe1276be..0c27e17a19e5 100644
@@ -273,7 +273,7 @@ static int loopback_trigger(struct snd_pcm_substream *substream, int cmd)
 		dpcm->last_jiffies = jiffies;
 		dpcm->pcm_rate_shift = 0;
 		dpcm->last_drift = 0;
-		spin_lock(&cable->lock);
+		spin_lock(&cable->lock);
 		cable->running |= stream;
 		cable->pause &= ~stream;
 		loopback_timer_start(dpcm);
@@ -282,7 +282,7 @@ static int loopback_trigger(struct snd_pcm_substream *substream, int cmd)
 			loopback_active_notify(dpcm);
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
-		spin_lock(&cable->lock);
+		spin_lock(&cable->lock);
 		cable->running &= ~stream;
 		cable->pause &= ~stream;
 		loopback_timer_stop(dpcm);
@@ -292,7 +292,7 @@ static int loopback_trigger(struct snd_pcm_substream *substream, int cmd)
 		break;
 	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
 	case SNDRV_PCM_TRIGGER_SUSPEND:
-		spin_lock(&cable->lock);
+		spin_lock(&cable->lock);
 		cable->pause |= stream;
 		loopback_timer_stop(dpcm);
 		spin_unlock(&cable->lock);
@@ -879,7 +879,6 @@ static int loopback_notify_put(struct snd_kcontrol *kcontrol,
 	mutex_unlock(&loopback->cable_lock);
 	return change;
 }
-
 static int loopback_active_get(struct snd_kcontrol *kcontrol,
 			       struct snd_ctl_elem_value *ucontrol)
 {
@@ -899,7 +898,6 @@ static int loopback_active_get(struct snd_kcontrol *kcontrol,
 	ucontrol->value.integer.value[0] = val;
 	return 0;
 }
-
 static int loopback_format_info(struct snd_kcontrol *kcontrol,
 				struct snd_ctl_elem_info *uinfo)
 {
@@ -909,8 +907,7 @@ static int loopback_format_info(struct snd_kcontrol *kcontrol,
 	uinfo->value.integer.max = SNDRV_PCM_FORMAT_LAST;
 	uinfo->value.integer.step = 1;
 	return 0;
-}
-
+}
 static int loopback_format_get(struct snd_kcontrol *kcontrol,
 			       struct snd_ctl_elem_value *ucontrol)
 {
@@ -921,7 +918,6 @@ static int loopback_format_get(struct snd_kcontrol *kcontrol,
 			       [kcontrol->id.device].format;
 	return 0;
 }
-
 static int loopback_rate_info(struct snd_kcontrol *kcontrol,
 			      struct snd_ctl_elem_info *uinfo)
 {
@@ -931,7 +927,7 @@ static int loopback_rate_info(struct snd_kcontrol *kcontrol,
 	uinfo->value.integer.max = 192000;
 	uinfo->value.integer.step = 1;
 	return 0;
-}
+}
 
 static int loopback_rate_get(struct snd_kcontrol *kcontrol,
 			     struct snd_ctl_elem_value *ucontrol)
@@ -1156,7 +1152,6 @@ static int loopback_probe(struct platform_device *devptr)
 		pcm_substreams[dev] = 1;
 	if (pcm_substreams[dev] > MAX_PCM_SUBSTREAMS)
 		pcm_substreams[dev] = MAX_PCM_SUBSTREAMS;
-
 	loopback->card = card;
 	mutex_init(&loopback->cable_lock);
 
@@ -1198,7 +1193,6 @@ static int loopback_suspend(struct device *pdev)
 	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
-
 static int loopback_resume(struct device *pdev)
 {
 	struct snd_card *card = dev_get_drvdata(pdev);
@@ -1206,13 +1200,11 @@ static int loopback_resume(struct device *pdev)
 	snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 	return 0;
 }
-
 static SIMPLE_DEV_PM_OPS(loopback_pm, loopback_suspend, loopback_resume);
 #define LOOPBACK_PM_OPS	&loopback_pm
 #else
 #define LOOPBACK_PM_OPS	NULL
 #endif
-
 #define SND_LOOPBACK_DRIVER	"snd_aloop"
 
 static struct platform_driver loopback_driver = {
--

2.17.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190317080246.2831-1-sanjana99reddy99%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw
In reply to Sanjana Sanikommu
Quoted 8 lines · Sanjana Sanikommu

fix a trailing white space error.Issue found by checkpatch.pl semantic patch results for aloop.c.

ERROR: trailing white space.

---
 sound/drivers/aloop.c | 18 +++++-------------

This is not a "staging" driver at all, so I can not take patches for it for the outreachy application process, sorry.

Staging drivers live in the drivers/staging/* portion of the kernel tree.

thanks,

greg k-h