All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>, Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Subject: Applied "ASoC: max98095: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
Date: Wed, 05 Aug 2015 13:31:34 +0100	[thread overview]
Message-ID: <E1ZMxr4-0005y1-Pg@finisterre> (raw)
In-Reply-To: <1438528810-23498-17-git-send-email-lars@metafoo.de>

The patch

   ASoC: max98095: 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 54c2011f5a7c31ec4e2ddb8694b559e29673941e Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <lars@metafoo.de>
Date: Sun, 2 Aug 2015 17:19:44 +0200
Subject: [PATCH] ASoC: max98095: 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>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/max98095.c | 35 +++++++++++++++--------------------
 1 file changed, 15 insertions(+), 20 deletions(-)

diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 9a46d3d..78e4b5a 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -661,48 +661,43 @@ static int max98095_mic2pre_get(struct snd_kcontrol *kcontrol,
 	return 0;
 }
 
-static const unsigned int max98095_micboost_tlv[] = {
-	TLV_DB_RANGE_HEAD(2),
+static const DECLARE_TLV_DB_RANGE(max98095_micboost_tlv,
 	0, 1, TLV_DB_SCALE_ITEM(0, 2000, 0),
-	2, 2, TLV_DB_SCALE_ITEM(3000, 0, 0),
-};
+	2, 2, TLV_DB_SCALE_ITEM(3000, 0, 0)
+);
 
 static const DECLARE_TLV_DB_SCALE(max98095_mic_tlv, 0, 100, 0);
 static const DECLARE_TLV_DB_SCALE(max98095_adc_tlv, -1200, 100, 0);
 static const DECLARE_TLV_DB_SCALE(max98095_adcboost_tlv, 0, 600, 0);
 
-static const unsigned int max98095_hp_tlv[] = {
-	TLV_DB_RANGE_HEAD(5),
+static const DECLARE_TLV_DB_RANGE(max98095_hp_tlv,
 	0, 6, TLV_DB_SCALE_ITEM(-6700, 400, 0),
 	7, 14, TLV_DB_SCALE_ITEM(-4000, 300, 0),
 	15, 21, TLV_DB_SCALE_ITEM(-1700, 200, 0),
 	22, 27, TLV_DB_SCALE_ITEM(-400, 100, 0),
-	28, 31, TLV_DB_SCALE_ITEM(150, 50, 0),
-};
+	28, 31, TLV_DB_SCALE_ITEM(150, 50, 0)
+);
 
-static const unsigned int max98095_spk_tlv[] = {
-	TLV_DB_RANGE_HEAD(4),
+static const DECLARE_TLV_DB_RANGE(max98095_spk_tlv,
 	0, 10, TLV_DB_SCALE_ITEM(-5900, 400, 0),
 	11, 18, TLV_DB_SCALE_ITEM(-1700, 200, 0),
 	19, 27, TLV_DB_SCALE_ITEM(-200, 100, 0),
-	28, 39, TLV_DB_SCALE_ITEM(650, 50, 0),
-};
+	28, 39, TLV_DB_SCALE_ITEM(650, 50, 0)
+);
 
-static const unsigned int max98095_rcv_lout_tlv[] = {
-	TLV_DB_RANGE_HEAD(5),
+static const DECLARE_TLV_DB_RANGE(max98095_rcv_lout_tlv,
 	0, 6, TLV_DB_SCALE_ITEM(-6200, 400, 0),
 	7, 14, TLV_DB_SCALE_ITEM(-3500, 300, 0),
 	15, 21, TLV_DB_SCALE_ITEM(-1200, 200, 0),
 	22, 27, TLV_DB_SCALE_ITEM(100, 100, 0),
-	28, 31, TLV_DB_SCALE_ITEM(650, 50, 0),
-};
+	28, 31, TLV_DB_SCALE_ITEM(650, 50, 0)
+);
 
-static const unsigned int max98095_lin_tlv[] = {
-	TLV_DB_RANGE_HEAD(3),
+static const DECLARE_TLV_DB_RANGE(max98095_lin_tlv,
 	0, 2, TLV_DB_SCALE_ITEM(-600, 300, 0),
 	3, 3, TLV_DB_SCALE_ITEM(300, 1100, 0),
-	4, 5, TLV_DB_SCALE_ITEM(1400, 600, 0),
-};
+	4, 5, TLV_DB_SCALE_ITEM(1400, 600, 0)
+);
 
 static const struct snd_kcontrol_new max98095_snd_controls[] = {
 
-- 
2.1.4

  reply	other threads:[~2015-08-05 12:31 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   ` Applied "ASoC: da7210: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree Mark Brown
2015-08-02 15:19 ` [PATCH 10/42] ASoC: da7213: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE 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   ` Mark Brown [this message]
2015-08-02 15:19 ` [PATCH 17/42] ASoC: max9850: " 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=E1ZMxr4-0005y1-Pg@finisterre \
    --to=broonie@kernel.org \
    --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.