Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp562865lqp; Wed, 12 Jun 2024 09:25:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVAYzyDZzbkJE/mwGyRxZi52QTer4u1GX06p55VGQuNs4Ogdw/QSI3HH3YOROthispmaWD0Z2K/w758npaPLTHEFcaNriMrKkdJFHEYQ== X-Google-Smtp-Source: AGHT+IE9ZTnkqYW/BiDgRHYyfhGoUai6s5u3L61q1VTqgVs+6cKomuuG8AZiCFbRqSwR8aW5mAQl X-Received: by 2002:a17:906:cb85:b0:a6e:f847:2cd9 with SMTP id a640c23a62f3a-a6f47f6e0ecmr137685266b.21.1718209547608; Wed, 12 Jun 2024 09:25:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718209547; cv=pass; d=google.com; s=arc-20160816; b=HWcI92EA5luuHG2Ov5zQO0iEaP9iGQLf4D2abYxK11Rkc6Cw1JyQkNKdk0Ija4snVO FZbtpXqPHcJDOTak8PHcASYGJIs7UcamO0Q1hZDJFmTW/Diwoj8qdI/0XGQC/bu6YREA rH1KnoCtqTXtbQv4lnFDxH7J3DLFWafn9h7H7AaVPo8Mj6G/2Ooyxq0AOIQPpFe6mc4L /qntJr7QFYg862KNl6c55wMBPKmy3mfjrQMJ7SLYK5K4Abko/RAYQMjPb/kRN6NgNSFT MjO5jWjcAVQk7gZtSNISkYx/P6BPwKSb93yvo9vqtqQalCKX0GJz1dvR3KEw9SDcZJn+ 0mKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=m1ANCcJt2zk9p6VuqBRwi7LO5EhRrUpz8kaigFnpgMY=; fh=xOuorZCsv85gEW0vLw232ri/qPOfufySdHAE9ZeKC4U=; b=mYgArQlI9NCjoWna3L9Jvi3w0VUUJcHoJ+1yxXDdw7ox+R6l1/cJD78tXAePDe9shf htzz/9wqaxBnnLfRrbRE024LD533OIbuqvAwDKfW4pVZ9iq4UzOANc8Yv1hErlcJknKA +QmKrm8a1xX4dNE8AOJBoA4do/EdsP/Dic72kK/V8kX3KAWBqi5fMcAH8mYC2a0YBuiy 5hc6QQyUVmu6wgPyy/omkGKG6tuE2RNcybuw4sLNKWDaEQYcSTAFWVT3atcAibs4S4zx 4QHyrBHCyBmvGPL+s61rJRNE61yVJxZGy80lhGPp4xsWgteViSuZyQeGQ4c4WXxz6zGY Ri2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ls+p5WWI; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-211908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211908-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f1c69b174si338429066b.483.2024.06.12.09.25.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:25:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ls+p5WWI; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-211908-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211908-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 227631F22887 for ; Wed, 12 Jun 2024 16:25:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9037181303; Wed, 12 Jun 2024 16:25:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Ls+p5WWI" Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B16017DE35 for ; Wed, 12 Jun 2024 16:25:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718209539; cv=none; b=IgD2tXrvgdECt8MHY9t3bwZPOub3C9QQeKCAspicLCKk2ambV4EJp3Qqt4k8O/+jRbGCpIVPx88cLx1SJx2LVRMKZ/3Uc2s6epObjy1fE8xdORufIWklETGsVEa8kjohpQvmsPAjrlcHDXH7IiHmjA3aU9M7iMKJ+vtDmX0smMc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718209539; c=relaxed/simple; bh=FT83dq8fnS6WPxhKs0Oumh8BckGwGE03RYf9ON83b5A=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=E5ZM53qALjkeGdftkOqbKramDcf2TRv//kXFQ2YchOiojc+Ulxmr32kYepFubWXJsHYrOSGSibSzidmIekkb7MGL1H6rIJ6uYejaZVRMgrsP1cxZ4e53Tqy4xLi8RlLOmfdEXSN/joxDunjpjYTXaWUBquS/1Q+BkGwOOlTrWPw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Ls+p5WWI; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-35f24fabb81so57092f8f.3 for ; Wed, 12 Jun 2024 09:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718209535; x=1718814335; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=m1ANCcJt2zk9p6VuqBRwi7LO5EhRrUpz8kaigFnpgMY=; b=Ls+p5WWIEMMEfRZ7TnDNbz/yPoy6Zh+xqE/8g1qxxbXSZfBmJcCrV2w9in65JNKBWZ SXAuh6LxkEtiH3dJ6yKZdnFTfTBIeK8O7I5JAWkKUZW4jFAaMfNolpEm6XpELNcrZ4Zv mjctOcuR/pv6Ercyh4kRoPMaUX3+ZDArb/wb71/ylmW2AneQl6yjyH6IVgZ2eq0+k68T Xzft5YK+e4XqnAa0AMaTrOTbEewDX8txz7PLmCtbNNVtx2NMgrwP4vchgMHf/JLSl9K+ NUjFfn0G/2L30KHtzS+L8gPKhAs0wow96spedNrNGARloLaQ+cz7Z5iU1kTw78+A2r3k WHNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718209535; x=1718814335; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=m1ANCcJt2zk9p6VuqBRwi7LO5EhRrUpz8kaigFnpgMY=; b=VFPDOvTRql0CX09uPnaxltigz1W+9bQV0TjnEOtbUemw80nMoaaNUtOBrUlIS8V93H Pj4oyNH7V8V2U6Gv6ylOSRsK+d0IuEL0OH5jzrqn3GnKSDlbh9i+ZvHPdtfoJkju/zKR B3YHSmOkYStinxLj1CgeHAdHv9esbOHCVpWXMLWRt/GuaCRJiqLvq2N/JaBcmM7QMe8N 2mUFVYCdjbZtPW2IfH8mEdBMNXMZPl7z/W47xm2louEwEI1po94FyuHl7z/2mHo8tfPx FGZ6aeQ3NyOWweA3eVS5ymFpbe8P4H+MjsO5U1lVILQvs1zv5xJUU2Ul+u/AkoWq4Zqm VJQw== X-Forwarded-Encrypted: i=1; AJvYcCV0pMApj25q1fLLG27QjGXIbIl/H03aefuoUlpbwBliEiFJi0hhkjydpTFPWw+Ouzfi0JEq6VXtJStE1qUmCYGkY/vGiG1VWNyN60vB X-Gm-Message-State: AOJu0YwfOtKargchlyNv8y/+YVM+E6wK8zmEJUeknu3dxgzHPWRrBoQ4 IQMZd3n45WQ/zTf1pskGRqnYnrBGwx2HNahruwPH98zwH80iqhKIBUJ/MvW3L78= X-Received: by 2002:a5d:6982:0:b0:35f:159e:5ec2 with SMTP id ffacd0b85a97d-35fe1c0a096mr1403952f8f.39.1718209535199; Wed, 12 Jun 2024 09:25:35 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:30bd:bf21:eed1:8aeb? ([2a01:e0a:982:cbb0:30bd:bf21:eed1:8aeb]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35f2a73fb13sm5968484f8f.105.2024.06.12.09.25.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Jun 2024 09:25:34 -0700 (PDT) Message-ID: Date: Wed, 12 Jun 2024 18:25:33 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: neil.armstrong@linaro.org Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH 20/23] ASoC: codecs: wcd939x: Constify static data To: Krzysztof Kozlowski , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240612-asoc-wcd9xxx-wide-cleanups-v1-0-0d15885b2a06@linaro.org> <20240612-asoc-wcd9xxx-wide-cleanups-v1-20-0d15885b2a06@linaro.org> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk Q5wSAh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BIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: <20240612-asoc-wcd9xxx-wide-cleanups-v1-20-0d15885b2a06@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 > --- > 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