Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp62574ybl; Tue, 20 Aug 2019 15:40:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVrvxqjgMLdT9xiL20o3VLtqCFCFU5ffIlT+m9M08+OI6B6mawgOHoUShF25b218oa7gQA X-Received: by 2002:a62:8281:: with SMTP id w123mr32082532pfd.36.1566340805135; Tue, 20 Aug 2019 15:40:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566340805; cv=none; d=google.com; s=arc-20160816; b=RYWQMCFbE3KZ4VLoSv6nVSQHO5gOumZMscK0v79ucZofUUknbbzu5WMDRzd/g569h8 c+9klCzx7rr6yGWeqSOrFVxMeKu3A6Lm3ferLayh+xonQi8iQ/EVMetAZPXXeX2e84IV /VW44XSiMm7LesiLqNRyjIRlU5RkI0TqHtQ3HwVHJscxSzyGNQ21SySfiDTtFiQKp4dZ 9rvLXtCZR4HEg3L+fp7NDXfz8zOAQddB+9fPVtHYHLOldBx9A9R9pMKEBFWvdKJyoj7M EtX2+wVrXg1CK8V6B1cVRsY93cCXt8JLgm685xJpxB0xd7xg0yxEEaBAkJAHJwewsxrm NRFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=v3PNIe6PlFx6XUGmIctyG3Xxp0nI64KtXff/8z9lYQw=; b=sVM7HtN6sTA3liuk9NPNgF+ULU72e0oPFNSnV1XB70PHqREFrIU1OwkQvpXuxPXTDV oYoKn3m3rDyHbz3VJtEfagyAPGX6GBpuiR97PA0FrrNeydTGzqZCtuQDpE1qOm0bC2mU c6k7JYwC7yep3tq8XXxAF80/jLRHhP4cyJ2AsyLTJ0YkpZj4CRVy0tBlq9mDyVB8bkXM Jpo26zxCl3DcABCycf5tElRMTlXeizAjrHksjaqppZPqGRL1Tqz5ejI/iVSuxTGhgc40 k+v8dXb7OiP5usteZ2QQA19WK2n22gDrGBKYeUY4FDP9gSHFd51vm7ENhP9Q2zavxUME 0/vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DrMO+Id3; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7si13013595plr.27.2019.08.20.15.39.49; Tue, 20 Aug 2019 15:40:05 -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=@google.com header.s=20161025 header.b=DrMO+Id3; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731069AbfHTWhP (ORCPT + 99 others); Tue, 20 Aug 2019 18:37:15 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:40676 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730983AbfHTWhP (ORCPT ); Tue, 20 Aug 2019 18:37:15 -0400 Received: by mail-oi1-f195.google.com with SMTP id h21so121914oie.7 for ; Tue, 20 Aug 2019 15:37:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v3PNIe6PlFx6XUGmIctyG3Xxp0nI64KtXff/8z9lYQw=; b=DrMO+Id3/F6kfiS8kA+XkmRwzKxg84gILs8dNH6dLLLovzZ/vvF83WQIo4xhkoeqV6 3RBYncd/vUDzwp+CNY3VcPvIk4uU+c7YhMIYp/jOBMZIpHYZCw2M5qSNBnH0of+4OBQL XEScg+qnDqv1hG7QczO1oMYMvRb/ywFsl4n1D3Mn5PBoZos0Mf12KTnJB3kK2vuILj1q FspaYSPNM9Cuuhn4p40bqZxiBRQHihLsa+6CehfCd4cRXA/DwtPcIr2EtTw2rZXz294p CNHOT7IAuaNf5uttOcH7GkGHx1imDt89gkwkiMZvaQudFRv79OF3FkpvQO/gJXkNATWH c/ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v3PNIe6PlFx6XUGmIctyG3Xxp0nI64KtXff/8z9lYQw=; b=Biljc6F3zUpFtP7CLTOamwYd6oArW+DRDSPl93a+Tth8eOR7MUY0gd467WsbiCSdkg J1Yoo/s1VB7WXsFK7ILoFTa6GiG3sQJjy4XF+t1IyWbwAoJkQ591MVxe/prXoTYnVPN5 3pbNkotSHj2cUdW/D7aIO98dakwYKHP5gY+hhLWgzcpG3BADpEXEGV1bt1Kf68et5M/6 MWvbuR9S5+IJ64V1onQOc+UA0H/rre0F/9ya0pX2lTURTkDW7+ppe5zxltVCQMUptmX8 NCeIhNtNbmpyv+2at1oRPlxn7/V8qYiE2TPJJg4g+s5OgBaceNZOeind3y8O9ex5WdQe v1tg== X-Gm-Message-State: APjAAAWvV+dSUVYt4Z2gsBCeQwQN38HxmSNwDVykLkzS+RUnyaEkGa9+ 7A/VYPhBJzPZaDY8tlokAIeIxisHXsKULYky2rmKsg== X-Received: by 2002:aca:cc81:: with SMTP id c123mr1785858oig.30.1566340634069; Tue, 20 Aug 2019 15:37:14 -0700 (PDT) MIME-Version: 1.0 References: <20190807223111.230846-1-saravanak@google.com> <20190807223111.230846-3-saravanak@google.com> <20190820061300.wa2dirylb7fztsem@vireshk-i7> In-Reply-To: From: Saravana Kannan Date: Tue, 20 Aug 2019 15:36:38 -0700 Message-ID: Subject: Re: [PATCH v5 2/3] OPP: Add support for bandwidth OPP tables To: Viresh Kumar 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -Saravana