Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1474101 > unrolled thread

[PATCH] ASoC: omap-pcm: off-by-one in 'omap_pcm_limit_supported_formats'

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2016-09-01 09:00 +0200
Last post2016-09-01 09:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ASoC: omap-pcm: off-by-one in 'omap_pcm_limit_supported_formats' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-09-01 09:00 +0200
    Re: [PATCH] ASoC: omap-pcm: off-by-one in  'omap_pcm_limit_supported_formats' Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-09-01 09:10 +0200

#1474101 — [PATCH] ASoC: omap-pcm: off-by-one in 'omap_pcm_limit_supported_formats'

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2016-09-01 09:00 +0200
Subject[PATCH] ASoC: omap-pcm: off-by-one in 'omap_pcm_limit_supported_formats'
Message-ID<scu8F-5sK-21@gated-at.bofh.it>
When calling 'snd_pcm_format_physical_width', SNDRV_PCM_FORMAT_LAST is a
valid value, so don't skip it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Un-tested
---
 sound/soc/omap/omap-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index a84f677234f0..94e9ff791f3a 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -58,7 +58,7 @@ static void omap_pcm_limit_supported_formats(void)
 {
 	int i;
 
-	for (i = 0; i < SNDRV_PCM_FORMAT_LAST; i++) {
+	for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) {
 		switch (snd_pcm_format_physical_width(i)) {
 		case 8:
 		case 16:
-- 
2.7.4

[toc] | [next] | [standalone]


#1474113 — Re: [PATCH] ASoC: omap-pcm: off-by-one in 'omap_pcm_limit_supported_formats'

FromPeter Ujfalusi <peter.ujfalusi@ti.com>
Date2016-09-01 09:10 +0200
SubjectRe: [PATCH] ASoC: omap-pcm: off-by-one in 'omap_pcm_limit_supported_formats'
Message-ID<scuin-5Pb-51@gated-at.bofh.it>
In reply to#1474101
On 09/01/16 09:52, Christophe JAILLET wrote:
> When calling 'snd_pcm_format_physical_width', SNDRV_PCM_FORMAT_LAST is a
> valid value, so don't skip it.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Un-tested
> ---
>  sound/soc/omap/omap-pcm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
> index a84f677234f0..94e9ff791f3a 100644
> --- a/sound/soc/omap/omap-pcm.c
> +++ b/sound/soc/omap/omap-pcm.c
> @@ -58,7 +58,7 @@ static void omap_pcm_limit_supported_formats(void)
>  {
>  	int i;
>  
> -	for (i = 0; i < SNDRV_PCM_FORMAT_LAST; i++) {
> +	for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) {
>  		switch (snd_pcm_format_physical_width(i)) {
>  		case 8:
>  		case 16:
> 


-- 
Péter

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web