Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3851534rdg; Wed, 18 Oct 2023 07:51:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEryc0I30xg3RSUhPciB04E1P4kY6v3HdLg5hLA6WBIGx1krTOYGS+PhoM2OeSH6jHWPa9H X-Received: by 2002:a05:6871:438d:b0:1e9:b0be:d006 with SMTP id lv13-20020a056871438d00b001e9b0bed006mr6076938oab.2.1697640711870; Wed, 18 Oct 2023 07:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697640711; cv=none; d=google.com; s=arc-20160816; b=KmlEHkEikOBj59J2dTVQbLr1sDKyr/Oy/x2qyBOqGrkwPd9038ZfooSe6pzrXo2QTr HnFPi3ryySCVyePGlzCd1OlxrMEPFe6Q6E6K194QMQ5QoZa5fx/GWSumOsIK+vXJyfBB q+Czb7gotchwLOqZEJ3gCYwuSoeiOm/wZFPOLZOhsQE8gefPx8JzudkMErwjUIDENbHR CTftwbfk2Z45Tsntjfnw49rStMCBiWLuXQLihxH1EgLjOIR8wZVA9ncKwATDwcIfaJIO rRpx+tmSafKXUC6j+XlheAtKQlQ/2MyBtIKySmllhGYE+XsfJJrFJx6rTLTp2fxocxra 5ejg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=IFGPxAKEcz0uYIfiUkY+k3G9j3CiAEVpwClrUaoP8Mg=; fh=zVnE8nzBiWjz6k8ByGXbhrRZONZVucV+BveYc4wwjYA=; b=I+3secGpaE98UYmC9gT5ek2Us8JNauZUFmAJ5qDsIziv1oIh3fQ4v/OCyEHGrF3avB WdjFfB9xGzV9DT5ME2qeX+Y4JiII1zz3DsdxQqjU5Oq/fAT8YkkXGCV96OivjiiIWNbW AjskskBAg9oAPu8vWdizhvzkTlHARlskuFPP5FJsMAFBmfL5mlaVU/TShpKlLkc/9oKC itxpQvfqIql7uHad4WpxJb/OqrKGfNptkQlIbIvSluh0r/KA0I4l+t8Vz4kMg9+deqnz /+4DWpxP5tnrMOHstKUtfDnE+Clk4y9kNuRyPw2PXxBMCc0Wf4m6A1JC4PGhnOZbTGRs 7aWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bBefqQar; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id z3-20020a633303000000b00585999a38a6si2229979pgz.793.2023.10.18.07.51.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 07:51:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bBefqQar; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3BAD78047057; Wed, 18 Oct 2023 07:51:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344933AbjJROvP (ORCPT + 99 others); Wed, 18 Oct 2023 10:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231901AbjJROvJ (ORCPT ); Wed, 18 Oct 2023 10:51:09 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7464794; Wed, 18 Oct 2023 07:51:07 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24527C433C7; Wed, 18 Oct 2023 14:51:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697640667; bh=/nVpBEadMIgZ+gxlnKonNNjTqY37ybItw/nlqmFc0n0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=bBefqQarWerlAjrezIqYxtpiAu1FxseZNEKYwanHhVc3DQejDqAaz/AiHU9OU/8zZ YSnpmoQqGTAd+5SfCDBYbgZU53E/ZaT4ITDjIA6P8rLwc6nGoD4rM05YGnEyYR38NS oo/a37jKh7IDzQgSSuSQaGhKOmx+Md4uWyCyKorP+XG8Lg40qXfNeJXHzDhTcTQt0F CSesjLhuUglQRfgz3a06Pv1711tahlabqyZdN4kr68BLDW05+l0v3bFJZ+9DwKoNId THxfIRaYJvOhWITcixnIsAITByCr0y3od6785g/O+1j7u0r1FhDNt3byKAqE1jHTCv PUOb9vR/KwA7Q== Message-ID: Date: Wed, 18 Oct 2023 23:51:01 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 01/26] PM / devfreq: rockchip-dfi: Make pmu regmap mandatory Content-Language: en-US To: Sascha Hauer , linux-rockchip@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Heiko Stuebner , Kyungmin Park , MyungJoo Ham , Will Deacon , Mark Rutland , kernel@pengutronix.de, Michael Riesch , Robin Murphy , Vincent Legoll , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, Sebastian Reichel References: <20231018061714.3553817-1-s.hauer@pengutronix.de> <20231018061714.3553817-2-s.hauer@pengutronix.de> From: Chanwoo Choi In-Reply-To: <20231018061714.3553817-2-s.hauer@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 07:51:32 -0700 (PDT) On 23. 10. 18. 15:16, Sascha Hauer wrote: > As a matter of fact the regmap_pmu already is mandatory because > it is used unconditionally in the driver. Bail out gracefully in > probe() rather than crashing later. > > Fixes: b9d1262bca0af ("PM / devfreq: event: support rockchip dfi controller") > Reviewed-by: Sebastian Reichel > Signed-off-by: Sascha Hauer > --- > > Notes: > Changes since v4: > - move to beginning of the series to make it easier to backport to stable > - Add a Fixes: tag > - add missing of_node_put() > > drivers/devfreq/event/rockchip-dfi.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > > diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c > index 39ac069cabc75..74893c06aa087 100644 > --- a/drivers/devfreq/event/rockchip-dfi.c > +++ b/drivers/devfreq/event/rockchip-dfi.c > @@ -193,14 +193,15 @@ static int rockchip_dfi_probe(struct platform_device *pdev) > return dev_err_probe(dev, PTR_ERR(data->clk), > "Cannot get the clk pclk_ddr_mon\n"); > > - /* try to find the optional reference to the pmu syscon */ > node = of_parse_phandle(np, "rockchip,pmu", 0); > - if (node) { > - data->regmap_pmu = syscon_node_to_regmap(node); > - of_node_put(node); > - if (IS_ERR(data->regmap_pmu)) > - return PTR_ERR(data->regmap_pmu); > - } > + if (!node) > + return dev_err_probe(&pdev->dev, -ENODEV, "Can't find pmu_grf registers\n"); > + > + data->regmap_pmu = syscon_node_to_regmap(node); > + of_node_put(node); > + if (IS_ERR(data->regmap_pmu)) > + return PTR_ERR(data->regmap_pmu); > + > data->dev = dev; > > desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL); Already applied it on v7. -- Best Regards, Samsung Electronics Chanwoo Choi