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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 E5C64C47093 for ; Wed, 2 Jun 2021 11:26:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CEEB760C40 for ; Wed, 2 Jun 2021 11:26:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232614AbhFBL21 (ORCPT ); Wed, 2 Jun 2021 07:28:27 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:7072 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232785AbhFBL1u (ORCPT ); Wed, 2 Jun 2021 07:27:50 -0400 Received: from dggeml759-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Fw68k6WpRzYnC8; Wed, 2 Jun 2021 19:23:18 +0800 (CST) Received: from localhost.localdomain (10.175.102.38) by dggeml759-chm.china.huawei.com (10.1.199.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 2 Jun 2021 19:26:02 +0800 From: Wei Yongjun To: , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lee Jones , Chris Morgan CC: , , , Hulk Robot Subject: [PATCH -next] ASoC: rk817: Constify static struct snd_soc_dai_ops Date: Wed, 2 Jun 2021 11:36:43 +0000 Message-ID: <20210602113643.3037374-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.102.38] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggeml759-chm.china.huawei.com (10.1.199.138) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: kernel-janitors@vger.kernel.org The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- sound/soc/codecs/rk817_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rk817_codec.c b/sound/soc/codecs/rk817_codec.c index 17e672b85ee5..9a896e4326c3 100644 --- a/sound/soc/codecs/rk817_codec.c +++ b/sound/soc/codecs/rk817_codec.c @@ -382,7 +382,7 @@ static int rk817_digital_mute(struct snd_soc_dai *dai, int mute, int stream) SNDRV_PCM_FMTBIT_S24_LE |\ SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops rk817_dai_ops = { +static const struct snd_soc_dai_ops rk817_dai_ops = { .hw_params = rk817_hw_params, .set_fmt = rk817_set_dai_fmt, .set_sysclk = rk817_set_dai_sysclk,