From patchwork Tue Jun 7 07:29:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12871453 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF1CEC433EF for ; Tue, 7 Jun 2022 07:32:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:MIME-Version:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WXFeZpyTNVpu0KNOopFhI6dYb4TV1fScbDxWpSGcthk=; b=MecsufYQnwZQp4 00G2adCp29nkmgOE5hkvsdRAQ3xLWjsvClzMN0Bp5IrjIrowESqjJWoLEnfNP+Wm440kl+N2QqjpQ SlIHjoM6rxx2pvzBkY5RmpUIQI8+8W+OIxXQa9ejWnFd0TYE+Uwy4nh+LvblkMia1LcRqk3vRaVQo xk551o7nx/x3sLQE7kAGv8+evoI/YmiJSVmDyeIohG4bKBNwg2Si+BYfoqfEAjXLgQmTTXInM/Prj za8mXclenG9tG7l46JH2/or9GK6Hwihua3IZSOsZvDelCIQyBpL3QA49folx0FnhvmVfhYqjxcinQ cwTr4KzN0U0hOdtQAq8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyTff-005SWh-Rn; Tue, 07 Jun 2022 07:30:36 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyTeq-005SCr-91 for linux-arm-kernel@lists.infradead.org; Tue, 07 Jun 2022 07:29:50 +0000 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20220607072942epoutp01ad8a0ac2d256ce31dfbc47c796ad5017~2RhgC6IXP1637016370epoutp01Y for ; Tue, 7 Jun 2022 07:29:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20220607072942epoutp01ad8a0ac2d256ce31dfbc47c796ad5017~2RhgC6IXP1637016370epoutp01Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1654586982; bh=Qoxcr9pYAwshLqxQI3GLFF/ElSmyVGxjOlDsHwYgFMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hBSjT0HA5EV0+nUSBLOCdePY8RcLNkjM33ctq3XRNF84dWzpluLGbxuxwDrHdybmj hdaQhPh5A6DIaVfdOAQeo4TUvgb7aBWt3E/AMBPyDE84Z0dmMXvUY2uljVTp+bZown OC8JELCz4d7Dvv8iGFOCptIMR32V4S1oL4QDW2p4= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20220607072941epcas2p4c9af223fa392314818c3d05927c02368~2RhfK_7ON2030220302epcas2p4K; Tue, 7 Jun 2022 07:29:41 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.102]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4LHMSN0VzXz4x9Pw; Tue, 7 Jun 2022 07:29:40 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id EB.93.10069.26EFE926; Tue, 7 Jun 2022 16:29:38 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20220607072938epcas2p4aa59fc2826fe0563bc1f8f68301e2bb4~2RhccVO3z1805518055epcas2p4j; Tue, 7 Jun 2022 07:29:38 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220607072938epsmtrp2cdee827be408df6b7cd7b0d8f0e3932c~2RhcbCFu42177421774epsmtrp2G; Tue, 7 Jun 2022 07:29:38 +0000 (GMT) X-AuditID: b6c32a45-a79ff70000002755-25-629efe6218be Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 6C.53.08924.26EFE926; Tue, 7 Jun 2022 16:29:38 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220607072937epsmtip14c868702fb2a99b8fdcb028334e7305c~2RhcQn8hj0441404414epsmtip1f; Tue, 7 Jun 2022 07:29:37 +0000 (GMT) From: Chanho Park To: Kishon Vijay Abraham I , Vinod Koul , Krzysztof Kozlowski , Alim Akhtar , Rob Herring , Krzysztof Kozlowski Cc: devicetree@vger.kernel.org, linux-phy@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Chanho Park Subject: [PATCH v4 3/5] phy: samsung: ufs: constify samsung_ufs_phy_cfg Date: Tue, 7 Jun 2022 16:29:05 +0900 Message-Id: <20220607072907.127000-4-chanho61.park@samsung.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607072907.127000-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCJsWRmVeSWpSXmKPExsWy7bCmqW7Sv3lJBs3zFC0ezNvGZnF5v7bF /CPnWC0uPO1hs+h78ZDZYu/rrewWmx5fY7WYsOobi8WM8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wu6as1ixTomlOCPRUIu5qDgRAKwwFl7yAgAA X-CMS-MailID: 20220607072938epcas2p4aa59fc2826fe0563bc1f8f68301e2bb4 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220607072938epcas2p4aa59fc2826fe0563bc1f8f68301e2bb4 References: <20220607072907.127000-1-chanho61.park@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220607_002944_687257_3352037E X-CRM114-Status: GOOD ( 20.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Put const qualifier of samsung_ufs_phy_cfg pointer because they will not be changed from drvdata. Signed-off-by: Chanho Park Reviewed-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar --- drivers/phy/samsung/phy-samsung-ufs.c | 4 ++-- drivers/phy/samsung/phy-samsung-ufs.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/samsung/phy-samsung-ufs.c b/drivers/phy/samsung/phy-samsung-ufs.c index ed272631e8aa..cd1c02d2cdda 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.c +++ b/drivers/phy/samsung/phy-samsung-ufs.c @@ -75,7 +75,7 @@ static int samsung_ufs_phy_wait_for_lock_acq(struct phy *phy) static int samsung_ufs_phy_calibrate(struct phy *phy) { struct samsung_ufs_phy *ufs_phy = get_samsung_ufs_phy(phy); - struct samsung_ufs_phy_cfg **cfgs = ufs_phy->cfgs; + const struct samsung_ufs_phy_cfg * const *cfgs = ufs_phy->cfgs; const struct samsung_ufs_phy_cfg *cfg; int err = 0; int i; @@ -327,7 +327,7 @@ static int samsung_ufs_phy_probe(struct platform_device *pdev) drvdata = match->data; phy->dev = dev; phy->drvdata = drvdata; - phy->cfgs = (struct samsung_ufs_phy_cfg **)drvdata->cfgs; + phy->cfgs = drvdata->cfgs; phy->isol = &drvdata->isol; phy->lane_cnt = PHY_DEF_LANE_CNT; diff --git a/drivers/phy/samsung/phy-samsung-ufs.h b/drivers/phy/samsung/phy-samsung-ufs.h index 1788b356cf56..5cd919539a3e 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.h +++ b/drivers/phy/samsung/phy-samsung-ufs.h @@ -121,7 +121,7 @@ struct samsung_ufs_phy { struct clk *rx0_symbol_clk; struct clk *rx1_symbol_clk; const struct samsung_ufs_phy_drvdata *drvdata; - struct samsung_ufs_phy_cfg **cfgs; + const struct samsung_ufs_phy_cfg * const *cfgs; const struct pmu_isol *isol; u8 lane_cnt; int ufs_phy_state;