From patchwork Tue Jan 3 11:29:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Lu X-Patchwork-Id: 13087627 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 34B2FC3DA7D for ; Tue, 3 Jan 2023 15:50:22 +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:MIME-Version:References: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=sJ1KDfQj0XBZrG7E/Fa2R62xJ0XRqh56t4N+BpO438c=; b=hU2508DaSFzm/J 3bL+4909z65ZF1UCL4jsSM+3/oQ+EcgrnWFYdd/OTDRjjrip2HV6OqXXUQuL3rsY/4L/IUjO2/UVG iWj7eOdXMLokU4upoltOL+7lg4/2wOE7WCbjLWWbC0XC2OLE/K+DIVVhLomubntxplMsTFsDulEKX tXhlJJWFgzzDpMkxDZBIGonyngSHyFRiJDZFakFvRDoSsMFeFJ5GcN60PjYcZ5oZrZJ2JGjefEdTO UmIMXBMqSSLn7geyYgxW5JlOvZ0QF+pM6xRi4/USbYpm34fBdolamibWcT1iM46FrRdCN4N1iDXHC LmSsHSudrFhGw0+m6VKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCjWf-002beL-LI; Tue, 03 Jan 2023 15:48:31 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCfo3-0013qW-Tz; Tue, 03 Jan 2023 11:50:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=6Sq/sAfTpgkWc7ZeE72qhux4vsS2w/D6it6j/hKEQAs=; b=nUkwOR7QNK09NGTnmoqpsMD2gW Dn2YckDQp86XtsDbS8c3oUGEo3N+FQVaDcZf6TwBmiDu524PnnexVBZYiiuElNX9r5WbPAjZSjjLu W/rLhmR3t+cv7/tHeSe/x9SMmLkmsgetCm6Kin1i57eIH+y0ueWWWgROohgPA+7hKyFI8i+4MlFGd 5aqCNyb1lHthqOR0AyhWnAq9rtrANRvMvkf93OWdR+6bVa5IU32npmtXn8bFXuNFVM0QjG3P0YFUx gKX322cOvJltFnvDsDM/cNp3DL3Ze11yzoQwUsQf3uhdP//XUaN9CvSgAOvXqqpR4UP3ErXw7/vYk s2Mb7AHQ==; Received: from mailgw01.mediatek.com ([216.200.240.184]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pCfnu-000aQh-1I; Tue, 03 Jan 2023 11:50:05 +0000 X-UUID: ead10eb0e7a7455cb84bd52eabae3112-20230103 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=6Sq/sAfTpgkWc7ZeE72qhux4vsS2w/D6it6j/hKEQAs=; b=M12pbSd33pUBNXrtfdOe21AnegQXpEhlPgH8BnAB0eVQudERBUdZJZJZQdJvZQP3vhZX/sxs+ntoovZGlnDlERUwG+papn/8Ra1ARu1i2GjZtxdVcpLdluQilXZjarRLlf7lFvbf2iv2vpwF7tDee0Cs8zdwTzlmXNayUt3YmVM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.16,REQID:626abd9a-adc5-4f98-b5df-9904a96d147b,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:09771b1,CLOUDID:9e231c8b-8530-4eff-9f77-222cf6e2895b,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0 X-CID-BVR: 0 X-UUID: ead10eb0e7a7455cb84bd52eabae3112-20230103 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 678292999; Tue, 03 Jan 2023 04:50:02 -0700 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 3 Jan 2023 19:29:26 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Tue, 3 Jan 2023 19:29:26 +0800 From: Roger Lu To: Matthias Brugger , Enric Balletbo Serra , Kevin Hilman , Nicolas Boichat CC: Fan Chen , Roger Lu , Jia-wei Chang , , , , , , Subject: [PATCH v3 04/14] soc: mediatek: mtk-svs: improve readability of platform_probe Date: Tue, 3 Jan 2023 19:29:15 +0800 Message-ID: <20230103112925.16554-5-roger.lu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230103112925.16554-1-roger.lu@mediatek.com> References: <20230103112925.16554-1-roger.lu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230103_115003_102891_30756584 X-CRM114-Status: GOOD ( 11.05 ) 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 From: Matthias Brugger If a compatible misses a match data entry, then something is wrong in the development phase, we don't need to check for that at runtime. Signed-off-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Roger Lu --- drivers/soc/mediatek/mtk-svs.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c index 5abf94aafbac..7fea1a5bb842 100644 --- a/drivers/soc/mediatek/mtk-svs.c +++ b/drivers/soc/mediatek/mtk-svs.c @@ -2332,10 +2332,6 @@ static struct svs_platform *svs_platform_probe(struct platform_device *pdev) int ret; svsp_data = of_device_get_match_data(&pdev->dev); - if (!svsp_data) { - dev_err(&pdev->dev, "no svs platform data?\n"); - return ERR_PTR(-EPERM); - } svsp = devm_kzalloc(&pdev->dev, sizeof(*svsp), GFP_KERNEL); if (!svsp)