Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp492116pxj; Wed, 2 Jun 2021 04:29:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf8ZnivK9bAIJMq1tglV5iTluBTDfRX0qBVdyXKaIeJAd7A1MbZYqKFdAhZJ6ps7mqNuMs X-Received: by 2002:a6b:4105:: with SMTP id n5mr24563265ioa.148.1622633369743; Wed, 02 Jun 2021 04:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622633369; cv=none; d=google.com; s=arc-20160816; b=SZfLl3GiiaX/Jzqh+K8AA5qo3YVvocN0JVppk8/rAt1/vQE+5w4QUQgK5JJwGD3xRq gEY7kuib2qBp4Mw75mCnu+5kXRBdqbdegWqQDU9p71/2kTeCt0mZVtzvBBoxz6OwHpzV gH89OppELRhnA2uKMxzo8fZ2YCGK5aJo2fs06bOLagaSASfvjfRjDEG2Jypn3hpX/K1u OV7P2KxRHNbXx5jNTxM/9lnRhDP0EFaAcxnm6Wl+2sjEnoOdpvSaEYJ+ysofOBhdmlCf 6MOVMBSegf+0cfECLAvI7SmHHv/sxr+HFvQmN0fOFdekmrbSXPeTPNaeXMOksaMhVpoi gltw== 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=WOpxOMCnAEhBZBQ5/b8SP7yqRWBJcXnYEAYcdQrs/Lg=; b=lhW1Gq8QOZ6XGJUd0jMNeHQWX1147C1e/EhXKV4U5EO02sYTT/Syw6CzoeLOb8/w80 hoc/2CBfiu/tGQp8mUk0Uw6D5/35gNidgBiTzn5HZ8WlsUq6BNB8GFBpZDuTEBxPzP3P /wWaNFrMchuLNzSNq04uiBsIY2tL+XbMh//tXG1ABPqVHfk20heAD7PlPD8dldCdn/iy dn4+gJW5xWZIcUPV4yS7DZbDhMAeTrcVYwFp/oqjiv8cEaVght6WqpRJZ6p1tTd33hL1 6JEXK1+vva/RnV4QkTr8GvJwp0QKkoVjnrEci9jEMzoOCCQ2oTxmFMzNR/ow9qwZw9ye absA== 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 e11si21270671jaj.14.2021.06.02.04.29.16; Wed, 02 Jun 2021 04:29:29 -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 S232744AbhFBL23 (ORCPT + 99 others); Wed, 2 Jun 2021 07:28:29 -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: 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: 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,