[alsa-devel] [PATCH 0/2] ASoC: rsnd: tidyup semantics of rsnd_src/ssi_record_error()
Hi Mark
These patches fixup semantics of rsnd_src_record_error() / rsnd_ssi_record_error() to be more understandable code
Kuninori Morimoto (2): ASoC: rsnd: tidyup semantics of rsnd_src_record_error() ASoC: rsnd: tidyup semantics of rsnd_ssi_record_error()
sound/soc/sh/rcar/src.c | 12 +++++------- sound/soc/sh/rcar/ssi.c | 7 ++----- 2 files changed, 7 insertions(+), 12 deletions(-)
Subject: [PATCH 0/13] ASoC: rsnd: remove SRC Gen1 and platform boot support Date: Tue, 10 Nov 2015 14:03:14 +0900
Hi Mark
These patches fixup semantics of rsnd_src_record_error() / rsnd_ssi_record_error() to be more understandable code
Kuninori Morimoto (2): ASoC: rsnd: tidyup semantics of rsnd_src_record_error() ASoC: rsnd: tidyup semantics of rsnd_ssi_record_error()
These are based on my previous this patch-set
Subject: [PATCH 0/13] ASoC: rsnd: remove SRC Gen1 and platform boot support Date: Tue, 10 Nov 2015 14:03:14 +0900
Best regards --- Kuninori Morimoto
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
rsnd_src_error_record() should recorde error, but it clears error too. this patch fixes up semantic of rsnd_src_error_record that it records error but doesn't clear error. Otherwise code is confusable.
And this patch renames rsnd_src_error_clear() to rsnd_src_status_clear() rsnd_src_error_record() to rsnd_src_record_error()
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/sh/rcar/src.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index c103aa7..4dbdcd8 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -300,7 +300,7 @@ static void rsnd_src_irq_ctrol(struct rsnd_mod *mod, int enable) rsnd_mod_bset(mod, SCU_SYS_INT_EN1, sys_int_mask, sys_int_val); }
-static void rsnd_src_error_clear(struct rsnd_mod *mod) +static void rsnd_src_status_clear(struct rsnd_mod *mod) { u32 val = OUF_SRC(rsnd_mod_id(mod));
@@ -308,7 +308,7 @@ static void rsnd_src_error_clear(struct rsnd_mod *mod) rsnd_mod_bset(mod, SCU_SYS_STATUS1, val, val); }
-static bool rsnd_src_error_record(struct rsnd_mod *mod) +static bool rsnd_src_record_error(struct rsnd_mod *mod) { struct rsnd_src *src = rsnd_mod_to_src(mod); u32 val0, val1; @@ -332,9 +332,6 @@ static bool rsnd_src_error_record(struct rsnd_mod *mod) ret = true; }
- /* clear error static */ - rsnd_src_error_clear(mod); - return ret; }
@@ -383,7 +380,7 @@ static int rsnd_src_init(struct rsnd_mod *mod,
rsnd_src_set_convert_rate(io, mod);
- rsnd_src_error_clear(mod); + rsnd_src_status_clear(mod);
rsnd_src_irq_enable(mod);
@@ -434,7 +431,7 @@ static void __rsnd_src_interrupt(struct rsnd_mod *mod, if (!rsnd_io_is_working(io)) goto rsnd_src_interrupt_out;
- if (rsnd_src_error_record(mod)) { + if (rsnd_src_record_error(mod)) {
dev_dbg(dev, "%s[%d] restart\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); @@ -450,6 +447,7 @@ static void __rsnd_src_interrupt(struct rsnd_mod *mod, rsnd_mod_name(mod), rsnd_mod_id(mod)); }
+ rsnd_src_status_clear(mod); rsnd_src_interrupt_out: spin_unlock(&priv->lock); }
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
rsnd_ssi_record_error() should recorde error, but it clears error too. this patch fixes up semantic of rsnd_ssi_record_error that it records error but doesn't clear error. Otherwise code is confusable.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/sh/rcar/ssi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index dd693c0..5b97ae8 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -395,13 +395,9 @@ static u32 rsnd_ssi_record_error(struct rsnd_ssi *ssi) u32 status = rsnd_ssi_status_get(mod);
/* under/over flow error */ - if (status & (UIRQ | OIRQ)) { + if (status & (UIRQ | OIRQ)) ssi->err++;
- /* clear error status */ - rsnd_ssi_status_clear(mod); - } - return status; }
@@ -536,6 +532,7 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod, rsnd_mod_name(mod), rsnd_mod_id(mod)); }
+ rsnd_ssi_status_clear(mod); rsnd_ssi_interrupt_out: spin_unlock(&priv->lock);
The patch
ASoC: rsnd: tidyup semantics of rsnd_ssi_record_error()
has been applied to the asoc tree at
git://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 5342dff23263933060d0485cece864f36c0b5d32 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com Date: Thu, 26 Nov 2015 11:13:40 +0000 Subject: [PATCH] ASoC: rsnd: tidyup semantics of rsnd_ssi_record_error()
rsnd_ssi_record_error() should recorde error, but it clears error too. this patch fixes up semantic of rsnd_ssi_record_error that it records error but doesn't clear error.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/sh/rcar/ssi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 0fe5e3068b6b..40d5b587cbe9 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -396,13 +396,9 @@ static u32 rsnd_ssi_record_error(struct rsnd_ssi *ssi) u32 status = rsnd_ssi_status_get(mod);
/* under/over flow error */ - if (status & (UIRQ | OIRQ)) { + if (status & (UIRQ | OIRQ)) ssi->err++;
- /* clear error status */ - rsnd_ssi_status_clear(mod); - } - return status; }
@@ -537,6 +533,7 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod, rsnd_mod_name(mod), rsnd_mod_id(mod)); }
+ rsnd_ssi_status_clear(mod); rsnd_ssi_interrupt_out: spin_unlock(&priv->lock);
participants (2)
-
Kuninori Morimoto
-
Mark Brown