Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp160719pxu; Tue, 6 Oct 2020 22:46:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVIEEPmxJ2uFGVYIge5MJ3DCTBPIaTt7DKmyvj1rC4EvRBBBbfH9OMo57T6O4xfCstGVIF X-Received: by 2002:a17:906:eb15:: with SMTP id mb21mr1770375ejb.318.1602049601462; Tue, 06 Oct 2020 22:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602049601; cv=none; d=google.com; s=arc-20160816; b=mVAC2qyV3lIfHoX3DWVam9wQENn09xNmGa2qPiT41mannKa4qyrQuLemG43Aix90xV rzcOoZgTpODauRplKjteECuA188J4fFOV/aB1SUJf7hbUIPoSyCWsTe+9lLt4jxtR784 LeLo2kCiwb0DCpUtQM5Y8yoBX82Y2pcFgnkXf+/CmpGEI4qkTou4Qjhy1BeibHFqzytI PYxn++XE6Za5zSbfFrcYdp8BQJW/65nBgOq+puRQKWG0HU3OaNDKDRUVibW4v/LbeAwC nrz9poMHHTVFmmcfWiFI26W/8nJu6fCj23auNKuZ+J4Um1qRiY1vJxBoA0AM2PlUYvXS uoKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=wa3QyR27/uKaRnYGJkCF/PrkW0s0ETyJE8CGrYRcJBs=; b=CeoRdWklKrXxmffxdCbL4qi+XProZPNkHPHpGTtDgHq+yubnLq2AkVXH/nVVw5kact P4KbYAceU49qERxV9QaDbk/L94by018hi4o6byTgTSNph8KUdKcw20AJxyJAuravbD+g 8i1/Eir9nsDsmPPahBHY3EwPoD+iihuryTCX9KMWNRGN2yoiubacmlODL2h+UTVKtdZt D501nduZ23y9GESRYIQZjWkJd2YDe/gjvG1Cn9uZN+6Cwf0AeTNHE+10BG9OIUj7T/wX YvjC1RoaWeXCackh9zg1v+Sn+PAb/M1UiHksR5MalVD8J0n9rHhl8dUDYEAaF3q5fMFe uamw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ICEW1xe6; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x100si668068ede.335.2020.10.06.22.46.17; Tue, 06 Oct 2020 22:46:41 -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=@linaro.org header.s=google header.b=ICEW1xe6; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726702AbgJGFLc (ORCPT + 99 others); Wed, 7 Oct 2020 01:11:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbgJGFLc (ORCPT ); Wed, 7 Oct 2020 01:11:32 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18024C0613D2 for ; Tue, 6 Oct 2020 22:11:32 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id 34so613611pgo.13 for ; Tue, 06 Oct 2020 22:11:32 -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=wa3QyR27/uKaRnYGJkCF/PrkW0s0ETyJE8CGrYRcJBs=; b=ICEW1xe62FusKkz+9GEJmdW5GerVlO6lZQCBt+1UzzuUbL84UBjCHqvI/wfMyJTqo2 +X68PdxcjTIw8u28c2/+lWAgb248Ji8LfAiV4QS8kS1M2nuhTxMc6IcQ6/BAG8uCBVUO ljDx1U4bToRQiYPK5sjE0LLPWSM1rLZlOmFSXJcbsGS8qGcX5Kyfz33b5vmvL80z2qAe lf27k5ixa/Opa/u4wkoTzMJVt/cX6FIXxeDWjFBrtOZ5imkn8PzsNc7N713U2S6Ebo1s cyKyXnvuGIc40tknOFaPZMtF7T35nHSdYizvl1u3GADaHhx9M6FZH3L7V0tlZbJZjEJr UxMw== 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=wa3QyR27/uKaRnYGJkCF/PrkW0s0ETyJE8CGrYRcJBs=; b=knK+CSAnTO/2fYKPM1ncZNC9jycf+kG6HRd9lbfl4W0J9aN2oeHP4j7Gjz/kkHkhmv 1LQAR9debI8oFfkG7DgWJnBXUtaxGv6Vserzd7iU5i2cGzyUFeo6KPSbW9jek7yAm5qr iNAQMiqfscBuopF1hHgf4vXaWXuMjTZb655Swr4mRezH5Z1Cui2erzz6O+Ep0zOGtYCy rdGhodaZGLQ5i/SLHgvnmX0YCrGX4V0UQOSXsxVjJBa9gC0GuU2MmmagxYlrCBGb2alo THqUx5y3jYXJpuZWGdzOcXT0FAffvOdPOhiWQkyfC4+qg728uBx99h4ljoewDzfqMsya xu4g== X-Gm-Message-State: AOAM531cLVEWSZfNW8/lX8asx19WslMEHXJWjJUBj/7UtR7HgGQtQ2L8 oE31h6tjQMrahbFIr8H5icfIFw== X-Received: by 2002:aa7:8287:0:b029:142:2501:39ec with SMTP id s7-20020aa782870000b0290142250139ecmr1275936pfm.59.1602047491518; Tue, 06 Oct 2020 22:11:31 -0700 (PDT) Received: from localhost ([122.181.54.133]) by smtp.gmail.com with ESMTPSA id e2sm733590pjw.13.2020.10.06.22.11.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Oct 2020 22:11:30 -0700 (PDT) Date: Wed, 7 Oct 2020 10:41:28 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Linux PM , Peter Zijlstra , LKML Subject: Re: [PATCH] cpufreq: schedutil: Simplify sugov_fast_switch() Message-ID: <20201007051128.odqiwuex3vqwxumo@vireshk-i7> References: <1869109.WhRmcVd4D2@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1869109.WhRmcVd4D2@kreacher> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06-10-20, 14:01, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Drop a redundant local variable definition from sugov_fast_switch() > and rearrange the code in there to avoid the redundant logical > negation. > > Signed-off-by: Rafael J. Wysocki > --- > > The code reads a bit easier after this change IMV. > > linux-next material. > > --- > kernel/sched/cpufreq_schedutil.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > Index: linux-pm/kernel/sched/cpufreq_schedutil.c > =================================================================== > --- linux-pm.orig/kernel/sched/cpufreq_schedutil.c > +++ linux-pm/kernel/sched/cpufreq_schedutil.c > @@ -114,12 +114,8 @@ static bool sugov_update_next_freq(struc > static void sugov_fast_switch(struct sugov_policy *sg_policy, u64 time, > unsigned int next_freq) > { > - struct cpufreq_policy *policy = sg_policy->policy; > - > - if (!sugov_update_next_freq(sg_policy, time, next_freq)) > - return; > - > - cpufreq_driver_fast_switch(policy, next_freq); > + if (sugov_update_next_freq(sg_policy, time, next_freq)) > + cpufreq_driver_fast_switch(sg_policy->policy, next_freq); > } > > static void sugov_deferred_update(struct sugov_policy *sg_policy, u64 time, Acked-by: Viresh Kumar -- viresh