Linux Sound subsystem development
 help / color / mirror / Atom feed
From: neil.armstrong@linaro.org
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Banajit Goswami <bgoswami@quicinc.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 20/23] ASoC: codecs: wcd939x: Constify static data
Date: Wed, 12 Jun 2024 18:25:33 +0200	[thread overview]
Message-ID: <ce7eaacc-c5f8-479a-b4f5-9f83515e47d1@linaro.org> (raw)
In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-20-0d15885b2a06@linaro.org>

On 12/06/2024 18:15, Krzysztof Kozlowski wrote:
> Driver does not modify few static data (MBHC reg fields, IRQ chip), so
> make them const for code safety.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>   sound/soc/codecs/wcd939x.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/codecs/wcd939x.c b/sound/soc/codecs/wcd939x.c
> index 72d8a6a35052..1f94f49f9829 100644
> --- a/sound/soc/codecs/wcd939x.c
> +++ b/sound/soc/codecs/wcd939x.c
> @@ -220,7 +220,7 @@ static const SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(ear_pa_gain, 600, -1800);
>   static const DECLARE_TLV_DB_SCALE(line_gain, 0, 7, 1);
>   static const DECLARE_TLV_DB_SCALE(analog_gain, 0, 25, 1);
>   
> -static struct wcd_mbhc_field wcd_mbhc_fields[WCD_MBHC_REG_FUNC_MAX] = {
> +static const struct wcd_mbhc_field wcd_mbhc_fields[WCD_MBHC_REG_FUNC_MAX] = {
>   	WCD_MBHC_FIELD(WCD_MBHC_L_DET_EN, WCD939X_ANA_MBHC_MECH, 0x80),
>   	WCD_MBHC_FIELD(WCD_MBHC_GND_DET_EN, WCD939X_ANA_MBHC_MECH, 0x40),
>   	WCD_MBHC_FIELD(WCD_MBHC_MECH_DETECTION_TYPE, WCD939X_ANA_MBHC_MECH, 0x20),
> @@ -291,7 +291,7 @@ static const struct regmap_irq wcd939x_irqs[WCD939X_NUM_IRQS] = {
>   	REGMAP_IRQ_REG(WCD939X_IRQ_HPHR_SURGE_DET_INT, 2, 0x08),
>   };
>   
> -static struct regmap_irq_chip wcd939x_regmap_irq_chip = {
> +static const struct regmap_irq_chip wcd939x_regmap_irq_chip = {
>   	.name = "wcd939x",
>   	.irqs = wcd939x_irqs,
>   	.num_irqs = ARRAY_SIZE(wcd939x_irqs),
> @@ -2957,7 +2957,7 @@ static irqreturn_t wcd939x_wd_handle_irq(int irq, void *data)
>    *     \- regmap_irq_thread()
>    *         \- handle_nested_irq(i)
>    */
> -static struct irq_chip wcd_irq_chip = {
> +static const struct irq_chip wcd_irq_chip = {
>   	.name = "WCD939x",
>   };
>   
> 

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

  reply	other threads:[~2024-06-12 16:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 16:15 [PATCH 00/23] ASoC: codecs: wcd family: cleanups Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 01/23] ASoC: codecs: wcd-mbhc: Constify passed MBHC reg fields Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 02/23] ASoC: codecs: wcd9335: Drop unused state container fields Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 03/23] ASoC: codecs: wcd9335: Constify static data Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 04/23] ASoC: codecs: wcd9335: Handle nicer probe deferral and simplify with dev_err_probe() Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 05/23] ASoC: codecs: wcd9335: Drop unneeded error message Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 06/23] ASoC: codecs: wcd9335: Drop unused dmic rate handling Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 07/23] ASoC: codecs: wcd934x: Drop unused interp path enum Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 08/23] ASoC: codecs: wcd934x: Constify static data Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 09/23] ASoC: codecs: wcd934x: Drop unused mic bias voltage fields Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 10/23] ASoC: codecs: wcd934x: Handle nicer probe deferral and simplify with dev_err_probe() Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 11/23] ASoC: codecs: wcd937x: Constify static data Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 12/23] ASoC: codecs: wcd937x: Constify wcd937x_sdw_ch_info Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 13/23] ASoC: codecs: wcd937x: Drop unused enums, defines and types Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 14/23] ASoC: codecs: wcd937x: Drop unused state container fields Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 15/23] ASoC: codecs: wcd937x: Drop unused chipid member Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 16/23] ASoC: codecs: wcd938x: Constify static data Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 17/23] ASoC: codecs: wcd938x: Constify wcd938x_sdw_ch_info Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 18/23] ASoC: codecs: wcd938x: Drop unused RX/TX direction enum Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 19/23] ASoC: codecs: wcd938x: Drop unused num_ports field Krzysztof Kozlowski
2024-06-12 16:15 ` [PATCH 20/23] ASoC: codecs: wcd939x: Constify static data Krzysztof Kozlowski
2024-06-12 16:25   ` neil.armstrong [this message]
2024-06-12 16:15 ` [PATCH 21/23] ASoC: codecs: wcd939x: Constify wcd939x_sdw_ch_info Krzysztof Kozlowski
2024-06-12 16:25   ` neil.armstrong
2024-06-12 16:15 ` [PATCH 22/23] ASoC: codecs: wcd939x: Drop unused RX/TX direction enum Krzysztof Kozlowski
2024-06-12 16:25   ` neil.armstrong
2024-06-12 16:15 ` [PATCH 23/23] ASoC: codecs: wcd939x: Drop unused num_ports field Krzysztof Kozlowski
2024-06-12 16:26   ` neil.armstrong
2024-06-23 17:21 ` [PATCH 00/23] ASoC: codecs: wcd family: cleanups Mark Brown

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=ce7eaacc-c5f8-479a-b4f5-9f83515e47d1@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@quicinc.com \
    --cc=broonie@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox