Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1653055 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-05-30 12:00 +0200 |
| Last post | 2017-05-30 12:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ALSA: sound/core/pcm_timer.c: include pcm_local.h and remove some extraneous tabs Colin King <colin.king@canonical.com> - 2017-05-30 12:00 +0200
Re: [PATCH] ALSA: sound/core/pcm_timer.c: include pcm_local.h and remove some extraneous tabs Joe Perches <joe@perches.com> - 2017-05-30 12:30 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-05-30 12:00 +0200 |
| Subject | [PATCH] ALSA: sound/core/pcm_timer.c: include pcm_local.h and remove some extraneous tabs |
| Message-ID | <tMM6u-5FJ-7@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
We need to include pcm_local.h to clean up some smatch warnings:
symbol 'snd_pcm_timer_done' was not declared. Should it be static?
symbol 'snd_pcm_timer_init' was not declared. Should it be static?
symbol 'snd_pcm_timer_resolution_change' was not declared. Should
it be static?
Also remove some extraneous tabs on empty lines.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/core/pcm_timer.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c
index 20ecd8f18080..b182cac00dd8 100644
--- a/sound/core/pcm_timer.c
+++ b/sound/core/pcm_timer.c
@@ -25,6 +25,8 @@
#include <sound/pcm.h>
#include <sound/timer.h>
+#include "pcm_local.h"
+
/*
* Timer functions
*/
@@ -33,7 +35,7 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream)
{
unsigned long rate, mult, fsize, l, post;
struct snd_pcm_runtime *runtime = substream->runtime;
-
+
mult = 1000000000;
rate = runtime->rate;
if (snd_BUG_ON(!rate))
@@ -65,7 +67,7 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream)
static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer)
{
struct snd_pcm_substream *substream;
-
+
substream = timer->private_data;
return substream->runtime ? substream->runtime->timer_resolution : 0;
}
@@ -73,7 +75,7 @@ static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer)
static int snd_pcm_timer_start(struct snd_timer * timer)
{
struct snd_pcm_substream *substream;
-
+
substream = snd_timer_chip(timer);
substream->timer_running = 1;
return 0;
@@ -82,7 +84,7 @@ static int snd_pcm_timer_start(struct snd_timer * timer)
static int snd_pcm_timer_stop(struct snd_timer * timer)
{
struct snd_pcm_substream *substream;
-
+
substream = snd_timer_chip(timer);
substream->timer_running = 0;
return 0;
@@ -112,7 +114,7 @@ void snd_pcm_timer_init(struct snd_pcm_substream *substream)
{
struct snd_timer_id tid;
struct snd_timer *timer;
-
+
tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE;
tid.dev_class = SNDRV_TIMER_CLASS_PCM;
tid.card = substream->pcm->card->number;
--
2.11.0
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2017-05-30 12:30 +0200 |
| Subject | Re: [PATCH] ALSA: sound/core/pcm_timer.c: include pcm_local.h and remove some extraneous tabs |
| Message-ID | <tMMzw-677-21@gated-at.bofh.it> |
| In reply to | #1653055 |
On Tue, 2017-05-30 at 10:58 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> We need to include pcm_local.h to clean up some smatch warnings:
>
> symbol 'snd_pcm_timer_done' was not declared. Should it be static?
> symbol 'snd_pcm_timer_init' was not declared. Should it be static?
> symbol 'snd_pcm_timer_resolution_change' was not declared. Should
> it be static?
>
> Also remove some extraneous tabs on empty lines.
Thanks. trivia:
> diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c
[]
> @@ -33,7 +35,7 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream)
> {
> unsigned long rate, mult, fsize, l, post;
> struct snd_pcm_runtime *runtime = substream->runtime;
> -
> +
> mult = 1000000000;
> rate = runtime->rate;
Maybe fix the mult indentation too?
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web