From patchwork Thu Jun 2 05:32:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12867525 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 95C13C43334 for ; Thu, 2 Jun 2022 05:35:09 +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=NP0CtPX057JXldIxfcs0HPXVpIxe8ZMHQsQqd479ESQ=; b=lHD+X2FmkE6k0D kZbR5NMRBtcdkvLvI7OmyJA/UVagH+UmZpnWVbONxC0Ka81OlZUr3pt1NSiM1o33v1pUmMwaP1IyU ypujpk1j2B0PIPUIDYLwH1yN5ge2xP+dVEWWq/td94jZ2DGVTBci7eU7BU2o6+ohW0ly0Go0NPhFF WOu2JrUJ0pXr61JlGZOPWmqGrvAB7RAFY0cjbFKH3XgdYxd5i35FBd1isB1Xm8drpvdIp163XZ2XZ PpTi6Vmg2+HYHcp+FRq/obp/e+H2crkeHt9xdUfs8N5Me7/qxOSOWdfBG3AGSmskft4YineA+mOpj PUwelYGpsJ7h3U6+V8iA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwdT1-001Tqe-AW; Thu, 02 Jun 2022 05:33:55 +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 1nwdSk-001TgP-FZ for linux-arm-kernel@lists.infradead.org; Thu, 02 Jun 2022 05:33:42 +0000 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20220602053332epoutp0192ae5dca5953933af53d7975f1097e28~0ttpVXwUt0840008400epoutp013 for ; Thu, 2 Jun 2022 05:33:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20220602053332epoutp0192ae5dca5953933af53d7975f1097e28~0ttpVXwUt0840008400epoutp013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1654148012; bh=WgvzKcHvfk9gUWzad49jIUGGE8V9NcBo2HSwvhCse7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XIr0Ip6Q/tMQGKh1eLkIUsOqVr2Ul3wy2AWoPuInz90yBJ5xsZ1OzN+N0sUAlexfG JBm8R7TSgPQWDpDY8O7LMORI840EqKBD9UBLxJSxG3wdCrcsKAjHa90maCCHAKbJ/C i3XgJYkps790s4Z+OaeUFVhvDL8oUjTq3p9GKd0I= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20220602053331epcas2p324cc6438bffd229c8daab763e0e2539f~0ttolIAsP1927619276epcas2p3L; Thu, 2 Jun 2022 05:33:31 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.36.100]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4LDF6f0hf2z4x9QB; Thu, 2 Jun 2022 05:33:30 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 7E.23.09764.9AB48926; Thu, 2 Jun 2022 14:33:29 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20220602053329epcas2p238f5019ff98e4d9fcf5fea0001a773a9~0ttm2BqXV0634006340epcas2p2h; Thu, 2 Jun 2022 05:33:29 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220602053329epsmtrp13bb802533e673910d4ffa5b7c371d124~0ttmzRqyB1617116171epsmtrp1W; Thu, 2 Jun 2022 05:33:29 +0000 (GMT) X-AuditID: b6c32a46-f75ff70000002624-ec-62984ba95338 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id BC.28.08924.9AB48926; Thu, 2 Jun 2022 14:33:29 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220602053329epsmtip2e0bed9f29b22452577a1e10eeaa6eeee~0ttmoIUeT0736507365epsmtip2f; Thu, 2 Jun 2022 05:33:29 +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 v2 2/6] phy: samsung: ufs: constify samsung_ufs_phy_cfg Date: Thu, 2 Jun 2022 14:32:46 +0900 Message-Id: <20220602053250.62593-3-chanho61.park@samsung.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220602053250.62593-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCJsWRmVeSWpSXmKPExsWy7bCmhe5K7xlJBreeG1o8mLeNzeLyfm2L +UfOsVpceNrDZtH34iGzxd7XW9ktNj2+xmoxYdU3FosZ5/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p+rb8bTC6rsRSnJFoqMVcVJwIAPwPwazyAgAA X-CMS-MailID: 20220602053329epcas2p238f5019ff98e4d9fcf5fea0001a773a9 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220602053329epcas2p238f5019ff98e4d9fcf5fea0001a773a9 References: <20220602053250.62593-1-chanho61.park@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220601_223338_930729_707806A6 X-CRM114-Status: GOOD ( 20.96 ) 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 --- 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 602ddef259eb..b7ddb91a02be 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->cfg; + const struct samsung_ufs_phy_cfg **cfgs = ufs_phy->cfg; 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->cfg = (struct samsung_ufs_phy_cfg **)drvdata->cfg; + phy->cfg = drvdata->cfg; 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 91a0e9f94f98..8c3696b3c5ec 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 **cfg; + const struct samsung_ufs_phy_cfg **cfg; const struct pmu_isol *isol; u8 lane_cnt; int ufs_phy_state;