From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753923AbaEUXbs (ORCPT ); Wed, 21 May 2014 19:31:48 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:62312 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753403AbaEUXbq (ORCPT ); Wed, 21 May 2014 19:31:46 -0400 From: "Rafael J. Wysocki" To: Viresh Kumar Cc: Lists linaro-kernel , "linux-pm@vger.kernel.org" , Linux Kernel Mailing List , Arvind Chauhan , Ips Gandhi , Nishanth Menon , Chander Kashyap , Pavel Machek , "Brown, Len" , Chander Kashyap Subject: Re: [PATCH V5] PM/OPP: discard duplicate OPPs Date: Thu, 22 May 2014 01:48:43 +0200 Message-ID: <5258228.rMTDJps2Fm@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.15.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <7cb6e0e039e0935e37c81d0f23d26b0b81ad8cda.1400597170.git.viresh.kumar@linaro.org> <1555967.8fxByr2j83@vostro.rjw.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, May 21, 2014 09:33:42 AM Viresh Kumar wrote: > On 21 May 2014 02:39, Rafael J. Wysocki wrote: > >> + /* Duplicate OPPs ? */ > >> + if (new_opp->rate == opp->rate) { > >> + int ret = (new_opp->u_volt == opp->u_volt) && opp->available ? > >> + 0 : -EEXIST; > > > > The parens are not necessary. And is the direction correct? > > What do you mean by direction here ? The case in which we want to return 0. Never mind, it's OK. The parens are still not necessary, though. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.