[v1,13/13] soc: mediatek: mtk-svs: keep svs alive even though debug cmd create fail
Message ID | 20221226094248.4506-14-roger.lu@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp827892wrt; Mon, 26 Dec 2022 01:43:20 -0800 (PST) X-Google-Smtp-Source: AMrXdXs9qlSHDppiHZEeCIq3DzBoU2gEPTbOhIpZsCLndaGNCHFuco9glw6u0E5bMtWaHRbkKPxT X-Received: by 2002:a17:902:bc45:b0:191:3c3d:86fd with SMTP id t5-20020a170902bc4500b001913c3d86fdmr20383868plz.48.1672047800420; Mon, 26 Dec 2022 01:43:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672047800; cv=none; d=google.com; s=arc-20160816; b=Yr7BbKOUjzPapdOJBi6vF2llrGskYq9UEbCgwEtfg9eEgTfnwnUOfF4i6LPoMkG2UZ sn0TI4E+cK/OTOS/KViaY1J7OA2NWkY1MP7XDHNxaOD/hJLAGmSxV0p1lijcLKZwDaxx ZUwbeJDK7FZThlTDIOqk9t5no2tnyKm6pbS2UFrHTv44aQYZvdNwxHGf0Adk4AJ1PpFT 698DqLWHA7VayxJpIC+iKrnaUQ4flnxGfRoegrYigwQe3wpvLmJF3VWzsNpn4VRLPGoY sSoBsyyBB2SqERBUfrwq4COCwd1nS6TltP+sXUA35lmuaNWGs7bh/jOBMnjQE03gi/iL LtuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=+ZY4AZDYf3MqfVor9zqLlQKC36zLAsqpKfJ+7P47ujI=; b=RZzkiZ64/9cqcYYPztJhQWPyq4AJlyjvDHzR/AXpPaOSan/O7salNFMAIC/qakZANe MBskthDfBCkyirY5Pu3b73bdN6qRG29Kwd80NRVa5bqvWJu38SCNQ2dPvbifFELevGlB RJEddUoY+CnJoGNenqDxY+pNKu3j7PJWzhFG8vg/xD9UeyhNLqAyrlSGkWxZCQUaaNWf tmTb2znpI6tFSZzJz3vADo1QzJjeJGmmaXm0R2BIK0jvjlWfnm5zBg5PmOuuRM3xFb8Y hmUcXq1zULCchj5HRJmoQWM8zsHmF50KYDgg4txOOtqZbkHwzn7K3aZTrof2DudfY8zW VoYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=iRqE5c1f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x21-20020a17090300d500b001727963f929si9727796plc.130.2022.12.26.01.43.07; Mon, 26 Dec 2022 01:43:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=iRqE5c1f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229882AbiLZJnE (ORCPT <rfc822;eddaouddi.ayoub@gmail.com> + 99 others); Mon, 26 Dec 2022 04:43:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbiLZJnB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 26 Dec 2022 04:43:01 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7DB5E9A; Mon, 26 Dec 2022 01:42:55 -0800 (PST) X-UUID: 3d8b3de9dccd48a38854db9895f980cf-20221226 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=+ZY4AZDYf3MqfVor9zqLlQKC36zLAsqpKfJ+7P47ujI=; b=iRqE5c1fBQfL9ilf9ed2Vj8bLdLF+Uuiep35H9CBSpFBhd1wB2QvdlX7Zvf2WfcAuR9Pj4o2B+4Bbx5/ajnldNn4UzHeeNXRVAA92mjfhWNCBpk/tzwQxD+dX+8d9oEQKGx98t81eQQL+xpzveomHDnNChVw7sK8MwqbvD1b1t0=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14,REQID:30fa7659-3431-4768-9d21-253a3aa23a69,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:dcaaed0,CLOUDID:e1166a8a-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 X-UUID: 3d8b3de9dccd48a38854db9895f980cf-20221226 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from <roger.lu@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1154924887; Mon, 26 Dec 2022 17:42:52 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Mon, 26 Dec 2022 17:42:51 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Mon, 26 Dec 2022 17:42:51 +0800 From: Roger Lu <roger.lu@mediatek.com> To: Matthias Brugger <matthias.bgg@gmail.com>, Enric Balletbo Serra <eballetbo@gmail.com>, Kevin Hilman <khilman@kernel.org>, Nicolas Boichat <drinkcat@google.com> CC: Fan Chen <fan.chen@mediatek.com>, Roger Lu <roger.lu@mediatek.com>, Jia-wei Chang <jia-wei.chang@mediatek.com>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com> Subject: [PATCH v1 13/13] soc: mediatek: mtk-svs: keep svs alive even though debug cmd create fail Date: Mon, 26 Dec 2022 17:42:48 +0800 Message-ID: <20221226094248.4506-14-roger.lu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20221226094248.4506-1-roger.lu@mediatek.com> References: <20221226094248.4506-1-roger.lu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753269194749433919?= X-GMAIL-MSGID: =?utf-8?q?1753269194749433919?= |
Series |
Enahance SVS's robustness
|
|
Commit Message
Roger Lu
Dec. 26, 2022, 9:42 a.m. UTC
Some projects might not support DEBUG_FS but still needs svs to be
supported. Therefore, keep svs alive even though debug cmd create fail.
Signed-off-by: Roger Lu <roger.lu@mediatek.com>
---
drivers/soc/mediatek/mtk-svs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
Il 26/12/22 10:42, Roger Lu ha scritto: > Some projects might not support DEBUG_FS but still needs svs to be > supported. Therefore, keep svs alive even though debug cmd create fail. > > Signed-off-by: Roger Lu <roger.lu@mediatek.com> > --- > drivers/soc/mediatek/mtk-svs.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c > index af3a12e29e78..c780a115543e 100644 > --- a/drivers/soc/mediatek/mtk-svs.c > +++ b/drivers/soc/mediatek/mtk-svs.c > @@ -2390,10 +2390,8 @@ static int svs_probe(struct platform_device *pdev) > } > Instead of ignoring a planned failure, it's sensible to not fail at all: enclose this call and the svs_create_debug_cmds() function in an ifdef. #ifdef CONFIG_DEBUG_FS > ret = svs_create_debug_cmds(svsp); > - if (ret) { > + if (ret) > dev_err(svsp->dev, "svs create debug cmds fail: %d\n", ret); > - goto svs_probe_iounmap; > - } #endif > > return 0; > > Regards, Angelo
Hi AngeloGioacchino, Sorry for the late reply and thanks for the advices always. On Tue, 2023-01-03 at 13:49 +0100, AngeloGioacchino Del Regno wrote: > Il 26/12/22 10:42, Roger Lu ha scritto: > > Some projects might not support DEBUG_FS but still needs svs to be > > supported. Therefore, keep svs alive even though debug cmd create fail. > > > > Signed-off-by: Roger Lu <roger.lu@mediatek.com> > > --- > > drivers/soc/mediatek/mtk-svs.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c > > index af3a12e29e78..c780a115543e 100644 > > --- a/drivers/soc/mediatek/mtk-svs.c > > +++ b/drivers/soc/mediatek/mtk-svs.c > > @@ -2390,10 +2390,8 @@ static int svs_probe(struct platform_device *pdev) > > } > > > > Instead of ignoring a planned failure, it's sensible to not fail at all: > enclose this call and the svs_create_debug_cmds() function in an ifdef. > > #ifdef CONFIG_DEBUG_FS > > > ret = svs_create_debug_cmds(svsp); > > - if (ret) { > > + if (ret) > > dev_err(svsp->dev, "svs create debug cmds fail: %d\n", ret); > > - goto svs_probe_iounmap; > > - } > > #endif Okay. I got it and will add ifdef CONFIG_DEBUG_FS in mtk-svs.c to make sure no other side effects. > > > > > return 0; > > > > > > Regards, > Angelo > >
diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c index af3a12e29e78..c780a115543e 100644 --- a/drivers/soc/mediatek/mtk-svs.c +++ b/drivers/soc/mediatek/mtk-svs.c @@ -2390,10 +2390,8 @@ static int svs_probe(struct platform_device *pdev) } ret = svs_create_debug_cmds(svsp); - if (ret) { + if (ret) dev_err(svsp->dev, "svs create debug cmds fail: %d\n", ret); - goto svs_probe_iounmap; - } return 0;