Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp342811pxx; Thu, 29 Oct 2020 04:09:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxq49qfeEo/6Ja5vHtrt9OXqcLLw22u79qAuHUGH0RewI3vKmalA4vk7MNCZUby4OJa9g5E X-Received: by 2002:aa7:c490:: with SMTP id m16mr3342265edq.298.1603969757844; Thu, 29 Oct 2020 04:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603969757; cv=none; d=google.com; s=arc-20160816; b=cSBR0ojf3o9ISYcr0SNemkb41N+kp0R6rRHDAxC8aQ2zVoRCg6s6ho4cYKAb7Wtd2K qnnIOwe6mMIqaO/FUcCOVpTk9z3cGYbsR0skEYZQBd8RQ60ZNmXErxa7dAh6ZhmihjQs mQXvUNc3XgWO3ajN5Cg6CW7AsRpGuYa6BlIbmX7gxGPbcT+RR0yDEvyDWNTVg2L62RMG QdV/gwEqir8i1/EkCTvwqysJhV5psnoDkChyJyki6GqadLob2UPvLCsxCsNWh9efE7D4 YuL/QPp78VlX/lLxH0RydmSutYdfMMW+0ODgFgw/Kz2e0+/pHhhvRknT9fKOZarrKWMA 1qWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=7Y8IMlS8Rjtuh3Bt1F7fB0E0fJme1LZMMGNHEg4TuLg=; b=Yjr3LNaJVxhe5H463GbwMtEMvqgDshaQl85KPzIJ05g2IFGONLr8ynaSHL2WHd4K9t kLABFzrLNKSRw/60dCmXuoCA9BbLgpEW7BLTZcwwEy6Y7+mnRfmORx2n6pMykdtzOuLU Kviv2vAPMQQFtgbiI7qqflByfKos1eDjN5fFmO4AyVzevhKcOsKZf0NtrBSTJv/HvSCa sQ3ypdLXdUUJTpxUEJpUhcex1V8Qv9ZNVYOJvOUH0VR7LuUiu/nO9yE8ViOXnKal+PW1 FsGABzUnFZjxmSba6aGF4axaUgMf0giixtCt8SCJIj/Lw5qOalGlNJ/mWTrGs/d14Ecz FPpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=DVdwOLiQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si1834732ejm.548.2020.10.29.04.08.53; Thu, 29 Oct 2020 04:09:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=DVdwOLiQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727215AbgJ2LFa (ORCPT + 99 others); Thu, 29 Oct 2020 07:05:30 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:52892 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726815AbgJ2LFa (ORCPT ); Thu, 29 Oct 2020 07:05:30 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 09SFS63u018155; Wed, 28 Oct 2020 10:28:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1603898886; bh=7Y8IMlS8Rjtuh3Bt1F7fB0E0fJme1LZMMGNHEg4TuLg=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=DVdwOLiQSHX8V2LbMdZpX1FpOyCsAW5KZ3ASa9hYMNNop9pOupI2YuvIMR/56/qqX E/ur3zV5VA5hCtC7sTzPB5F5nxCZTC5ZwuDJn3Tr8bfQvFESJgsjsaEE+F/NKteV2F dQ8hCFXxrMxuqYxkyTiPKMZ852rn/jEosvs7tzZI= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 09SFS6qn039511 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 28 Oct 2020 10:28:06 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 28 Oct 2020 10:28:06 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Wed, 28 Oct 2020 10:28:06 -0500 Received: from [127.0.0.1] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 09SFS47m046337; Wed, 28 Oct 2020 10:28:04 -0500 Subject: Re: [PATCH] opp: fix bad error check logic in the opp helper register To: Viresh Kumar CC: , , , , References: <20201028141357.10345-1-t-kristo@ti.com> <20201028145405.ucfepzt6xoxro6fi@vireshk-i7> From: Tero Kristo Message-ID: Date: Wed, 28 Oct 2020 17:28:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201028145405.ucfepzt6xoxro6fi@vireshk-i7> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/10/2020 16:54, Viresh Kumar wrote: > On 28-10-20, 16:13, Tero Kristo wrote: >> The error check is incorrectly negated causing the helper to never >> register anything. This causes platforms that depend on this >> functionality to fail always with any cpufreq transition, and at least >> TI DRA7 based platforms fail to boot completely due to warning message >> flood from _generic_set_opp_regulator complaining about multiple >> regulators not being supported. >> >> Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER") >> Signed-off-by: Tero Kristo >> --- >> drivers/opp/core.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/opp/core.c b/drivers/opp/core.c >> index 2483e765318a..4ac4e7ce6b8b 100644 >> --- a/drivers/opp/core.c >> +++ b/drivers/opp/core.c >> @@ -1930,7 +1930,7 @@ struct opp_table *dev_pm_opp_register_set_opp_helper(struct device *dev, >> return ERR_PTR(-EINVAL); >> >> opp_table = dev_pm_opp_get_opp_table(dev); >> - if (!IS_ERR(opp_table)) >> + if (IS_ERR(opp_table)) >> return opp_table; >> >> /* This should be called before OPPs are initialized */ > > A similar fix is already pushed in linux-next for this. Ah ok, good to hear. Just checked linux-next and I see the fix also, sorry for the noise. -Tero -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki