From patchwork Wed Mar 2 12:43:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivasa Rao Mandadapu X-Patchwork-Id: 548228 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03133C433EF for ; Wed, 2 Mar 2022 12:43:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237747AbiCBMoT (ORCPT ); Wed, 2 Mar 2022 07:44:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241864AbiCBMoQ (ORCPT ); Wed, 2 Mar 2022 07:44:16 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5AE98AE4B; Wed, 2 Mar 2022 04:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1646225014; x=1677761014; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=UIvLL/Xy91JReyqLFHSeFe/zpskkHQnpVd4SIdUB3UQ=; b=QCd5TCbhS33YTBzYqA76LOas1kUSCZr2k0FtT2m8CxSomeSGvLsHn6uD a3U2iTUQW2eK6k26f6nsQTfcm61Q09Y9Aljf+ZuEutDRTpw510vUezciE fQC91P31SV+LrCbhYg7oJDvvn7qUDcmx8AudWass2/2iziVh9d/+B/DbR Y=; Received: from ironmsg07-lv.qualcomm.com ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 02 Mar 2022 04:43:33 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg07-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2022 04:43:32 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 2 Mar 2022 04:43:32 -0800 Received: from hu-srivasam-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 2 Mar 2022 04:43:25 -0800 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH v6 2/3] soundwire: qcom: constify static struct qcom_swrm_data global variables Date: Wed, 2 Mar 2022 18:13:01 +0530 Message-ID: <1646224982-3361-3-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1646224982-3361-1-git-send-email-quic_srivasam@quicinc.com> References: <1646224982-3361-1-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The qcom_swrm_data structures is only required for setting soundwire params, so make the qcom_swrm_data structure const to allow the compiler to put it in read-only memory and avoid unintentional modifications. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu --- drivers/soundwire/qcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index fc41210..2d955ca 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -166,12 +166,12 @@ struct qcom_swrm_data { u32 default_rows; }; -static struct qcom_swrm_data swrm_v1_3_data = { +static const struct qcom_swrm_data swrm_v1_3_data = { .default_rows = 48, .default_cols = 16, }; -static struct qcom_swrm_data swrm_v1_5_data = { +static const struct qcom_swrm_data swrm_v1_5_data = { .default_rows = 50, .default_cols = 16, };