All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
@ 2019-04-17 15:09 ` Yue Haibing
  0 siblings, 0 replies; 17+ messages in thread
From: Yue Haibing @ 2019-04-17 15:09 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee, festevam, lgirdwood, broonie,
	perex, tiwai
  Cc: linux-kernel, linuxppc-dev, alsa-devel, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

Fixes gcc '-Wunused-but-set-variable' warning:

sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]

It is never used since introduction in
commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 sound/soc/fsl/fsl_micfil.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 40c07e7..f7f2d29 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
 {
 	u32 ctrl2_reg;
 	long mclk_rate;
-	int osr;
 	int clk_div;
 
 	regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
-	osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
-		    >> MICFIL_CTRL2_CICOSR_SHIFT);
 
 	mclk_rate = clk_get_rate(micfil->mclk);
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
@ 2019-04-17 15:09 ` Yue Haibing
  0 siblings, 0 replies; 17+ messages in thread
From: Yue Haibing @ 2019-04-17 15:09 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee, festevam, lgirdwood, broonie,
	perex, tiwai
  Cc: linux-kernel, linuxppc-dev, alsa-devel, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

Fixes gcc '-Wunused-but-set-variable' warning:

sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]

It is never used since introduction in
commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 sound/soc/fsl/fsl_micfil.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 40c07e7..f7f2d29 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
 {
 	u32 ctrl2_reg;
 	long mclk_rate;
-	int osr;
 	int clk_div;
 
 	regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
-	osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
-		    >> MICFIL_CTRL2_CICOSR_SHIFT);
 
 	mclk_rate = clk_get_rate(micfil->mclk);
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
@ 2019-04-17 15:09 ` Yue Haibing
  0 siblings, 0 replies; 17+ messages in thread
From: Yue Haibing @ 2019-04-17 15:09 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee, festevam, lgirdwood, broonie,
	perex, tiwai
  Cc: YueHaibing, alsa-devel, linuxppc-dev, linux-kernel

From: YueHaibing <yuehaibing@huawei.com>

Fixes gcc '-Wunused-but-set-variable' warning:

sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]

It is never used since introduction in
commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 sound/soc/fsl/fsl_micfil.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 40c07e7..f7f2d29 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
 {
 	u32 ctrl2_reg;
 	long mclk_rate;
-	int osr;
 	int clk_div;
 
 	regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
-	osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
-		    >> MICFIL_CTRL2_CICOSR_SHIFT);
 
 	mclk_rate = clk_get_rate(micfil->mclk);
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
  2019-04-17 15:09 ` Yue Haibing
@ 2019-04-17 15:25   ` Daniel Baluta
  -1 siblings, 0 replies; 17+ messages in thread
From: Daniel Baluta @ 2019-04-17 15:25 UTC (permalink / raw)
  To: Yue Haibing
  Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Fabio Estevam, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Linux Kernel Mailing List, linuxppc-dev, Linux-ALSA,
	Cosmin-Gabriel Samoila

Hi Yue,

Looks good to me. Just one question for Cosmin:

On Wed, Apr 17, 2019 at 6:10 PM Yue Haibing <yuehaibing@huawei.com> wrote:
>
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
> sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]
>
> It is never used since introduction in
> commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  sound/soc/fsl/fsl_micfil.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
> index 40c07e7..f7f2d29 100644
> --- a/sound/soc/fsl/fsl_micfil.c
> +++ b/sound/soc/fsl/fsl_micfil.c
> @@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
>  {
>         u32 ctrl2_reg;
>         long mclk_rate;
> -       int osr;
>         int clk_div;
>
>         regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);

I noticed now that we also read ctrl2_reg without using it. Is this as intended?

> -       osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
> -                   >> MICFIL_CTRL2_CICOSR_SHIFT);
>
>         mclk_rate = clk_get_rate(micfil->mclk);
>
> --
> 2.7.4
>
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
@ 2019-04-17 15:25   ` Daniel Baluta
  0 siblings, 0 replies; 17+ messages in thread
From: Daniel Baluta @ 2019-04-17 15:25 UTC (permalink / raw)
  To: Yue Haibing
  Cc: Linux-ALSA, linuxppc-dev, Timur Tabi, Xiubo Li,
	Linux Kernel Mailing List, Takashi Iwai, Liam Girdwood,
	Jaroslav Kysela, Nicolin Chen, Mark Brown,
	Cosmin-Gabriel Samoila, Fabio Estevam

Hi Yue,

Looks good to me. Just one question for Cosmin:

On Wed, Apr 17, 2019 at 6:10 PM Yue Haibing <yuehaibing@huawei.com> wrote:
>
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
> sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]
>
> It is never used since introduction in
> commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  sound/soc/fsl/fsl_micfil.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
> index 40c07e7..f7f2d29 100644
> --- a/sound/soc/fsl/fsl_micfil.c
> +++ b/sound/soc/fsl/fsl_micfil.c
> @@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
>  {
>         u32 ctrl2_reg;
>         long mclk_rate;
> -       int osr;
>         int clk_div;
>
>         regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);

I noticed now that we also read ctrl2_reg without using it. Is this as intended?

> -       osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
> -                   >> MICFIL_CTRL2_CICOSR_SHIFT);
>
>         mclk_rate = clk_get_rate(micfil->mclk);
>
> --
> 2.7.4
>
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Applied "ASoC: fsl_micfil: Remove set but not used variable 'osr'" to the asoc tree
  2019-04-17 15:09 ` Yue Haibing
  (?)
@ 2019-04-17 16:42   ` Mark Brown
  -1 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2019-04-17 16:42 UTC (permalink / raw)
  To: YueHaibing
  Cc: alsa-devel, broonie, festevam, lgirdwood, linux-kernel,
	linuxppc-dev, Mark Brown, nicoleotsuka, perex, timur, tiwai,
	Xiubo.Lee

The patch

   ASoC: fsl_micfil: Remove set but not used variable 'osr'

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2

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

From fd30e17e4f7a499635bd4e3a5d83534afcaaa9a8 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 17 Apr 2019 23:09:15 +0800
Subject: [PATCH] ASoC: fsl_micfil: Remove set but not used variable 'osr'

Fixes gcc '-Wunused-but-set-variable' warning:

sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]

It is never used since introduction in
commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/fsl/fsl_micfil.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 40c07e756481..f7f2d29f1bfe 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
 {
 	u32 ctrl2_reg;
 	long mclk_rate;
-	int osr;
 	int clk_div;
 
 	regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
-	osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
-		    >> MICFIL_CTRL2_CICOSR_SHIFT);
 
 	mclk_rate = clk_get_rate(micfil->mclk);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Applied "ASoC: fsl_micfil: Remove set but not used variable 'osr'" to the asoc tree
@ 2019-04-17 16:42   ` Mark Brown
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2019-04-17 16:42 UTC (permalink / raw)
  To: YueHaibing
  Cc: alsa-devel, broonie, festevam, lgirdwood, linux-kernel, linuxppc-dev

The patch

   ASoC: fsl_micfil: Remove set but not used variable 'osr'

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2

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

>From fd30e17e4f7a499635bd4e3a5d83534afcaaa9a8 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 17 Apr 2019 23:09:15 +0800
Subject: [PATCH] ASoC: fsl_micfil: Remove set but not used variable 'osr'

Fixes gcc '-Wunused-but-set-variable' warning:

sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]

It is never used since introduction in
commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/fsl/fsl_micfil.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 40c07e756481..f7f2d29f1bfe 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
 {
 	u32 ctrl2_reg;
 	long mclk_rate;
-	int osr;
 	int clk_div;
 
 	regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
-	osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
-		    >> MICFIL_CTRL2_CICOSR_SHIFT);
 
 	mclk_rate = clk_get_rate(micfil->mclk);
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Applied "ASoC: fsl_micfil: Remove set but not used variable 'osr'" to the asoc tree
@ 2019-04-17 16:42   ` Mark Brown
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2019-04-17 16:42 UTC (permalink / raw)
  To: YueHaibing
  Cc: alsa-devel, timur, Xiubo.Lee, festevam, tiwai, lgirdwood,
	linux-kernel, nicoleotsuka, Mark Brown, perex, linuxppc-dev

The patch

   ASoC: fsl_micfil: Remove set but not used variable 'osr'

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2

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

From fd30e17e4f7a499635bd4e3a5d83534afcaaa9a8 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 17 Apr 2019 23:09:15 +0800
Subject: [PATCH] ASoC: fsl_micfil: Remove set but not used variable 'osr'

Fixes gcc '-Wunused-but-set-variable' warning:

sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]

It is never used since introduction in
commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/fsl/fsl_micfil.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 40c07e756481..f7f2d29f1bfe 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
 {
 	u32 ctrl2_reg;
 	long mclk_rate;
-	int osr;
 	int clk_div;
 
 	regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
-	osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
-		    >> MICFIL_CTRL2_CICOSR_SHIFT);
 
 	mclk_rate = clk_get_rate(micfil->mclk);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
  2019-04-17 15:25   ` Daniel Baluta
@ 2019-04-17 18:35     ` Nicolin Chen
  -1 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2019-04-17 18:35 UTC (permalink / raw)
  To: Daniel Baluta, Cosmin-Gabriel Samoila
  Cc: Yue Haibing, Timur Tabi, Xiubo Li, Fabio Estevam, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Linux Kernel Mailing List, linuxppc-dev, Linux-ALSA

On Wed, Apr 17, 2019 at 06:25:11PM +0300, Daniel Baluta wrote:

> Looks good to me. Just one question for Cosmin:

> > diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
> > index 40c07e7..f7f2d29 100644
> > --- a/sound/soc/fsl/fsl_micfil.c
> > +++ b/sound/soc/fsl/fsl_micfil.c
> > @@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
> >  {
> >         u32 ctrl2_reg;
> >         long mclk_rate;
> > -       int osr;
> >         int clk_div;
> >
> >         regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
> 
> I noticed now that we also read ctrl2_reg without using it. Is this as intended?

For Cosmin,

Same question here.

Btw, I just noticed that the initial patch of adding this driver
did not seemly include most of FSL maintainers/reviewers. Please
run get_maintainer.pl to add all listed reviewers when sending a
change to the maillist.

Thanks
Nicolin

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
@ 2019-04-17 18:35     ` Nicolin Chen
  0 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2019-04-17 18:35 UTC (permalink / raw)
  To: Daniel Baluta, Cosmin-Gabriel Samoila
  Cc: Linux-ALSA, linuxppc-dev, Timur Tabi, Xiubo Li,
	Linux Kernel Mailing List, Takashi Iwai, Yue Haibing,
	Liam Girdwood, Jaroslav Kysela, Mark Brown, Fabio Estevam

On Wed, Apr 17, 2019 at 06:25:11PM +0300, Daniel Baluta wrote:

> Looks good to me. Just one question for Cosmin:

> > diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
> > index 40c07e7..f7f2d29 100644
> > --- a/sound/soc/fsl/fsl_micfil.c
> > +++ b/sound/soc/fsl/fsl_micfil.c
> > @@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
> >  {
> >         u32 ctrl2_reg;
> >         long mclk_rate;
> > -       int osr;
> >         int clk_div;
> >
> >         regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
> 
> I noticed now that we also read ctrl2_reg without using it. Is this as intended?

For Cosmin,

Same question here.

Btw, I just noticed that the initial patch of adding this driver
did not seemly include most of FSL maintainers/reviewers. Please
run get_maintainer.pl to add all listed reviewers when sending a
change to the maillist.

Thanks
Nicolin

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
  2019-04-17 18:35     ` Nicolin Chen
@ 2019-04-17 18:58       ` gabrielcsmo
  -1 siblings, 0 replies; 17+ messages in thread
From: gabrielcsmo @ 2019-04-17 18:58 UTC (permalink / raw)
  To: Nicolin Chen, Daniel Baluta
  Cc: Yue Haibing, Timur Tabi, Xiubo Li, Fabio Estevam, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Linux Kernel Mailing List, linuxppc-dev, Linux-ALSA

On Wed, 2019-04-17 at 11:35 -0700, Nicolin Chen wrote:
> On Wed, Apr 17, 2019 at 06:25:11PM +0300, Daniel Baluta wrote:
> 
> > Looks good to me. Just one question for Cosmin:
> > > diff --git a/sound/soc/fsl/fsl_micfil.c
> > > b/sound/soc/fsl/fsl_micfil.c
> > > index 40c07e7..f7f2d29 100644
> > > --- a/sound/soc/fsl/fsl_micfil.c
> > > +++ b/sound/soc/fsl/fsl_micfil.c
> > > @@ -151,12 +151,9 @@ static inline int get_clk_div(struct
> > > fsl_micfil *micfil,
> > >  {
> > >         u32 ctrl2_reg;
> > >         long mclk_rate;
> > > -       int osr;
> > >         int clk_div;
> > > 
> > >         regmap_read(micfil->regmap, REG_MICFIL_CTRL2,
> > > &ctrl2_reg);
> > 
> > I noticed now that we also read ctrl2_reg without using it. Is this
> > as intended?
> 
> For Cosmin,
> 
> Same question here.
> 
> Btw, I just noticed that the initial patch of adding this driver
> did not seemly include most of FSL maintainers/reviewers. Please
> run get_maintainer.pl to add all listed reviewers when sending a
> change to the maillist.
> 
> Thanks
> Nicolin

Hello,

The regmap_read is not used anymore in this implementation and I've
forgot to remove it - it can be safetly removed.

Nicolin, I am pretty sure I've ran the get_maintainer.pl script but
I will pay more attention next time... sorry if I forgot to add you.

Best regards,
Cosmin


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
@ 2019-04-17 18:58       ` gabrielcsmo
  0 siblings, 0 replies; 17+ messages in thread
From: gabrielcsmo @ 2019-04-17 18:58 UTC (permalink / raw)
  To: Nicolin Chen, Daniel Baluta
  Cc: Linux-ALSA, linuxppc-dev, Timur Tabi, Xiubo Li,
	Linux Kernel Mailing List, Takashi Iwai, Yue Haibing,
	Liam Girdwood, Jaroslav Kysela, Mark Brown, Fabio Estevam

On Wed, 2019-04-17 at 11:35 -0700, Nicolin Chen wrote:
> On Wed, Apr 17, 2019 at 06:25:11PM +0300, Daniel Baluta wrote:
> 
> > Looks good to me. Just one question for Cosmin:
> > > diff --git a/sound/soc/fsl/fsl_micfil.c
> > > b/sound/soc/fsl/fsl_micfil.c
> > > index 40c07e7..f7f2d29 100644
> > > --- a/sound/soc/fsl/fsl_micfil.c
> > > +++ b/sound/soc/fsl/fsl_micfil.c
> > > @@ -151,12 +151,9 @@ static inline int get_clk_div(struct
> > > fsl_micfil *micfil,
> > >  {
> > >         u32 ctrl2_reg;
> > >         long mclk_rate;
> > > -       int osr;
> > >         int clk_div;
> > > 
> > >         regmap_read(micfil->regmap, REG_MICFIL_CTRL2,
> > > &ctrl2_reg);
> > 
> > I noticed now that we also read ctrl2_reg without using it. Is this
> > as intended?
> 
> For Cosmin,
> 
> Same question here.
> 
> Btw, I just noticed that the initial patch of adding this driver
> did not seemly include most of FSL maintainers/reviewers. Please
> run get_maintainer.pl to add all listed reviewers when sending a
> change to the maillist.
> 
> Thanks
> Nicolin

Hello,

The regmap_read is not used anymore in this implementation and I've
forgot to remove it - it can be safetly removed.

Nicolin, I am pretty sure I've ran the get_maintainer.pl script but
I will pay more attention next time... sorry if I forgot to add you.

Best regards,
Cosmin


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
  2019-04-17 18:58       ` gabrielcsmo
@ 2019-04-17 19:14         ` Nicolin Chen
  -1 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2019-04-17 19:14 UTC (permalink / raw)
  To: gabrielcsmo
  Cc: Daniel Baluta, Yue Haibing, Timur Tabi, Xiubo Li, Fabio Estevam,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Linux Kernel Mailing List, linuxppc-dev, Linux-ALSA

On Wed, Apr 17, 2019 at 09:58:37PM +0300, gabrielcsmo@gmail.com wrote:

> Nicolin, I am pretty sure I've ran the get_maintainer.pl script but
> I will pay more attention next time... sorry if I forgot to add you.

It's okay for that one as I trust Mark's review anyway. Just
adding us would offload some of his burden, especially for a
device specific change.

Thanks

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'
@ 2019-04-17 19:14         ` Nicolin Chen
  0 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2019-04-17 19:14 UTC (permalink / raw)
  To: gabrielcsmo
  Cc: Daniel Baluta, linuxppc-dev, Timur Tabi, Xiubo Li,
	Linux Kernel Mailing List, Takashi Iwai, Yue Haibing,
	Liam Girdwood, Jaroslav Kysela, Mark Brown, Linux-ALSA,
	Fabio Estevam

On Wed, Apr 17, 2019 at 09:58:37PM +0300, gabrielcsmo@gmail.com wrote:

> Nicolin, I am pretty sure I've ran the get_maintainer.pl script but
> I will pay more attention next time... sorry if I forgot to add you.

It's okay for that one as I trust Mark's review anyway. Just
adding us would offload some of his burden, especially for a
device specific change.

Thanks

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Applied "ASoC: fsl_micfil: Remove set but not used variable 'osr'" to the asoc tree
  2019-04-17 15:09 ` Yue Haibing
  (?)
@ 2019-05-02  2:18   ` Mark Brown
  -1 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2019-05-02  2:18 UTC (permalink / raw)
  To: YueHaibing
  Cc: alsa-devel, broonie, festevam, lgirdwood, linux-kernel,
	linuxppc-dev, Mark Brown, nicoleotsuka, perex, timur, tiwai,
	Xiubo.Lee

The patch

   ASoC: fsl_micfil: Remove set but not used variable 'osr'

has been applied to the asoc tree at

   https://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

From a0c34c7629bee46ffd8121987d27df25a6433cc7 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 17 Apr 2019 23:09:15 +0800
Subject: [PATCH] ASoC: fsl_micfil: Remove set but not used variable 'osr'

Fixes gcc '-Wunused-but-set-variable' warning:

sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]

It is never used since introduction in
commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/fsl/fsl_micfil.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 40c07e756481..f7f2d29f1bfe 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
 {
 	u32 ctrl2_reg;
 	long mclk_rate;
-	int osr;
 	int clk_div;
 
 	regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
-	osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
-		    >> MICFIL_CTRL2_CICOSR_SHIFT);
 
 	mclk_rate = clk_get_rate(micfil->mclk);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Applied "ASoC: fsl_micfil: Remove set but not used variable 'osr'" to the asoc tree
@ 2019-05-02  2:18   ` Mark Brown
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2019-05-02  2:18 UTC (permalink / raw)
  To: YueHaibing
  Cc: alsa-devel, broonie, festevam, lgirdwood, linux-kernel, linuxppc-dev

The patch

   ASoC: fsl_micfil: Remove set but not used variable 'osr'

has been applied to the asoc tree at

   https://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

>From a0c34c7629bee46ffd8121987d27df25a6433cc7 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 17 Apr 2019 23:09:15 +0800
Subject: [PATCH] ASoC: fsl_micfil: Remove set but not used variable 'osr'

Fixes gcc '-Wunused-but-set-variable' warning:

sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]

It is never used since introduction in
commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/fsl/fsl_micfil.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 40c07e756481..f7f2d29f1bfe 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
 {
 	u32 ctrl2_reg;
 	long mclk_rate;
-	int osr;
 	int clk_div;
 
 	regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
-	osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
-		    >> MICFIL_CTRL2_CICOSR_SHIFT);
 
 	mclk_rate = clk_get_rate(micfil->mclk);
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Applied "ASoC: fsl_micfil: Remove set but not used variable 'osr'" to the asoc tree
@ 2019-05-02  2:18   ` Mark Brown
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2019-05-02  2:18 UTC (permalink / raw)
  To: YueHaibing
  Cc: alsa-devel, timur, Xiubo.Lee, festevam, tiwai, lgirdwood,
	linux-kernel, nicoleotsuka, Mark Brown, perex, linuxppc-dev

The patch

   ASoC: fsl_micfil: Remove set but not used variable 'osr'

has been applied to the asoc tree at

   https://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

From a0c34c7629bee46ffd8121987d27df25a6433cc7 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 17 Apr 2019 23:09:15 +0800
Subject: [PATCH] ASoC: fsl_micfil: Remove set but not used variable 'osr'

Fixes gcc '-Wunused-but-set-variable' warning:

sound/soc/fsl/fsl_micfil.c: In function 'get_clk_div':
sound/soc/fsl/fsl_micfil.c:154:6: warning: variable 'osr' set but not used [-Wunused-but-set-variable]

It is never used since introduction in
commit 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/fsl/fsl_micfil.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 40c07e756481..f7f2d29f1bfe 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -151,12 +151,9 @@ static inline int get_clk_div(struct fsl_micfil *micfil,
 {
 	u32 ctrl2_reg;
 	long mclk_rate;
-	int osr;
 	int clk_div;
 
 	regmap_read(micfil->regmap, REG_MICFIL_CTRL2, &ctrl2_reg);
-	osr = 16 - ((ctrl2_reg & MICFIL_CTRL2_CICOSR_MASK)
-		    >> MICFIL_CTRL2_CICOSR_SHIFT);
 
 	mclk_rate = clk_get_rate(micfil->mclk);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-05-02  2:25 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17 15:09 [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr' Yue Haibing
2019-04-17 15:09 ` Yue Haibing
2019-04-17 15:09 ` Yue Haibing
2019-04-17 15:25 ` Daniel Baluta
2019-04-17 15:25   ` Daniel Baluta
2019-04-17 18:35   ` Nicolin Chen
2019-04-17 18:35     ` Nicolin Chen
2019-04-17 18:58     ` gabrielcsmo
2019-04-17 18:58       ` gabrielcsmo
2019-04-17 19:14       ` Nicolin Chen
2019-04-17 19:14         ` Nicolin Chen
2019-04-17 16:42 ` Applied "ASoC: fsl_micfil: Remove set but not used variable 'osr'" to the asoc tree Mark Brown
2019-04-17 16:42   ` Mark Brown
2019-04-17 16:42   ` Mark Brown
2019-05-02  2:18 ` Mark Brown
2019-05-02  2:18   ` Mark Brown
2019-05-02  2:18   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.