Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp392559ybl; Tue, 20 Aug 2019 22:31:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeZPn4PoJvQTn+AfYC9AiVIy1xQzsoEZ8V3vHpCcwup1ZQUxW01sSEpT5kuo2nPFxbi2/0 X-Received: by 2002:a17:90a:981:: with SMTP id 1mr3591962pjo.37.1566365466709; Tue, 20 Aug 2019 22:31:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566365466; cv=none; d=google.com; s=arc-20160816; b=GN12gqD+osHcOQQFkUTm8fgxyZS49hvMDozN+Nu60UcNJ6QxW1qNnyJu6M3sztCakV 3cuFl1dJ11uKr8QVRdUGmnjAJ75PDnmYiRu+s+ehhrWXV51AVpT9wSM+gpHutCekudsE TPmj0w+sl3LwL71eob7achoH74Y9a+qMWOUW4UgBgUD7s6ehprXirQKxsrTWS9/EM9R+ 6QYEERshWGaWepqKn7MaHi2sfntuTNKoerSieIaqm7FjYklDTfGE+ES3Rsb4E8i0rdUf /s68Ih4QATj+pmhERmRYOBnmgYUSxjOr+yRM/xsiuruLa3rltCZQNxZ2OuatO/glbWr1 zd+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WVZuNtomVVNJU6oxBSPSh7G1rqbdcZx30YER/VTqJy0=; b=lsKQ6vDJeSWOVTcucthBJRuHiJ+tucTP+EWeHvRoQQ2v2V5HeeXbfmMQiRmBKWyZRL aIbqVVGtnWDdxNDIstYg6J4VhjTPG7NjiE4Wax0SCw59JUedA3LuKzaReveLVmyP9bFl z7S3QurSG4eUBWrf8RIopAWcpBdzDBCb1Ou/AceCCJ5ap6Wj/1kQQxFkhDpdm0v1Buwy ArAKLgQQZ0WaJsEjHa3ujXO0emURJztnIS4Io6wUjXVII1jWt4+P3TFTdxrYpXnt2/P1 k4Yg8JRegerPRNg/RpU0NZoc0CDbWuSzc8PCdvwq8e4QGwUbtA2FvdJdz+kPPzZA7foa IGeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FUz7pN44; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 38si6872603pla.352.2019.08.20.22.30.51; Tue, 20 Aug 2019 22:31:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FUz7pN44; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727807AbfHUFYV (ORCPT + 99 others); Wed, 21 Aug 2019 01:24:21 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:43992 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727793AbfHUFYU (ORCPT ); Wed, 21 Aug 2019 01:24:20 -0400 Received: by mail-pf1-f194.google.com with SMTP id v12so626722pfn.10 for ; Tue, 20 Aug 2019 22:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=WVZuNtomVVNJU6oxBSPSh7G1rqbdcZx30YER/VTqJy0=; b=FUz7pN44X6Tv4OeVuIV52guGzHMnmYin+wu9ELjFCcSR+0aws/OWfCadkkuqfVdCLK mNGaUIjPJikw+d22fQPAE5PlaRRwxBqtQCNgdjrOUKqL9EfbQ1ymZLXKWp+ZFONNvI14 x1VgB8USTvIJaFXzt8Hz4wYclyoDS/928mCrxNzBO+0HQlj3T5Hx0qoSQhket12hKZeI s16MRBgF1ca01Adh+FAA3GF9KpeEZmlXGoI/XQeC3HdXX9Cdp8CyR87ufMKOltSiMDZG ua5tdZPmMtv/brEPvUX9c837I/Tc59DwbMtYUcNjcOe17AS1TP/D/TqIjIOX+aT8YGgb AepQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=WVZuNtomVVNJU6oxBSPSh7G1rqbdcZx30YER/VTqJy0=; b=exJKkhHdrLKj7+EDeb2RY7SyTUXALcStD8HSa43QQePNDoMuu4vhTSTTd6wW7U8n9D jQZuURqmj8wf8ZuCZlFiNRt92VLdLUxwcgbBJoqsy2vg6twzIER4YbKbGK7Y3GeMnm9Z gTCKrHreD4ZLdHZdFE2Fu3fxyVf1bI2UvBxnR8/+kKTqiWdMx0HiDGDTMkdfLXciWHlz SqeAKBTjtuNzN/fWLuq2bKCtvGAlUQr+Q9eFjqyGeqD3bnXeg0PZy+FhgMMFj8oZj3Gr E/vj1de4taaJEDTM+FoCxGTKxrecxwQJH5PM7RE+8BBVtwDhOc2nYqiZyL/x4veLJf2b Znbg== X-Gm-Message-State: APjAAAV6BJHoccj+uizdaGlEKuYKNYKgrljNAxyZmpfaGOnttssHcbmu fEVNNfsos6rVhMFxupyOihC0bw== X-Received: by 2002:a17:90a:2325:: with SMTP id f34mr3758425pje.128.1566365059850; Tue, 20 Aug 2019 22:24:19 -0700 (PDT) Received: from localhost ([122.172.76.219]) by smtp.gmail.com with ESMTPSA id e7sm22939634pfn.72.2019.08.20.22.24.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Aug 2019 22:24:19 -0700 (PDT) Date: Wed, 21 Aug 2019 10:54:17 +0530 From: Viresh Kumar To: Saravana Kannan Cc: Rob Herring , Mark Rutland , Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" , Georgi Djakov , Vincent Guittot , "Sweeney, Sean" , David Dai , adharmap@codeaurora.org, Rajendra Nayak , Sibi Sankar , Bjorn Andersson , Evan Green , Android Kernel Team , Linux PM , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML Subject: Re: [PATCH v5 2/3] OPP: Add support for bandwidth OPP tables Message-ID: <20190821052417.gby4borlnxv2xacr@vireshk-i7> References: <20190807223111.230846-1-saravanak@google.com> <20190807223111.230846-3-saravanak@google.com> <20190820061300.wa2dirylb7fztsem@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20-08-19, 15:36, Saravana Kannan wrote: > On Tue, Aug 20, 2019 at 3:27 PM Saravana Kannan wrote: > > > > On Mon, Aug 19, 2019 at 11:13 PM Viresh Kumar wrote: > > > > > > On 07-08-19, 15:31, Saravana Kannan wrote: > > > > > + ret = of_property_read_u32(np, "opp-peak-kBps", &bw); > > > > + if (ret) > > > > + return ret; > > > > + new_opp->rate = (unsigned long) bw; > > > > + > > > > + ret = of_property_read_u32(np, "opp-avg-kBps", &bw); > > > > + if (!ret) > > > > + new_opp->avg_bw = (unsigned long) bw; > > > > > > If none of opp-hz/level/peak-kBps are available, print error message here > > > itself.. > > > > But you don't print any error for opp-level today. Seems like it's optional? > > > > > > > > > + > > > > + return 0; > > > > > > You are returning 0 on failure as well here. > > > > Thanks. > > Wait, no. This is not actually a failure. opp-avg-kBps is optional. So > returning 0 is the right thing to do. If the mandatory properties > aren't present an error is returned before you get to th end. You are right :) -- viresh