Re: [alsa-devel] [PATCH] Atmel/alsa: fix some code issues
在 2010年6月7日 下午6:41,Nicolas Ferre nicolas.ferre@atmel.com 写道:
Le 28/05/2010 04:27, Wan ZongShun :
Dear Nicolas,
I am seeing the atmel codes as reference of my alsa driver programming. Finding a few code issues, I make a patch to fix, thanks!
After a brief review, I come back to this
Signed-off-by: Wan ZongShunmcuos.com@gmail.com
sound/soc/atmel/atmel-pcm.c | 2 +- sound/soc/atmel/atmel_ssc_dai.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c index f6b3cc0..c69a8fb 100644 --- a/sound/soc/atmel/atmel-pcm.c +++ b/sound/soc/atmel/atmel-pcm.c @@ -478,7 +478,7 @@ struct snd_soc_platform atmel_soc_platform = { .pcm_free = atmel_pcm_free_dma_buffers, .suspend = atmel_pcm_suspend, .resume = atmel_pcm_resume, -}; +}
Not ok for this. It is a structure declaration: we should keep the ";".
Okay, thanks!
EXPORT_SYMBOL_GPL(atmel_soc_platform);
static int __init atmel_pcm_modinit(void) diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index 0b59806..4c44d13 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c @@ -549,7 +549,6 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, printk(KERN_WARNING "atmel_ssc_dai: unsupported DAI format 0x%x\n", ssc_p->daifmt); return -EINVAL;
- break;
Ok.
} pr_debug("atmel_ssc_hw_params: " "RCMR=%08x RFMR=%08x TCMR=%08x TFMR=%08x\n", @@ -760,7 +759,7 @@ struct snd_soc_dai atmel_ssc_dai[NUM_SSC_DEVICES] = { .private_data = &ssc_info[2], }, #endif -}; +}
Not ok for this either. ditto.
EXPORT_SYMBOL_GPL(atmel_ssc_dai);
static int __init atmel_ssc_modinit(void)
-- Nicolas Ferre
From: Wan ZongShun mcuos.com@gmail.com
Remove break after return, it is not needed.
Signed-off-by: Wan ZongShun mcuos.com@gmail.com Signed-off-by: Nicolas Ferre nicolas.ferre@atmel.com --- sound/soc/atmel/atmel_ssc_dai.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index 0b59806..c85844d 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c @@ -549,7 +549,6 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, printk(KERN_WARNING "atmel_ssc_dai: unsupported DAI format 0x%x\n", ssc_p->daifmt); return -EINVAL; - break; } pr_debug("atmel_ssc_hw_params: " "RCMR=%08x RFMR=%08x TCMR=%08x TFMR=%08x\n",
On Mon, Jun 07, 2010 at 03:03:40PM +0200, Nicolas Ferre wrote:
From: Wan ZongShun mcuos.com@gmail.com
Remove break after return, it is not needed.
Signed-off-by: Wan ZongShun mcuos.com@gmail.com Signed-off-by: Nicolas Ferre nicolas.ferre@atmel.com
Applied, thanks.
participants (3)
-
Mark Brown
-
Nicolas Ferre
-
Wan ZongShun