Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp161780pxf; Wed, 7 Apr 2021 23:23:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYLXfqoD8L/1r5hAYcUCdaOW0vDeyNGAOtTCtlTL7s/8lOALA1zsOBHf0NC44ZRNRB4ofN X-Received: by 2002:a05:6402:34f:: with SMTP id r15mr8976639edw.195.1617863000999; Wed, 07 Apr 2021 23:23:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617863000; cv=none; d=google.com; s=arc-20160816; b=GhJ/mU7z61DhVuXLpoI/UnDplFXQQly+SctvkWjlGpJh2bi6d6+yJMRorit47paWu+ xrMv69IVF1KdaSjmi0ap8cGgA7aT/oXEZ9eUZMdVSA08uthkMQ+R7WEBKwvfrOmwmzTF r72mIhHIDnDi4yC1e9CB4+E63h4y0nbiT+OmJNfRUHpZ1hDEcH6319dSpBs1ZImJ4UTf KECOdI1O/vfsGRIBBD6f3rk0zi7WI+iTfk/6OkppK1Ig0kFVj35IKqK1lHYgkFfO4hRf f9jzZ8hEZpmC4huj9T6Uu4Ttw/ChlEdEQ9nFBIN5s+z07ngYHLTAfzdmAhO3yOsPSp8w g/0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=TbdxBm4KSzeC1APswgWp5bosh9ttsHXKLwKBSR55VCY=; b=FF5xGpwK7o1qXmyYOghcrEFqZcK5amqtyl07DbsbfmVLL4I5K0NGaM8QHIgc9woYGS thnwNCD3stFbdhhBV7H/S+JY77a+qfzhn8qpQMZ9tMWsCvO2EoWWpXlNUnCLWotZQsh3 GrvEWiH5rxn2aExqnpBKSL2McBkteeV23wbZ1xmVwCsQecuYyFwneRPVWwzHZJy0NWbN ARNRKD/IgZ1s8OUUpAL/JPmor5d0JqjloZAy2HOKR0Sz3pM0fi566XzAhFDl4ffdKQLO 2rqNMimQSVl7Sez+bX1add39IzYpf85+9XJVsoLyeD25B6wZMTCTWZAwbZp9roP4fOI+ /5Vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de53si20917135ejc.358.2021.04.07.23.22.57; Wed, 07 Apr 2021 23:23:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230476AbhDHGTU (ORCPT + 99 others); Thu, 8 Apr 2021 02:19:20 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:15173 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230204AbhDHGSy (ORCPT ); Thu, 8 Apr 2021 02:18:54 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FG9xS0Q1QzpVj9; Thu, 8 Apr 2021 14:15:56 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Thu, 8 Apr 2021 14:18:35 +0800 From: Ye Bin To: , Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai CC: , , , Hulk Robot Subject: [PATCH -next] ASoC: rt1019: constify static struct snd_soc_dai_ops Date: Thu, 8 Apr 2021 14:27:01 +0800 Message-ID: <20210408062701.803865-1-yebin10@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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: Ye Bin --- sound/soc/codecs/rt1019.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt1019.c b/sound/soc/codecs/rt1019.c index 5138f028d9f2..f64bb7302720 100644 --- a/sound/soc/codecs/rt1019.c +++ b/sound/soc/codecs/rt1019.c @@ -823,7 +823,7 @@ static int rt1019_probe(struct snd_soc_component *component) #define RT1019_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 rt1019_aif_dai_ops = { +static const struct snd_soc_dai_ops rt1019_aif_dai_ops = { .hw_params = rt1019_hw_params, .set_fmt = rt1019_set_dai_fmt, .set_sysclk = rt1019_set_dai_sysclk,