From patchwork Wed May 26 23:10:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12282877 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.8 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 C20F7C47082 for ; Wed, 26 May 2021 23:12:11 +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 B67CF613C5 for ; Wed, 26 May 2021 23:12:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B67CF613C5 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 2F84C1716; Thu, 27 May 2021 01:11:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2F84C1716 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1622070729; bh=kDaDVc9Xt1O/bRqr3nnD85mzZX1bkKy8Bs6Zh45UR9Y=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vqKQ21mZYlUf/k1TBknvQ1QFM8K79nEfTxDcTmSl4GAYAmAkKyhS12P+UFBl1QpPS 0xKiqB0goAT03gVT4E5dV7YbwoSxRw9JpCiOIkjk9hptNIEBqdnbgJtTCNRo+tx3N1 RRmXHSQWooeFj4sJ0zQ530OqKFd7EmGBEHX3Vb2w= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B4B72F80260; Thu, 27 May 2021 01:10:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 14AC3F802E8; Thu, 27 May 2021 01:10:29 +0200 (CEST) Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (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 03843F80212 for ; Thu, 27 May 2021 01:10:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 03843F80212 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NpYz1s8S" Received: by mail-lf1-x12b.google.com with SMTP id i9so5019011lfe.13 for ; Wed, 26 May 2021 16:10:23 -0700 (PDT) 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=0DwJ6464lblgiJlofD5GM02fvqVVflTlv4Zsog+he+Q=; b=NpYz1s8S7yxF1eqtPR6VkJLmv68CCWaRwk2PECxnZO+Y3ztcKaXwkGfGYNqIXLCAe6 6yANl5CG9Il18wP4WNoNQVEzUFSgDLxavq1D6IxmL+Z6xoXrg2Z0cpXnJwns8J0b4G8y 8TUnzI6jTQSmmlWgkEpNB8knZ/JRoxyHS3/QGZYuMErowraWvgmNh4E+PDSc/6YZayzC OnviQkz0Pd7xqh64cftvKK9MpwYwG4c/vXhkMJcs6e5fKJBmX0zhRpS8znhKlsehhwza 2pLmZL+dMf5PW/nBxnIutbve9bRnxX9WKRDjHCx+jpEjYy2qtkb6Dt/1HCm6sZO6X0WD Zz+Q== 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=0DwJ6464lblgiJlofD5GM02fvqVVflTlv4Zsog+he+Q=; b=KlhqJjypSc76jUEXZcXFxkZsdX2yOQF2AOxLk4z922Qc4uqp3Ha/Tpb/oMYCNJ3edH nE0I92PkmKhYx9vzylVM7Ewfqabx6CnGP35YK+gBIpsVYrSgT2o9WWUyTHvSmFId1Jdg 13OxNfq1qvokfPAknvmRGDILb2nsPOxUXneIJb/QgpE4H1WZ/IA8Bazuc93o0y23c5Pf zUySkMGxsI7lqnWKa5/dmlePnd1sYtyd5jguRY8Xf2S+pnuhP1EnUdWbUqv9yZEN73tQ 0MyRzOWwFINDnmitr3rekf04iMaIzauqNelxhA8XEqrPHfRGjveax3Kx+icqxY23Q6r8 KtZg== X-Gm-Message-State: AOAM531tDYc8ecSFCE/uDLWdTG0OIsyYd1dsuEV9EYZUlovMt4O9K3/I kt9tXA8CqAgdKqkiY50YM6E= X-Google-Smtp-Source: ABdhPJx3wJMUqA3I0HnKdDRalpJxqKd7JaTCDIbE0v4w2KBZxtwFsGjC3mcsc82mGmi2onNu031V5Q== X-Received: by 2002:a19:dc4e:: with SMTP id f14mr314076lfj.176.1622070623116; Wed, 26 May 2021 16:10:23 -0700 (PDT) Received: from localhost.localdomain (h-98-128-228-193.NA.cust.bahnhof.se. [98.128.228.193]) by smtp.gmail.com with ESMTPSA id d5sm35802lfi.144.2021.05.26.16.10.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 16:10:22 -0700 (PDT) From: Rikard Falkeborn To: Liam Girdwood , Mark Brown Subject: [PATCH 1/5] ASoC: cs47125: Constify static struct snd_compress_ops Date: Thu, 27 May 2021 01:10:09 +0200 Message-Id: <20210526231013.46530-2-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210526231013.46530-1-rikard.falkeborn@gmail.com> References: <20210526231013.46530-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Charles Keepax , patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Rikard Falkeborn , Takashi Iwai , Richard Fitzgerald , James Schulman , David Rhodes 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 snd_compress_ops structs are only stored in the compress_ops field of a snd_soc_component_driver struct, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- sound/soc/codecs/cs47l24.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs47l24.c b/sound/soc/codecs/cs47l24.c index eaabbb56a173..6b6d08816024 100644 --- a/sound/soc/codecs/cs47l24.c +++ b/sound/soc/codecs/cs47l24.c @@ -1178,7 +1178,7 @@ static unsigned int cs47l24_digital_vu[] = { ARIZONA_DAC_DIGITAL_VOLUME_4L, }; -static struct snd_compress_ops cs47l24_compress_ops = { +static const struct snd_compress_ops cs47l24_compress_ops = { .open = cs47l24_open, .free = wm_adsp_compr_free, .set_params = wm_adsp_compr_set_params, From patchwork Wed May 26 23:10:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12282879 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.8 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 DE1CFC47082 for ; Wed, 26 May 2021 23:12:15 +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 55752613C5 for ; Wed, 26 May 2021 23:12:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55752613C5 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 D625B16FA; Thu, 27 May 2021 01:11:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D625B16FA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1622070733; bh=RK1+6RZCRH5a717yVji/EITwcmJ7fkj129RV8FDrWPU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=NybfG8do+r7nPtJ/vie+pGp99mZBHrAnc3ON+un5VVI+Xkgxw5wA60tNGUEpu+KH8 jCU81MUAqZUrD/ad39IkugpJSy8as4zHV6QPhHIxd9ygVzO68K2cflNk9oRg85bZ40 w61KTmmfYEfzgMCLXSLPah58tg9AOtb0IwwdXH2E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DC0EFF802E8; Thu, 27 May 2021 01:10:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3DDE0F80274; Thu, 27 May 2021 01:10:29 +0200 (CEST) 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 20ABEF80264 for ; Thu, 27 May 2021 01:10:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 20ABEF80264 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MIcepU19" Received: by mail-lf1-x12d.google.com with SMTP id x38so3023953lfa.10 for ; Wed, 26 May 2021 16:10:24 -0700 (PDT) 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=J91A2ezJDwmmBjDbHzFnYK1SauhUWhSDtbv+ex6BQOE=; b=MIcepU1970vDHoUb96UFwfdYyRxbLToMCwifD7g/JcbLZv+mJFPdH5/BH15slSU09p OUpIpHClX62/SKVvDxMGfInkkAhYT57wIeHj5qgu8Kzf4PafVDYW4VcPDswnu6ZpC3VX nDNZfXNJCTJrsSM/Du2AjquLHl2Tz4oInZmK4VXmh9Kx1rG6Trfgtrzvs03+HHtUO6G5 3Cq+k68/P/+yaxiTL1RS0tBci5pODFWxJzZaD2IegVe9TLbXk9rJi/Al29CsYF/mDCdO rEVYaPA1UwPo2z7OAZvxrIZgzys/RnpNV8C+PGdfG+Io+McJ7QNw92JsnFneNCyZJM1n bEJQ== 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=J91A2ezJDwmmBjDbHzFnYK1SauhUWhSDtbv+ex6BQOE=; b=B33dAwuH8UGlW0ajNqjKYzO5D4tKL7PCK2zj+OXutb1mh08X5LR7I0se8+zDrGg3O+ zlLPTfKZpD0AqsdNDlBI3V7lggWjmuE1bUav4SYKnsowSHTT8IRfvLr43rQ1zVAWSFB3 mAWvphJ9waXoFLGKdI1A2gUY0I6Z/x5CBon00jY39dWIPUlvnr5xQoK9xReZyF9tFZPR 1VKbQmAmecxY4MU1Hnnl1fh3LfB+Occ6tbr17OZtaBXtmaSST5tuW4hyLOcmegG4Oej8 nUXweBC0XHqSSnqTBQHovJJjq+DfX/W69vR0aCPMz1Cv59Z8JCmkfoOfQ0PYEeoJDwYo MJ+w== X-Gm-Message-State: AOAM531YbOGCmtmF6lHOmmqOj7tCuN9ftFjC3YEV3RVveQJFN924lsyV 9pE1kHTwlG9XSA4b2c20PEs= X-Google-Smtp-Source: ABdhPJxT4uY6M8RKPTvy2BvhyVq4g0Cd0qirCeVYzU5lkL6YtQEwOkpw5HntEv08KNRZ9HTvwRgSnw== X-Received: by 2002:a19:f012:: with SMTP id p18mr293953lfc.493.1622070624086; Wed, 26 May 2021 16:10:24 -0700 (PDT) Received: from localhost.localdomain (h-98-128-228-193.NA.cust.bahnhof.se. [98.128.228.193]) by smtp.gmail.com with ESMTPSA id d5sm35802lfi.144.2021.05.26.16.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 16:10:23 -0700 (PDT) From: Rikard Falkeborn To: Liam Girdwood , Mark Brown Subject: [PATCH 2/5] ASoC: wm5102: Constify static struct snd_compress_ops Date: Thu, 27 May 2021 01:10:10 +0200 Message-Id: <20210526231013.46530-3-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210526231013.46530-1-rikard.falkeborn@gmail.com> References: <20210526231013.46530-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Rikard Falkeborn , Takashi Iwai 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 snd_compress_ops structs are only stored in the compress_ops field of a snd_soc_component_driver struct, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- sound/soc/codecs/wm5102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index 34b665895bdf..621598608bf0 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -1989,7 +1989,7 @@ static unsigned int wm5102_digital_vu[] = { ARIZONA_DAC_DIGITAL_VOLUME_5R, }; -static struct snd_compress_ops wm5102_compress_ops = { +static const struct snd_compress_ops wm5102_compress_ops = { .open = wm5102_open, .free = wm_adsp_compr_free, .set_params = wm_adsp_compr_set_params, From patchwork Wed May 26 23:10:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12282881 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.8 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 B2928C47082 for ; Wed, 26 May 2021 23:12:51 +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 D6AC9613C3 for ; Wed, 26 May 2021 23:12:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D6AC9613C3 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 78E991732; Thu, 27 May 2021 01:11:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 78E991732 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1622070769; bh=isoMeugTez54myAgsKJevLLjw6zLhmI6jiunXBsdv14=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=GIcvXgmwe6XlWURR9sfZEXyWH1JWe0Ebwzun5bKW2UYXxtWT7uY/r4WbA+VPLIdOY IGRXm+YgHxQSSd8rIw27mhl2LpRJKzbaH//nbXHhg8g4I6eX1WgKv918UwZH0xWjLN 58pv7cUVZR+y55JXn9nr+NV6lVxDWCBR2xBCQoi8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9E4F3F80301; Thu, 27 May 2021 01:10:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AE769F802CA; Thu, 27 May 2021 01:10:30 +0200 (CEST) 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 BFD4CF802BE for ; Thu, 27 May 2021 01:10:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BFD4CF802BE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YR9BmeUR" Received: by mail-lf1-x12f.google.com with SMTP id q7so5060414lfr.6 for ; Wed, 26 May 2021 16:10:27 -0700 (PDT) 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=wxumGjjKmyhy9AtNX/EtM7gYeJBe+fSFWDY+3BCIpJU=; b=YR9BmeUR/SYPMeg44xeLZIrjLsDpNsbNs1BHLe9YOZCku+u9FMj/5Q/EtP+jIcxg61 7UbRVsnNsynH//WdoJ2KPnTSHRBhVZGYltbLHewlvJCP23PfWwY2g/HE56gq5jT3sH/Y mnbCcCokGDs8mLyVgNjkQZHu0fahoJPD+fzGn5YNnz8zM51jusobKXgx+FA0EMhGvbi/ jbxYeQKw/eTyDPBRab0KtPq6wuXmO/UnYfYDUWt8APYN0MvCXPj4Qn7V1tcA3KYrZU1I jSjJMMZqZJxJXy2qeeRpbLrSxqXR0RalN4rtyWnjRH6eV235rlSL7toVVLb3pOs7jsMu 9rUg== 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=wxumGjjKmyhy9AtNX/EtM7gYeJBe+fSFWDY+3BCIpJU=; b=IfUJ4yYUk2yHpZ+lCUbC+QI/B0gqFigMjiui3rehwzb55PIBUaxsY93jaOkKLYlUNx JRykjo5dNjO+Nz3sy88jAJJ43LFC9nZEkcXG7PSgBVBnQBxNoQL6vfWv9iZc3hTlk8gh 14zoLFxB0YO8JejiEKPmJ0whzKNVHy5cUQzKIEeIlkWAwuZ50EmiqQIGyTTvid/veP3k Tgak8HUkEbcZIy+KpQWVZ9ZtSsfTPVUKn1U+fRg84LzNMFt+8dP4yd6+bTAPOPoQYYDd LcIQ0cxdfJthQRB6pAzbXRhmNEC1kIU33dAvCdAekZ8yvDvh3ZJkhWwP6f8ZfkQDYd1l YMbQ== X-Gm-Message-State: AOAM532qCFPOz3f1nYJn1O37Qv08bFrCnM7b5ICfA456RFI+duUBC2is WdRBZugvh+UdIR15SHfu6xQ= X-Google-Smtp-Source: ABdhPJzU0//HLO1M/s3OeXk8PSoCR7XVVz3EuRNaT6s/U8dFBo9RZn0KG+0JF/za48r6ATihAp0Dlg== X-Received: by 2002:ac2:5304:: with SMTP id c4mr313085lfh.634.1622070624981; Wed, 26 May 2021 16:10:24 -0700 (PDT) Received: from localhost.localdomain (h-98-128-228-193.NA.cust.bahnhof.se. [98.128.228.193]) by smtp.gmail.com with ESMTPSA id d5sm35802lfi.144.2021.05.26.16.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 16:10:24 -0700 (PDT) From: Rikard Falkeborn To: Liam Girdwood , Mark Brown Subject: [PATCH 3/5] ASoC: wm5110: Constify static struct snd_compress_ops Date: Thu, 27 May 2021 01:10:11 +0200 Message-Id: <20210526231013.46530-4-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210526231013.46530-1-rikard.falkeborn@gmail.com> References: <20210526231013.46530-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Rikard Falkeborn , Takashi Iwai 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 snd_compress_ops structs are only stored in the compress_ops field of a snd_soc_component_driver struct, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- sound/soc/codecs/wm5110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 76efca0fe515..5c2d45d05c97 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -2355,7 +2355,7 @@ static unsigned int wm5110_digital_vu[] = { ARIZONA_DAC_DIGITAL_VOLUME_6R, }; -static struct snd_compress_ops wm5110_compress_ops = { +static const struct snd_compress_ops wm5110_compress_ops = { .open = wm5110_open, .free = wm_adsp_compr_free, .set_params = wm_adsp_compr_set_params, From patchwork Wed May 26 23:10:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12282885 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.8 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 2414EC47088 for ; Wed, 26 May 2021 23:13:43 +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 34133613CC for ; Wed, 26 May 2021 23:13:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34133613CC 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 CD91F173F; Thu, 27 May 2021 01:12:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CD91F173F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1622070820; bh=Gi6jdcyOmlfiW0F48mVfAwD23JaGU1abAUimqzG6f/U=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hTGY9OkRKzAXQEJ1eCpPW7K+f2NqCed5wa5mLG9+h5zEyp2wDOfcQBdXyV5rIm3/4 6CGEpYia/C9HCAO0xABDapdXSVhA07Mei92shop8TX22og41Gn0mPgs56SkjX+tlwy iBmiFe/deQ99T9qEWMwzKllSMwsBYcmHfoUIrmvs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E4281F804B2; Thu, 27 May 2021 01:10:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 952DFF80430; Thu, 27 May 2021 01:10:34 +0200 (CEST) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (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 DBFC9F802CA for ; Thu, 27 May 2021 01:10:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DBFC9F802CA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Owjd8HWL" Received: by mail-lf1-x133.google.com with SMTP id q1so5047046lfo.3 for ; Wed, 26 May 2021 16:10:26 -0700 (PDT) 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=rafWoYI/41oLLgH0zc0m9Aor5D1w1XH8dZGtN18a1Oo=; b=Owjd8HWLgAG1uF9eUcz4l+ojxm0RUTnNZxefGCvnrtLD7VD2G/cJfHxt8j2MsdgeCw lIIMx+FS5QWxozDGhHh+kLRt2PRo8HA9dXQ2kDt0kO2et3Cwe3RVCNd2wVSYvsrF98O1 6YJ7PZQKyz6T9CsiTBsVhiQuBJGrrRb4DVIqBqOZ95324yQzPH/o9WKMUHp0wOv7w/gI dDMcsJSBcGG0IWxRybhx9DRlB9ZTSX/m70Hqv0SLchNUMrIIOPoGuXMPLa4TvYqRbPVv j8WsvmXygkf0u40PjKoRGFZe+PxGi37msbolBb0W+h1QNk9GvO+2XCbdkgfDg+8XialD 6RNw== 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=rafWoYI/41oLLgH0zc0m9Aor5D1w1XH8dZGtN18a1Oo=; b=IIYwZmGb3gHhOS3T1mcOPA2AS7Jy97McC4i85dJTvLAnXmxcZQzo54d6t+QMRjgZEX FJ3UgOTdwQkTzPcJBfDxIVR1A7/K5Rtl+NHwqZwkr2qEHbmDQfST1mTqvXwldX+SVu1V dgjeQBD24ojd0uNyqdWpKfgykAI6kvYD6sZ8GU8L2EM/KWgACx2ViUj5Rzz2DAHZ31MN LgbRCSiSjtGGt6oUkjJBQFoaBNsfW24QswoLCJQ2qEElPCZnkXUUtUdOgeOg2ANmJuSg 0No7Cusc/R75PHHHI1c35GpxrmIjUzD0eEH9yr9leozCmCtO9zlq2nHJTVxvMybs7Kod yUMQ== X-Gm-Message-State: AOAM531tyYaYmWBJ42u9lUQY+Orlx80hmI7JGUog6G07WgGx42znOBFe g+BFUP6s8uP2te7TX07Xitc= X-Google-Smtp-Source: ABdhPJyitHNPPsdsydEW2Ko0uLs6O40Fb+AnkAS84YPdbkTVGgy3LG8qxDVCn86Lx9O0HZfndd8IrQ== X-Received: by 2002:a05:6512:21a:: with SMTP id a26mr321020lfo.468.1622070625906; Wed, 26 May 2021 16:10:25 -0700 (PDT) Received: from localhost.localdomain (h-98-128-228-193.NA.cust.bahnhof.se. [98.128.228.193]) by smtp.gmail.com with ESMTPSA id d5sm35802lfi.144.2021.05.26.16.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 16:10:25 -0700 (PDT) From: Rikard Falkeborn To: Liam Girdwood , Mark Brown Subject: [PATCH 4/5] ASoC: qcom: q6asm-dai: Constify static struct snd_compress_ops Date: Thu, 27 May 2021 01:10:12 +0200 Message-Id: <20210526231013.46530-5-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210526231013.46530-1-rikard.falkeborn@gmail.com> References: <20210526231013.46530-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Banajit Goswami , linux-kernel@vger.kernel.org, Rikard Falkeborn , Takashi Iwai 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 snd_compress_ops structs are only stored in the compress_ops field of a snd_soc_component_driver struct, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c index 9766725c2916..5ff56a735419 100644 --- a/sound/soc/qcom/qdsp6/q6asm-dai.c +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c @@ -1169,7 +1169,7 @@ static int q6asm_dai_compr_get_codec_caps(struct snd_soc_component *component, return 0; } -static struct snd_compress_ops q6asm_dai_compress_ops = { +static const struct snd_compress_ops q6asm_dai_compress_ops = { .open = q6asm_dai_compr_open, .free = q6asm_dai_compr_free, .set_params = q6asm_dai_compr_set_params, From patchwork Wed May 26 23:10:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12282883 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.8 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 161F0C47082 for ; Wed, 26 May 2021 23:13:04 +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 57D59613C3 for ; Wed, 26 May 2021 23:13:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57D59613C3 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 E81861714; Thu, 27 May 2021 01:12:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E81861714 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1622070782; bh=kUDqrDfSw2Wiy4wmESWkHEGUdbUnarENncp++OVXoec=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=E3cW9mvDYpj4NM5TgMpQFKgAVG341ofr0n9bkEIV0d/nmsQeI4aicYQOeExYU7B6I 29mlUNqzJNCFFrQqqOASi5Yf7V9hdiGumCWZcWr/WYD8jYRvdV/8mHfbddh+QB4jW7 njJ8xE+oGgNIhbz6EK4iJGFJrkK6UaqaPWXs8/g8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A1412F8049C; Thu, 27 May 2021 01:10:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6AA16F80274; Thu, 27 May 2021 01:10:32 +0200 (CEST) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (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 4F3F9F80212; Thu, 27 May 2021 01:10:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4F3F9F80212 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="E+voA5DP" Received: by mail-lf1-x12e.google.com with SMTP id f30so5066283lfj.1; Wed, 26 May 2021 16:10:27 -0700 (PDT) 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=6cqfoBUBIBZBnXHCZDwrElhf2ir+Bt3tbcHnECyy/1M=; b=E+voA5DP9ip8MLWp4XLYG2OuwruYbMDCfDQ7oqaYWWtBxhM1nVixvjfaZarsFImE8L jZSs9N5GHZAcZgPk02QqXnPp+DbpQYO6La58ZSvPQLgef3kUGJRZbg7tPAzdq85zandR TpLI073zWBA1AMn8+au6kN2xpDK9d5IjhoHaC4W0cFuJbuRTY1bqBLPYcdXxDEbX90Gl bJUFosbC9IZcA2z0sRIpbTOzgElAlwHIeIEPhcxVOql1FpnGoRwler0SuQXSUo2gdvF+ kEODqbiFdu3NtYNw7222pT73eCeBif2xgzuFr5kLnHyI5IHShJ4la9kgECaWQD+4JRsp hRPw== 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=6cqfoBUBIBZBnXHCZDwrElhf2ir+Bt3tbcHnECyy/1M=; b=b+kVjlLTY9UmuyN9E11xu34HVBTykn0mPgGFQNUz13J5FZyCFzTYFwfeGE2gmyfiMF cMI6Mdo8W1mMA3ZQql2+inrbPoAWVJfvlsQF143N6EL5vJ5yMJHNAUoaKh0lDmDlUm4T Nvgm5dHcOgvnOa74OY3IRVdxtwrlj9GQlcyhpHBmt3QXqnTdSYhTconCE29LlMSH3I9L L2votRoXej/n8/s7VUwMQssnGer84d4bPXSPqpGxiaim9X30Py2DQxQ53AfaFIyA+U6j GgQzFiazzQwFTMDfI73RbOvdhP46xQ9QIlNBE9LCcyo2F7MKkR81Xx1VNJ/LUSTZC7yd rvIw== X-Gm-Message-State: AOAM532kwuGbyKkvRYkMG2WT6qbaZtzLxR5Vi5yOMjnk75wjlf1HHLui xWQcWuZwo6TyjreEHHeK6oQ= X-Google-Smtp-Source: ABdhPJx80KNIisL1p6ZVTMU6a/aB8NzELevSRe5WFSORcB66wyOizl7X18sXKzNGPD0naO6eoIuKQg== X-Received: by 2002:a19:4085:: with SMTP id n127mr308460lfa.415.1622070626866; Wed, 26 May 2021 16:10:26 -0700 (PDT) Received: from localhost.localdomain (h-98-128-228-193.NA.cust.bahnhof.se. [98.128.228.193]) by smtp.gmail.com with ESMTPSA id d5sm35802lfi.144.2021.05.26.16.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 16:10:26 -0700 (PDT) From: Rikard Falkeborn To: Liam Girdwood , Mark Brown Subject: [PATCH 5/5] ASoC: SOF: Intel: Constify sof_probe_compressed_ops Date: Thu, 27 May 2021 01:10:13 +0200 Message-Id: <20210526231013.46530-6-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210526231013.46530-1-rikard.falkeborn@gmail.com> References: <20210526231013.46530-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Kai Vehmanen , Takashi Iwai , linux-kernel@vger.kernel.org, Rikard Falkeborn , Pierre-Louis Bossart , Ranjani Sridharan , Daniel Baluta , sound-open-firmware@alsa-project.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 sof_probe_compressed_ops is to assign its address to the compress_ops field in the snd_soc_component_driver struct, which is a pointer to const. The assignment is done in sound/soc/sof/pcm.c. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- sound/soc/sof/compress.c | 2 +- sound/soc/sof/compress.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/compress.c b/sound/soc/sof/compress.c index 2d4969c705a4..57d5bf0a171e 100644 --- a/sound/soc/sof/compress.c +++ b/sound/soc/sof/compress.c @@ -13,7 +13,7 @@ #include "ops.h" #include "probe.h" -struct snd_compress_ops sof_probe_compressed_ops = { +const struct snd_compress_ops sof_probe_compressed_ops = { .copy = sof_probe_compr_copy, }; EXPORT_SYMBOL(sof_probe_compressed_ops); diff --git a/sound/soc/sof/compress.h b/sound/soc/sof/compress.h index ca8790bd4b13..4448c799e14b 100644 --- a/sound/soc/sof/compress.h +++ b/sound/soc/sof/compress.h @@ -13,7 +13,7 @@ #include -extern struct snd_compress_ops sof_probe_compressed_ops; +extern const struct snd_compress_ops sof_probe_compressed_ops; int sof_probe_compr_open(struct snd_compr_stream *cstream, struct snd_soc_dai *dai);