From patchwork Wed Feb 24 21:19:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12102813 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B54FC433E0 for ; Wed, 24 Feb 2021 21:21:59 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C9D2964F08 for ; Wed, 24 Feb 2021 21:21:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9D2964F08 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4D3A51686; Wed, 24 Feb 2021 22:21:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4D3A51686 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614201717; bh=VxDBajqe59UilE9eIhMEvf8RiKI6ZylnGsqaNHA61ak=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fwhsHCcBDeputjOGBjmtQDDDuRwIE7hW+GNkY15SpCOSrH4QMRgiLtH0kXMoBRBmP RET0r0ev5CQn2M2QtBTTbx1L9m2itUQZDFKQo91XXJaUE0V+DoVwbR+bEY23x45zF4 h5ZFNAfQH9vQbWkWl5rcjT5V2FWAaIHdBP3NDXzM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 16DCEF802CA; Wed, 24 Feb 2021 22:19:40 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A563BF802E0; Wed, 24 Feb 2021 22:19:38 +0100 (CET) Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A3D9FF80234 for ; Wed, 24 Feb 2021 22:19:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A3D9FF80234 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BRabxy4a" Received: by mail-lf1-x12f.google.com with SMTP id v30so5262799lfq.6 for ; Wed, 24 Feb 2021 13:19:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MM8lRVTEi67ROhOzPrn24FSX21U5wxP/r4L8+ZdPQ2g=; b=BRabxy4aR3qNWGDNKy3hK0gY0gFXnJR0fLQXsES4dfJC3gH+kwao5Y5kiVzz7mRakF BL/3QxzgXoz7JFnZq4pNyIFpAk+SWLkbybNf5e3xUGO6SeVwE4iKZ1DztwkrNp2/cwVH Gj9NVrmH9r8azQvgenXXcjBuNrgx3BM38VjAh8yB7WtmQ59EXqTC6AxLm62G4LVrNILf tpA28ESjBlIyORjEa8kjG0GbpbMBirxhMV4Jgbu396lfDszujOSHPC5IJXhCva4i66fx sb8HACSVmFO5AK++R+3h/FcevUKkA0/y+K3tkJwFEJsQTswYmAGA1Ev2bchlhrp5cSrX zoxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MM8lRVTEi67ROhOzPrn24FSX21U5wxP/r4L8+ZdPQ2g=; b=Ajn/gMkYZanKrRV3sHP+8Aw6iMflwwP/yOdqueTt57pYX3aHbDSNi9KGvKXk8KmP+s WW4W+MQ+eXlnH/Qh7poRG56RKTAFW+P8MHwaWws+dYMacMHBve035n68j6DaaQk02ZFH ZWI2ntKuvDNarrAOh94GP/AXqD3KUZVNFOUNnuZT5YU6oagG0KM7hydIU1e3bhbQXh9A Ju2RWKQpuLeUmnY4HU4wVYsfktDTyQkU/DUBbUhR/wny1rWwIyd5mDIUvJuG7OLm86Ad +cCM3X2eRiBmtSe2nNMxi8O3XFuAlOMgQzQ8/14leSi8TajbDYlcs9S2oYPsTEp2lzHG 7+CQ== X-Gm-Message-State: AOAM531tNfauZ1GchTRodUR155mzdBXWbkxFoHYQPVJsEaMF4KrkdMT1 g/SdbcVIIgnmp+s7XghQzRQ= X-Google-Smtp-Source: ABdhPJwyFbVVquaVbhPQJW6vmosdTHqeGskZgmaphUjB0Q2E3UAyaegpCAeQfUF4bdAJshkYrdBxxA== X-Received: by 2002:a19:f60c:: with SMTP id x12mr11290410lfe.156.1614201566034; Wed, 24 Feb 2021 13:19:26 -0800 (PST) Received: from localhost.localdomain (h-98-128-229-129.NA.cust.bahnhof.se. [98.128.229.129]) by smtp.gmail.com with ESMTPSA id w26sm717116lfr.186.2021.02.24.13.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 13:19:25 -0800 (PST) From: Rikard Falkeborn To: Oder Chiou , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 1/4] ASoC: rt*: Constify static struct sdw_slave_ops Date: Wed, 24 Feb 2021 22:19:15 +0100 Message-Id: <20210224211918.39109-2-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210224211918.39109-1-rikard.falkeborn@gmail.com> References: <20210224211918.39109-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Liam Girdwood , Rikard Falkeborn , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The only usage of these is to assign their address to the ops field in the sdw_driver struct, which is a pointer to const. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- sound/soc/codecs/rt1308-sdw.c | 2 +- sound/soc/codecs/rt5682-sdw.c | 2 +- sound/soc/codecs/rt700-sdw.c | 2 +- sound/soc/codecs/rt711-sdw.c | 2 +- sound/soc/codecs/rt715-sdw.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c index afd2c3b687cc..1c226994aebd 100644 --- a/sound/soc/codecs/rt1308-sdw.c +++ b/sound/soc/codecs/rt1308-sdw.c @@ -594,7 +594,7 @@ static int rt1308_sdw_pcm_hw_free(struct snd_pcm_substream *substream, * slave_ops: callbacks for get_clock_stop_mode, clock_stop and * port_prep are not defined for now */ -static struct sdw_slave_ops rt1308_slave_ops = { +static const struct sdw_slave_ops rt1308_slave_ops = { .read_prop = rt1308_read_prop, .interrupt_callback = rt1308_interrupt_callback, .update_status = rt1308_update_status, diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c index b49f1e16125d..0b7ac74e671d 100644 --- a/sound/soc/codecs/rt5682-sdw.c +++ b/sound/soc/codecs/rt5682-sdw.c @@ -683,7 +683,7 @@ static int rt5682_interrupt_callback(struct sdw_slave *slave, return 0; } -static struct sdw_slave_ops rt5682_slave_ops = { +static const struct sdw_slave_ops rt5682_slave_ops = { .read_prop = rt5682_read_prop, .interrupt_callback = rt5682_interrupt_callback, .update_status = rt5682_update_status, diff --git a/sound/soc/codecs/rt700-sdw.c b/sound/soc/codecs/rt700-sdw.c index 4001612dfd73..ff9c081fd52a 100644 --- a/sound/soc/codecs/rt700-sdw.c +++ b/sound/soc/codecs/rt700-sdw.c @@ -430,7 +430,7 @@ static int rt700_interrupt_callback(struct sdw_slave *slave, * slave_ops: callbacks for get_clock_stop_mode, clock_stop and * port_prep are not defined for now */ -static struct sdw_slave_ops rt700_slave_ops = { +static const struct sdw_slave_ops rt700_slave_ops = { .read_prop = rt700_read_prop, .interrupt_callback = rt700_interrupt_callback, .update_status = rt700_update_status, diff --git a/sound/soc/codecs/rt711-sdw.c b/sound/soc/codecs/rt711-sdw.c index 2beb4286d997..8f5ebe92d407 100644 --- a/sound/soc/codecs/rt711-sdw.c +++ b/sound/soc/codecs/rt711-sdw.c @@ -431,7 +431,7 @@ static int rt711_interrupt_callback(struct sdw_slave *slave, return 0; } -static struct sdw_slave_ops rt711_slave_ops = { +static const struct sdw_slave_ops rt711_slave_ops = { .read_prop = rt711_read_prop, .interrupt_callback = rt711_interrupt_callback, .update_status = rt711_update_status, diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c index 71dd3b97a459..81a1dd77b6f6 100644 --- a/sound/soc/codecs/rt715-sdw.c +++ b/sound/soc/codecs/rt715-sdw.c @@ -488,7 +488,7 @@ static int rt715_bus_config(struct sdw_slave *slave, return 0; } -static struct sdw_slave_ops rt715_slave_ops = { +static const struct sdw_slave_ops rt715_slave_ops = { .read_prop = rt715_read_prop, .update_status = rt715_update_status, .bus_config = rt715_bus_config, From patchwork Wed Feb 24 21:19:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12102815 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E59AC433DB for ; Wed, 24 Feb 2021 21:22:09 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78F8764F08 for ; Wed, 24 Feb 2021 21:22:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78F8764F08 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D7C80168C; Wed, 24 Feb 2021 22:21:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D7C80168C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614201726; bh=0i/88gbKn648dwprC9gVIJ1ExR43WHmwy+Dau0BKQWQ=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rg4dgT3xJk/ivq7AWzSfd6kGrbgD3L66GozVVOxwGLMC41U1BSy8rBjeHDJe+mIqv cjR25twEt2V8Of17g2RLJwA4ALPfYkpA8QNRmO7QBS1Pcs3xWesluq61goaFYoYXVl Pzk2atVTWAUcrRzVaDdhOMu5vKaH5IIQ54ZbKTIg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DCD8FF802E3; Wed, 24 Feb 2021 22:19:40 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C40D0F802CA; Wed, 24 Feb 2021 22:19:38 +0100 (CET) Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 62E84F8028B for ; Wed, 24 Feb 2021 22:19:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 62E84F8028B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rY1yV1Ai" Received: by mail-lj1-x236.google.com with SMTP id r23so4130153ljh.1 for ; Wed, 24 Feb 2021 13:19:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c5DfhNeAwwpzk7lWN1yZX9gxlgXcH020L1Zpko4icfU=; b=rY1yV1Ai7VAOwjIchhxUfiW8HVXTOFHY5DnR9H8zP+eRqagNAMjQYPGfHocaReUgXT 7fPrshHgVB0+Pn/XzRV1BrxiBf4xncSskLnIHDq2N9MaoFqM+NgIkncuaUbQGsU5MX+V R3fTyyKnFFSg1fvlU19X6fum4X/yZT7z38ftVh3R3ZbfqY3MGJ2uLpyE/JBs3MRV7l1b GnSEy+v6Stb9UDUH2ICCT+lRsMMFFfmyGRcik5gbTNi/+PywZ7w3wqZmsb/GgfyvSSD8 bRpk5FQEcRio5K7jXIXS7Z5Xiu4Q2225vb1VgcOkYiePAFDXGLV50NeuYfEgpb8+B5SK JSmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c5DfhNeAwwpzk7lWN1yZX9gxlgXcH020L1Zpko4icfU=; b=ZYgV7s/P1O9xInyqQtErKt60he6ij0mnmiFyzJIkFr5Ulgjem0eiq1CFEOeR4Ky7xL CpmfQIHYQOLRcyuQnb9+IJnHYHnolAVImeIO5DoqjgWY6WAmr2BYDgyRyl1WxQXeJFEG HZxnEgrko9R/dFZXFm6ZzYLOQPdq4NG7JI9wTofGDQLafrfwkVkmgXBa+O2nsauJDq57 CKz5tYpGKpLroCbKzrWyNMbxca06m9ZdY7pJG+XKdBWehunO2aHkyGRNhQMAHCGE/gKN oGQxvMXblghLzruUO/eGdtbPuAXGe4SoCVog5eU+pd1qHx+UdFTZyBuM97nM9JszrNL7 zP4A== X-Gm-Message-State: AOAM531JkGEXmyIe12pWeCCwBsF4fxZa/O82tIbzWTJtjuEcWBpg+OYm IymcUQql+/kGfXq6IexZxEI= X-Google-Smtp-Source: ABdhPJyR9BMQ7aExvBSaCCsIx3H0Jt1U9lYeloXAZJ9u96glq0dhBhN8B3JCTqcrdLKmD63SuRXarA== X-Received: by 2002:a2e:90d0:: with SMTP id o16mr15999620ljg.304.1614201567029; Wed, 24 Feb 2021 13:19:27 -0800 (PST) Received: from localhost.localdomain (h-98-128-229-129.NA.cust.bahnhof.se. [98.128.229.129]) by smtp.gmail.com with ESMTPSA id w26sm717116lfr.186.2021.02.24.13.19.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 13:19:26 -0800 (PST) From: Rikard Falkeborn To: Oder Chiou , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 2/4] ASoC: rt*: Constify static struct snd_soc_dai_ops Date: Wed, 24 Feb 2021 22:19:16 +0100 Message-Id: <20210224211918.39109-3-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210224211918.39109-1-rikard.falkeborn@gmail.com> References: <20210224211918.39109-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Liam Girdwood , Rikard Falkeborn , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The only usage of them is to assign their address to the ops field in the snd_soc_dai_driver struct, which is a pointer to const. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- sound/soc/codecs/rt1015.c | 2 +- sound/soc/codecs/rt1016.c | 2 +- sound/soc/codecs/rt5682-sdw.c | 2 +- sound/soc/codecs/rt700.c | 2 +- sound/soc/codecs/rt711.c | 2 +- sound/soc/codecs/rt715.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c index 844e4079d176..501cc45240b4 100644 --- a/sound/soc/codecs/rt1015.c +++ b/sound/soc/codecs/rt1015.c @@ -1028,7 +1028,7 @@ static void rt1015_remove(struct snd_soc_component *component) #define RT1015_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt1015_aif_dai_ops = { +static const struct snd_soc_dai_ops rt1015_aif_dai_ops = { .hw_params = rt1015_hw_params, .set_fmt = rt1015_set_dai_fmt, .set_tdm_slot = rt1015_set_tdm_slot, diff --git a/sound/soc/codecs/rt1016.c b/sound/soc/codecs/rt1016.c index a23d368ab4da..483375fc16ca 100644 --- a/sound/soc/codecs/rt1016.c +++ b/sound/soc/codecs/rt1016.c @@ -534,7 +534,7 @@ static void rt1016_remove(struct snd_soc_component *component) #define RT1016_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt1016_aif_dai_ops = { +static const struct snd_soc_dai_ops rt1016_aif_dai_ops = { .hw_params = rt1016_hw_params, .set_fmt = rt1016_set_dai_fmt, }; diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c index 0b7ac74e671d..5e097f776561 100644 --- a/sound/soc/codecs/rt5682-sdw.c +++ b/sound/soc/codecs/rt5682-sdw.c @@ -269,7 +269,7 @@ static int rt5682_sdw_hw_free(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_dai_ops rt5682_sdw_ops = { +static const struct snd_soc_dai_ops rt5682_sdw_ops = { .hw_params = rt5682_sdw_hw_params, .hw_free = rt5682_sdw_hw_free, .set_sdw_stream = rt5682_set_sdw_stream, diff --git a/sound/soc/codecs/rt700.c b/sound/soc/codecs/rt700.c index 66ec395dbbcd..01af9d9dd3ca 100644 --- a/sound/soc/codecs/rt700.c +++ b/sound/soc/codecs/rt700.c @@ -1002,7 +1002,7 @@ static int rt700_pcm_hw_free(struct snd_pcm_substream *substream, #define RT700_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt700_ops = { +static const struct snd_soc_dai_ops rt700_ops = { .hw_params = rt700_pcm_hw_params, .hw_free = rt700_pcm_hw_free, .set_sdw_stream = rt700_set_sdw_stream, diff --git a/sound/soc/codecs/rt711.c b/sound/soc/codecs/rt711.c index 85f744184a60..202bf6fbc5be 100644 --- a/sound/soc/codecs/rt711.c +++ b/sound/soc/codecs/rt711.c @@ -1048,7 +1048,7 @@ static int rt711_pcm_hw_free(struct snd_pcm_substream *substream, #define RT711_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt711_ops = { +static const struct snd_soc_dai_ops rt711_ops = { .hw_params = rt711_pcm_hw_params, .hw_free = rt711_pcm_hw_free, .set_sdw_stream = rt711_set_sdw_stream, diff --git a/sound/soc/codecs/rt715.c b/sound/soc/codecs/rt715.c index 9a7d393d424a..f419d001a3fb 100644 --- a/sound/soc/codecs/rt715.c +++ b/sound/soc/codecs/rt715.c @@ -683,7 +683,7 @@ static int rt715_pcm_hw_free(struct snd_pcm_substream *substream, #define RT715_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) -static struct snd_soc_dai_ops rt715_ops = { +static const struct snd_soc_dai_ops rt715_ops = { .hw_params = rt715_pcm_hw_params, .hw_free = rt715_pcm_hw_free, .set_sdw_stream = rt715_set_sdw_stream, From patchwork Wed Feb 24 21:19:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12102801 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E8D0C433DB for ; Wed, 24 Feb 2021 21:21:16 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 80EFA64F03 for ; Wed, 24 Feb 2021 21:21:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80EFA64F03 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 051981678; Wed, 24 Feb 2021 22:20:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 051981678 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614201674; bh=SD9+T49hD4SPwHocwKOaLmrs/yb/96450bW1bQrwNds=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=G1r5DgT4cfcGDoRtLLaGPkYxx/GYSrNHVV986/UCU7QVqABYhU2NkOUim7qq4n/qU GFlSNpSxSUZTboPKxKy5ZPdLN2L0NGSAf/HmpUvE5JZ2t3DNwP6OfQ7DpSF9EKstt2 o0QcsWhK6WzNaFaD/uOfoLI1viLzf05EV9Yb+OB0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 96A44F80161; Wed, 24 Feb 2021 22:19:35 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 35B5FF8022B; Wed, 24 Feb 2021 22:19:32 +0100 (CET) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 74860F80159 for ; Wed, 24 Feb 2021 22:19:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 74860F80159 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Mf/dFfVr" Received: by mail-lf1-x12a.google.com with SMTP id f1so5282921lfu.3 for ; Wed, 24 Feb 2021 13:19:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WjXyN2YZhZ2XF11j3DNqBy4PmqPHJZAyQHRBelDop8I=; b=Mf/dFfVrOfzHj93+e4gTrMtBgfAmwGs5R4wmdk9ygWQAh19ZpM73kAfxio4mvv1ftS AKvPy2YUDn9u/Y1Ty/Zk1jr7LSXu2mXgfOfIrd5rTla1xn0lx829CZ7Hs9xL6/kTFaqy sdyauTkVwGWIYqyKxHwJsr1DxaIy/Iy33Zyb/v0VXnZF9NP5QrrSmpKgN3ZuWOywnQPL eUNvQoAFWYNlOPODjIGyu95OcnP6BSXIor8s+u31eoDo1GzrakUm7m5RRonIdTfsFGdR O9WB85Va7RvaD0g/MqBJFcyuusmAnxuCXXICStv3DN79GiSwaPc2mu93FLdTbkp1fBWH sgcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WjXyN2YZhZ2XF11j3DNqBy4PmqPHJZAyQHRBelDop8I=; b=DhX1dLp7EmPdJ/iwhA3FJyzCl1qHbv7ZSxNzbwCg/buYyZQT9enEdHy1uSUYsv5va3 C6MhTmRwm67ogR/c9E2/qa4OTkk5TVf3/uKCQGqYC2iNVXBNxn0eL5ksHGHceJgu737N flsA8Wuggf53eDDe8E1HRPBgSUMM+mc8bhpfobIgaVM0FN8uQGVRDeWgHiVOB/s4IYas 4wSmtOMGiWJ0Z1+vrQgOeKmAq6Jc4tsYK23vl7Em49ZSJ+ImdcLM/XggXcaOgf0UAlw5 +yjYkO4832qfoIUTKAdoVQnvEKsS09btl9iiRfTofa1PfrBmnyHjtzUOiFWgMdkRyB07 SWTA== X-Gm-Message-State: AOAM530frFHy3yq4EgwF0KOzPw4ORYZppaqXSLklIbkLIoMBH/M6SNYX fFJsGoxFSDsYNxPWbTryuCY= X-Google-Smtp-Source: ABdhPJy8+vyE96eTWkPeG29uK18NtTKl+8CUKxn5wfqxakdR1h2RLFaBiSIC5eXBefHN7fY1NPiI4Q== X-Received: by 2002:a19:5505:: with SMTP id n5mr19598230lfe.401.1614201568154; Wed, 24 Feb 2021 13:19:28 -0800 (PST) Received: from localhost.localdomain (h-98-128-229-129.NA.cust.bahnhof.se. [98.128.229.129]) by smtp.gmail.com with ESMTPSA id w26sm717116lfr.186.2021.02.24.13.19.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 13:19:27 -0800 (PST) From: Rikard Falkeborn To: Oder Chiou , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 3/4] ASoC: rt*: Constify static struct acpi_device_id Date: Wed, 24 Feb 2021 22:19:17 +0100 Message-Id: <20210224211918.39109-4-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210224211918.39109-1-rikard.falkeborn@gmail.com> References: <20210224211918.39109-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Liam Girdwood , Rikard Falkeborn , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" These are never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- sound/soc/codecs/rt1011.c | 2 +- sound/soc/codecs/rt1015.c | 2 +- sound/soc/codecs/rt1016.c | 2 +- sound/soc/codecs/rt1305.c | 2 +- sound/soc/codecs/rt1308.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index 098ecf13814d..6877be5f36b9 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/soc/codecs/rt1011.c @@ -2151,7 +2151,7 @@ MODULE_DEVICE_TABLE(of, rt1011_of_match); #endif #ifdef CONFIG_ACPI -static struct acpi_device_id rt1011_acpi_match[] = { +static const struct acpi_device_id rt1011_acpi_match[] = { {"10EC1011", 0,}, {}, }; diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c index 501cc45240b4..3cd967ae999d 100644 --- a/sound/soc/codecs/rt1015.c +++ b/sound/soc/codecs/rt1015.c @@ -1121,7 +1121,7 @@ MODULE_DEVICE_TABLE(of, rt1015_of_match); #endif #ifdef CONFIG_ACPI -static struct acpi_device_id rt1015_acpi_match[] = { +static const struct acpi_device_id rt1015_acpi_match[] = { {"10EC1015", 0,}, {}, }; diff --git a/sound/soc/codecs/rt1016.c b/sound/soc/codecs/rt1016.c index 483375fc16ca..c14a809da52b 100644 --- a/sound/soc/codecs/rt1016.c +++ b/sound/soc/codecs/rt1016.c @@ -623,7 +623,7 @@ MODULE_DEVICE_TABLE(of, rt1016_of_match); #endif #ifdef CONFIG_ACPI -static struct acpi_device_id rt1016_acpi_match[] = { +static const struct acpi_device_id rt1016_acpi_match[] = { {"10EC1016", 0,}, {}, }; diff --git a/sound/soc/codecs/rt1305.c b/sound/soc/codecs/rt1305.c index 4e9dfd235e59..16aa405fb8f0 100644 --- a/sound/soc/codecs/rt1305.c +++ b/sound/soc/codecs/rt1305.c @@ -975,7 +975,7 @@ MODULE_DEVICE_TABLE(of, rt1305_of_match); #endif #ifdef CONFIG_ACPI -static struct acpi_device_id rt1305_acpi_match[] = { +static const struct acpi_device_id rt1305_acpi_match[] = { {"10EC1305", 0,}, {"10EC1306", 0,}, {}, diff --git a/sound/soc/codecs/rt1308.c b/sound/soc/codecs/rt1308.c index b75931a69a1c..76e65844543d 100644 --- a/sound/soc/codecs/rt1308.c +++ b/sound/soc/codecs/rt1308.c @@ -790,7 +790,7 @@ MODULE_DEVICE_TABLE(of, rt1308_of_match); #endif #ifdef CONFIG_ACPI -static struct acpi_device_id rt1308_acpi_match[] = { +static const struct acpi_device_id rt1308_acpi_match[] = { { "10EC1308", 0, }, { }, }; From patchwork Wed Feb 24 21:19:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12102803 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96C4CC433DB for ; Wed, 24 Feb 2021 21:21:21 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFA1564F0B for ; Wed, 24 Feb 2021 21:21:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFA1564F0B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E30E01681; Wed, 24 Feb 2021 22:20:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E30E01681 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614201679; bh=Ce1JU/6X3WVIRarIjUQz/SfAfHyQuXxSl8iLiz+sv0A=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=U1Y44b+l1ffYpL6qCZdax7Qy7cs6nSTB7bFQt4rm7HHJ8C5P0v7ORBO+i370TzQjB RKze5MLTSJc4wJuKndkjj52WcRXrLoYcAFiMAy1Gzad0bOAjYRBewzGuhIYQlrLSiu gPLecPAYfjIPKBQtlOVcDFCgvlt0e6Y/t9A+T7Vk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 26949F8025E; Wed, 24 Feb 2021 22:19:37 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 93907F80249; Wed, 24 Feb 2021 22:19:33 +0100 (CET) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3C1EBF80129 for ; Wed, 24 Feb 2021 22:19:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3C1EBF80129 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R5QRo2B2" Received: by mail-lf1-x12d.google.com with SMTP id u4so5286652lfs.0 for ; Wed, 24 Feb 2021 13:19:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bNR1KI2pRCEa4jeqkN89XkpppOEohChHDZHILgnnwVE=; b=R5QRo2B2oMgyIpvYMaARSzalCqNsNEewkuyK8GqD+9Hxagz9bsLLkL3DqooEcgoPIS YSn7T5HdPxdYPFyANbYByP47cXHJ+b5zszT61j4rpTxLntkL/dnP9ipBpyOrZFxkHEFn o/db+R45qrMfzJPxh8dHJzvycEmdduga3fFDd6jQXxpjYOQ/L3cfT+FZVVCONeyeZxR9 /0OjgZkoBXHeBv1bYlTPezKforNeaHfM6frb60ElrEuYgOj/J6LzkRcNT1cX/Lm0f/GZ 2uIXNDIPmpLtYNFoihpO8xrWwxcWbe0ohfc6IAt2doig6ZIQr0c1+DAhN+LQ0JErOTho D7zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bNR1KI2pRCEa4jeqkN89XkpppOEohChHDZHILgnnwVE=; b=cpS4zdSldpmTmCPNLrfT34yVMMpGcbuz39QLixvlf0h+ztmDOuf+WfP1IG16kacPpE BfsNz7Txa6S14dZCeQFXJLgqbo1f4P2CgrnCzRKh/da1+ZXjYD9gh+nIxIlCLjol4PGa mEak8EvUBK1r0RLt7dXIPzVpwYMOk7tEzboCEFbJxa4dGp1EdJwSydeb7iCoUWcidhQK bZW+puoftthtZ1lsWr5QOSOIOVXmoJMhDHrQ9CNc3rG2NOztzs49fe1AXQ7bUhqkwTlA ReCR3qYsbfGBV7XgSHjjkC6xcXplAVkKyaCQCOWRIkwGZ68uqdbzJajX8ucXnx8QXjwl BLQQ== X-Gm-Message-State: AOAM530o+1s0BPRaH8gpFkwMv3di2c9UyMZYBrunRQO4hzwJdyIgQF+o uOQY839edfFf9JdSdvTbp0Y= X-Google-Smtp-Source: ABdhPJzQNo1uob0y8vJmKLbHqTEr+Oufmvez2ZwpS3vFdPnaJYuPf7kaRx3OTf4yuzXcJTaxneSGTQ== X-Received: by 2002:ac2:420b:: with SMTP id y11mr19798338lfh.215.1614201569046; Wed, 24 Feb 2021 13:19:29 -0800 (PST) Received: from localhost.localdomain (h-98-128-229-129.NA.cust.bahnhof.se. [98.128.229.129]) by smtp.gmail.com with ESMTPSA id w26sm717116lfr.186.2021.02.24.13.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 13:19:28 -0800 (PST) From: Rikard Falkeborn To: Oder Chiou , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 4/4] ASoc: rt5631: Constify static struct coeff_clk_div Date: Wed, 24 Feb 2021 22:19:18 +0100 Message-Id: <20210224211918.39109-5-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210224211918.39109-1-rikard.falkeborn@gmail.com> References: <20210224211918.39109-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Liam Girdwood , Rikard Falkeborn , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" coeff_div is only read from, so make it const to show the intent. Signed-off-by: Rikard Falkeborn --- sound/soc/codecs/rt5631.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c index 653da3eaf355..afc1305a7fa5 100644 --- a/sound/soc/codecs/rt5631.c +++ b/sound/soc/codecs/rt5631.c @@ -1283,7 +1283,7 @@ static const struct pll_div codec_slave_pll_div[] = { {3072000, 12288000, 0x0a90}, }; -static struct coeff_clk_div coeff_div[] = { +static const struct coeff_clk_div coeff_div[] = { /* sysclk is 256fs */ {2048000, 8000 * 32, 8000, 0x1000}, {2048000, 8000 * 64, 8000, 0x0000},