All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>,
	Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
	Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Subject: Applied "ASoC: da7210: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
Date: Wed, 05 Aug 2015 13:31:48 +0100	[thread overview]
Message-ID: <E1ZMxrI-00061I-Ao@finisterre> (raw)
In-Reply-To: <1438528810-23498-10-git-send-email-lars@metafoo.de>

The patch

   ASoC: da7210: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE

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 6c1e1bfe22d6dc45384acebe0722d35e89011cc2 Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <lars@metafoo.de>
Date: Sun, 2 Aug 2015 17:19:37 +0200
Subject: [PATCH] ASoC: da7210: Replace TLV_DB_RANGE_HEAD with
 DECLARE_TLV_DB_RANGE

DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/da7210.c | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 21810e5..18ecdf3 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -267,33 +267,29 @@ enum clk_src {
  *
  * Reserved area are considered as "mute".
  */
-static const unsigned int hp_out_tlv[] = {
-	TLV_DB_RANGE_HEAD(2),
+static const DECLARE_TLV_DB_RANGE(hp_out_tlv,
 	0x0, 0x10, TLV_DB_SCALE_ITEM(TLV_DB_GAIN_MUTE, 0, 1),
 	/* -54 dB to +15 dB */
-	0x11, 0x3f, TLV_DB_SCALE_ITEM(-5400, 150, 0),
-};
+	0x11, 0x3f, TLV_DB_SCALE_ITEM(-5400, 150, 0)
+);
 
-static const unsigned int lineout_vol_tlv[] = {
-	TLV_DB_RANGE_HEAD(2),
+static const DECLARE_TLV_DB_RANGE(lineout_vol_tlv,
 	0x0, 0x10, TLV_DB_SCALE_ITEM(TLV_DB_GAIN_MUTE, 0, 1),
 	/* -54dB to 15dB */
 	0x11, 0x3f, TLV_DB_SCALE_ITEM(-5400, 150, 0)
-};
+);
 
-static const unsigned int mono_vol_tlv[] = {
-	TLV_DB_RANGE_HEAD(2),
+static const DECLARE_TLV_DB_RANGE(mono_vol_tlv,
 	0x0, 0x2, TLV_DB_SCALE_ITEM(-1800, 0, 1),
 	/* -18dB to 6dB */
 	0x3, 0x7, TLV_DB_SCALE_ITEM(-1800, 600, 0)
-};
+);
 
-static const unsigned int aux1_vol_tlv[] = {
-	TLV_DB_RANGE_HEAD(2),
+static const DECLARE_TLV_DB_RANGE(aux1_vol_tlv,
 	0x0, 0x10, TLV_DB_SCALE_ITEM(TLV_DB_GAIN_MUTE, 0, 1),
 	/* -48dB to 21dB */
 	0x11, 0x3f, TLV_DB_SCALE_ITEM(-4800, 150, 0)
-};
+);
 
 static const DECLARE_TLV_DB_SCALE(eq_gain_tlv, -1050, 150, 0);
 static const DECLARE_TLV_DB_SCALE(adc_eq_master_gain_tlv, -1800, 600, 1);
-- 
2.1.4

  parent reply	other threads:[~2015-08-05 12:32 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-02 15:19 [PATCH 00/42] ASoC: Replace users of TLV_DB_RANGE_HEAD Lars-Peter Clausen
2015-08-02 15:19 ` [PATCH 01/42] ASoC: 88pm860x: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:32   ` Applied "ASoC: 88pm860x: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 02/42] ASoC: ab8500: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:32   ` Applied "ASoC: ab8500: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 03/42] ASoC: adau1373: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: adau1373: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 04/42] ASoC: alc5623: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: alc5623: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 05/42] ASoC: alc5632: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: alc5632: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 06/42] ASoC: cs42l52: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: cs42l52: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 07/42] ASoC: cs42l56: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: cs42l56: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 08/42] ASoC: cs42l73: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: cs42l73: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 09/42] ASoC: da7210: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-03 14:45   ` Opensource [Adam Thomson]
2015-08-05 12:31   ` Mark Brown [this message]
2015-08-02 15:19 ` [PATCH 10/42] ASoC: da7213: " Lars-Peter Clausen
2015-08-03 14:46   ` Opensource [Adam Thomson]
2015-08-05 12:31   ` Applied "ASoC: da7213: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 11/42] ASoC: da9055: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-03 14:47   ` Opensource [Adam Thomson]
2015-08-05 12:31   ` Applied "ASoC: da9055: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 12/42] ASoC: jz4740: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: jz4740: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 13/42] ASoC: max9768: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: max9768: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 14/42] ASoC: max98088: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: max98088: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 15/42] ASoC: max98090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: max98090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 16/42] ASoC: max98095: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: max98095: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 17/42] ASoC: max9850: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: max9850: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 18/42] ASoC: max9877: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: max9877: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 19/42] ASoC: rt5631: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: rt5631: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 20/42] ASoC: rt5640: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: rt5640: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 21/42] ASoC: rt5645: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: rt5645: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 22/42] ASoC: rt5651: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: rt5651: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 23/42] ASoC: rt5670: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: rt5670: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 24/42] ASoC: rt5677: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: rt5677: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 25/42] ASoC: sgtl5000: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: sgtl5000: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 26/42] ASoC: ssm2602: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: ssm2602: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 27/42] ASoC: tpa6130a2: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-03 13:38   ` Peter Ujfalusi
2015-08-05 12:31   ` Applied "ASoC: tpa6130a2: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 28/42] ASoC: twl4030: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-03 13:38   ` Peter Ujfalusi
2015-08-05 12:31   ` Applied "ASoC: twl4030: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 29/42] ASoC: uda1380: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: uda1380: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 30/42] ASoC: wm8350: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: wm8350: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 31/42] ASoC: wm8400: Don't use range container for TLV with one entry Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: wm8400: Don't use range container for TLV with one entry" to the asoc tree Mark Brown
2015-08-02 15:20 ` [PATCH 32/42] ASoC: wm8737: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: wm8737: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:20 ` [PATCH 33/42] ASoC: wm8753: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: wm8753: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:20 ` [PATCH 34/42] ASoC: wm8961: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:31   ` Applied "ASoC: wm8961: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:20 ` [PATCH 35/42] ASoC: wm8962: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:30   ` Applied "ASoC: wm8962: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:20 ` [PATCH 36/42] ASoC: wm8990: Don't use range container for TLV with one entry Lars-Peter Clausen
2015-08-05 12:30   ` Applied "ASoC: wm8990: Don't use range container for TLV with one entry" to the asoc tree Mark Brown
2015-08-02 15:20 ` [PATCH 37/42] ASoC: wm8991: Don't use range container for TLVs with one entry Lars-Peter Clausen
2015-08-05 12:30   ` Applied "ASoC: wm8991: Don't use range container for TLVs with one entry" to the asoc tree Mark Brown
2015-08-02 15:20 ` [PATCH 38/42] ASoC: wm8993: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:30   ` Applied "ASoC: wm8993: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:20 ` [PATCH 39/42] ASoC: wm9081: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:30   ` Applied "ASoC: wm9081: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:20 ` [PATCH 40/42] ASoC: wm9090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:30   ` Applied "ASoC: wm9090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:20 ` [PATCH 41/42] ASoC: wm9713: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:30   ` Applied "ASoC: wm9713: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:20 ` [PATCH 42/42] ASoC: wm_hubs: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE Lars-Peter Clausen
2015-08-05 12:30   ` Applied "ASoC: wm_hubs: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-03 12:03 ` [PATCH 00/42] ASoC: Replace users of TLV_DB_RANGE_HEAD Brian Austin
2015-08-07  8:26 ` Charles Keepax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1ZMxrI-00061I-Ao@finisterre \
    --to=broonie@kernel.org \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lars@metafoo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.