Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp259093lqt; Thu, 6 Jun 2024 02:44:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXnX/SAOOajL5mKVj0wlGDqC5DVOQGDKGqESL9HFTsO5GazmlwmBRKiriWzHa88mhGzJ0hzfRQl/kG+s4U4AW8BR2HKRRofRIMja60qnQ== X-Google-Smtp-Source: AGHT+IHNNOMH4OCGWQsScncJDh/R93NLFlVSaBK0STaJYENB0ZuFYYJvlrxeH1QQd1OdaOCLxX10 X-Received: by 2002:a17:906:2b16:b0:a68:a843:9014 with SMTP id a640c23a62f3a-a699f561371mr326527266b.18.1717667042126; Thu, 06 Jun 2024 02:44:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717667042; cv=pass; d=google.com; s=arc-20160816; b=MUMZN62MkBheRd/B9eefqn/TFRTImsWBhhi+n6uo55PYyAA+PvzKIqZx0rm5/JGeii vOWI1XMwjrhJ3gOnuWbIuOhYkHIZ/KKA28+yD/Ifa4G+zLFB+BThc2ZA7204JDLr8XNi HgAon2PTC6WjSgv8Ey0e+z7Ojfz3SNled3hgsDlcjS8dojKAbTEHACy+M6d0qDqRQFcd MFJW4cavdMP4SNPZobKN2DFQ1E2Q50T/zYuTmmLaTbxmmnswNj7RWPKe0w1uoMNCIJC5 jm670aJZy8gD+JD4sXlRl6pTj7LKs7qJd3cXi/qRNB49eqv8hY3u7Bve/RaTaNNUgSIm Sv3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=TgGEgyUVmHUDzUOi3z1nNiQyiJsY5J6O2RDDS20xA9s=; fh=JnS8StU7Libgys4al+BkEyovkQfDAg86vbax1xISuLE=; b=RQC7uFoyNnki9m3d91o/p1zUrGolrW2qszgwNltuPfUV78hVqKVXj6NPQvZyfTPIYh FFT9d8+SFNWTBgzIwX7eE1JgNzli4O8VF8ysSg37j6UdC6F5OGDTnjpVOrUTW/ns4Eb7 q3KVdKNCgL9aarHefsEnoaSP7mShPj3J/6JThdSUZ1xlvLC8+bld7BXwqSwmdATqd7Wr OW/3OeSORZzo6JgBjuOUlFRcixSWAREb+TDNhIiwZzzkn79xMYcUY7b6nM+r0HEFQh8i mBoDd7ESBsKSiJdVmxoXTE04jzUftpQtFfbL4N5aaSpn/fsNSZkggs0WK8zzO+iG6MSS Q1XA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@norik.com header.s=default header.b=AnqJWWac; arc=pass (i=1 spf=pass spfdomain=norik.com dkim=pass dkdomain=norik.com); spf=pass (google.com: domain of linux-kernel+bounces-204039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204039-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c80727e0fsi48396666b.720.2024.06.06.02.44.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 02:44:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=fail header.i=@norik.com header.s=default header.b=AnqJWWac; arc=pass (i=1 spf=pass spfdomain=norik.com dkim=pass dkdomain=norik.com); spf=pass (google.com: domain of linux-kernel+bounces-204039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204039-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C3C7F1F22117 for ; Thu, 6 Jun 2024 09:44:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 668D1153593; Thu, 6 Jun 2024 09:43:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=norik.com header.i=@norik.com header.b="AnqJWWac" Received: from cpanel.siel.si (cpanel.siel.si [46.19.9.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EFAC152190; Thu, 6 Jun 2024 09:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.19.9.99 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717666996; cv=none; b=Jit7LapfhdfuD51oJmRpMfXDPXaDuziTIm6GzfLTA0+KQGZ22YSNQZ7WHHWLjPNcDnxK9IqGZzkXzEzr28Oo06qShm2VRkIGAasvqjn5d0Xf/pyUgHKrWb7oVb4gu+77lN4qYTg8rvep5cGnQle2aRDs54C8+d4LxbZgyeO1XTc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717666996; c=relaxed/simple; bh=WtTZSw6o7QEZSnR1qQILwf1Zth+4B8umIuBjR4kuBpE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=eKhtsc7dLvUyeEDI3xSL1gfZT6d19EFPVt+5r/CUcFvhPLBGRYEEa6lZsnCIz0HGDDemc8icmV4zosYfwDcQgV43JF3N1g34XZB49vDwVn6IIEpbtwjC+l+cB1ERDNg1mJ96jrNpniHJP+EfW1T/2XnyaMC2b1urdXEYAV5ElI4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=norik.com; spf=pass smtp.mailfrom=norik.com; dkim=pass (2048-bit key) header.d=norik.com header.i=@norik.com header.b=AnqJWWac; arc=none smtp.client-ip=46.19.9.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=norik.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=norik.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=norik.com; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TgGEgyUVmHUDzUOi3z1nNiQyiJsY5J6O2RDDS20xA9s=; b=AnqJWWacRCXWds/85xXwzG74xo czzU3YqcWm4nfly8wuOSVJQtVL8BLnHumexytxj53CNId8miHCeXpjD8QKNCS55b/AmKzzcmjIW6Q n8KrRgsf+OU+pA5itVgu/+YqXf4lGHDmo22NTLHIo9LIGY0cg2vc3qjNAawdZv7IMRCfhX+w5ht2f XI811XNpgPElAHg9d2C8fCP8f5THnchUlFjcbpc7AgwFW4tGm6+0Xj0doTAz9KqJZKYDxSZ+5cTr2 nplTI8LM70gXikhRuRMHTwmTtyh4V1/8260i4idVdPqM8AzgOX7mWl0jpUShTjyBseMJIqfSj1hdb 34AGzHsg==; Received: from [89.212.21.243] (port=41906 helo=[192.168.69.116]) by cpanel.siel.si with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96.2) (envelope-from ) id 1sF9eL-00BrXZ-0L; Thu, 06 Jun 2024 11:43:12 +0200 Message-ID: Date: Thu, 6 Jun 2024 11:43:10 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] OPP: ti: Fix ti_opp_supply_probe wrong return values To: Viresh Kumar Cc: Viresh Kumar , Nishanth Menon , Stephen Boyd , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, upstream@lists.phytec.de References: <20240606070127.3506240-1-primoz.fiser@norik.com> <20240606085956.wsp3ecyfqck5tltt@vireshk-i7> From: Primoz Fiser Content-Language: en-US Organization: Norik systems d.o.o. In-Reply-To: <20240606085956.wsp3ecyfqck5tltt@vireshk-i7> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel.siel.si X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - norik.com X-Get-Message-Sender-Via: cpanel.siel.si: authenticated_id: primoz.fiser@norik.com X-Authenticated-Sender: cpanel.siel.si: primoz.fiser@norik.com X-Source: X-Source-Args: X-Source-Dir: Hi Viresh, On 6. 06. 24 10:59, Viresh Kumar wrote: > On 06-06-24, 09:01, Primoz Fiser wrote: >> Function ti_opp_supply_probe() since commit 6baee034cb55 ("OPP: ti: >> Migrate to dev_pm_opp_set_config_regulators()") returns wrong values >> when all goes well and hence driver probing eventually fails. >> >> Fixes: 6baee034cb55 ("OPP: ti: Migrate to dev_pm_opp_set_config_regulators()") >> Signed-off-by: Primoz Fiser >> --- >> drivers/opp/ti-opp-supply.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/opp/ti-opp-supply.c b/drivers/opp/ti-opp-supply.c >> index e3b97cd1fbbf..ec0056a4bb13 100644 >> --- a/drivers/opp/ti-opp-supply.c >> +++ b/drivers/opp/ti-opp-supply.c >> @@ -393,10 +393,12 @@ static int ti_opp_supply_probe(struct platform_device *pdev) >> } >> >> ret = dev_pm_opp_set_config_regulators(cpu_dev, ti_opp_config_regulators); >> - if (ret < 0) >> + if (ret < 0) { >> _free_optimized_voltages(dev, &opp_data); >> + return ret; >> + } >> >> - return ret; >> + return 0; >> } >> >> static struct platform_driver ti_opp_supply_driver = { > > Not sure I understand the problem here. Can you please explain with an > example ? ti_opp_supply_probe -> dev_pm_opp_set_config_regulators -> dev_pm_opp_set_config (returns negative if error, otherwise >= 1) Lets assume dev_pm_opp_set_config returns 1 (SUCCESS): so now, without my patch: ti_opp_supply_probe returns 1 -> FAILURE and hence error: ti_opp_supply 4a003b20.opp-supply: probe with driver ti_opp_supply failed with error 1 with my patch: ti_opp_supply_probe returns 0 -> SUCCESS BR, Primoz