Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp470635pxu; Thu, 7 Jan 2021 09:26:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfR/Mhq/QMfOEyIHmMQqMRp3UNIEggRIGGmZINOWY/t6c2d/bptNyIE09YSa8suXtFsPaP X-Received: by 2002:a17:906:4c4c:: with SMTP id d12mr7090996ejw.307.1610040388726; Thu, 07 Jan 2021 09:26:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610040388; cv=none; d=google.com; s=arc-20160816; b=EEpPw8Wiz+nXDCORYNT1wV+Ow/TQiJaIXsc30K70zYPwyz/uBmCcXvDHfmg7JrH9vl IFaEylaRCx4nr4csMPtgdmaSZVxqtB0uUkJ5MniHYJpx81l7tU2YuSYx3sqZYyg07t8b YLbZ5aXuB4C5L+j/gUeiJLplia8TC/cKgUPIcfaW4E65BzQhQrsnDhFUlN9qRpM8UsSK dJ00wrW4duM5nHG4xPSqxBj2WMb7huVLjBSlsvqC3aBzqcplWtNtWj+oH+oZ+V+XRt7S Rb9nQQ1Irtx34rdj5f6LwvKtjubkguMOqd87Ln6oMrfPBK0VDBcPEE7Fr6MOyPCErCnx r+mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=OpG41d5OlWzv+km3h3m9vib/u3YyCF2qCiMVKCMnb60=; b=Vfxn5Or//Caz4qIRX7Uk8ZhZ7Zf7mIIC8jxMxKsOt1T2O9pAJEjQoNwwBOQLv4W7oO TTGBC8BRACIg2Qfhf8NNMquz7xn8gtrtbrSKaY8bY7oCMHeXIigA86BCkukxMyT1mOTG Hc5B4Ix0EnBaeMXZ1+l5AcL3WcVBXU90KJ1lvBHbdbtzY5546phEcbiOQbOuK05PKJ7Z cArgbPQiOiASjdCoJRqQcKBFZIVp+cPDsDpIeS1Xibpsk/8l7grHpw5ehUXSEhttfgY4 J3m4IxAKA39sjUB84u6fu198CpiK32mLSxq1xMH1BJ+VjvMDYDuFNZJw8L2LmJxpsfnV 9U9A== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o26si2586150edw.74.2021.01.07.09.26.05; Thu, 07 Jan 2021 09:26:28 -0800 (PST) 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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728319AbhAGRZW (ORCPT + 99 others); Thu, 7 Jan 2021 12:25:22 -0500 Received: from mail-ot1-f45.google.com ([209.85.210.45]:43308 "EHLO mail-ot1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726541AbhAGRZV (ORCPT ); Thu, 7 Jan 2021 12:25:21 -0500 Received: by mail-ot1-f45.google.com with SMTP id q25so6976171otn.10; Thu, 07 Jan 2021 09:25:06 -0800 (PST) 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=OpG41d5OlWzv+km3h3m9vib/u3YyCF2qCiMVKCMnb60=; b=TMFIPPBdJYf5nZNqSU2isyQKiQzZuSII4JRr4Acw4wTS3glMfVjdL4uiPL5Mhzpbs8 UDmVzl1YzIfqdk0msihtkZ2Luso22fM8IsE1oNR2oI0qpAXkMw5Xnj4hfH2y4z6OIrSD PD3R/Fbwx/WeQZUm5Wk4dx+PphVNZuJd/VSJOuPRBDk7v8jBDLyN1jmYF2++9IRGZYWf f0ocx/vHNTW7A/Wd7R+fi45vGbMrlCHKbTRIdikwhOM73R09ftXbVI0UAkNuCCeKOIog xfh8XGED3qICVBVLokYNK4phA6X26CI/2F/d15LiJn2hygCzuv2XfKhRW+QI3w7bKBXL CJNw== X-Gm-Message-State: AOAM532gMrajuL2QKi2raJWsqPZ4vWhuS5bhYSg7kL9q/YWIufR9xv6Y GsQ2Kd7swmsEKFPaw0eu0qe/F3tbeAYQ9B/lGSBDFtT1 X-Received: by 2002:a9d:67da:: with SMTP id c26mr7383389otn.321.1610040280622; Thu, 07 Jan 2021 09:24:40 -0800 (PST) MIME-Version: 1.0 References: <20201221051320.18391-1-lukas.bulwahn@gmail.com> <20201221222015.GA3389117@ubuntu-m3-large-x86> In-Reply-To: <20201221222015.GA3389117@ubuntu-m3-large-x86> From: "Rafael J. Wysocki" Date: Thu, 7 Jan 2021 18:24:29 +0100 Message-ID: Subject: Re: [PATCH] cpufreq: intel_pstate: remove obsolete functions To: Nathan Chancellor Cc: Lukas Bulwahn , Srinivas Pandruvada , Len Brown , "Rafael J . Wysocki" , Viresh Kumar , Linux PM , Arnd Bergmann , Tom Rix , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-janitors@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 21, 2020 at 11:21 PM Nathan Chancellor wrote: > > On Mon, Dec 21, 2020 at 06:13:20AM +0100, Lukas Bulwahn wrote: > > percent_fp() was used in intel_pstate_pid_reset(), which was removed in > > commit 9d0ef7af1f2d ("cpufreq: intel_pstate: Do not use PID-based P-state > > selection") and hence, percent_fp() is unused since then. > > > > percent_ext_fp() was last used in intel_pstate_update_perf_limits(), which > > was refactored in commit 1a4fe38add8b ("cpufreq: intel_pstate: Remove > > max/min fractions to limit performance"), and hence, percent_ext_fp() is > > unused since then. > > > > make CC=clang W=1 points us those unused functions: > > > > drivers/cpufreq/intel_pstate.c:79:23: warning: unused function 'percent_fp' [-Wunused-function] > > static inline int32_t percent_fp(int percent) > > ^ > > > > drivers/cpufreq/intel_pstate.c:94:23: warning: unused function 'percent_ext_fp' [-Wunused-function] > > static inline int32_t percent_ext_fp(int percent) > > ^ > > > > Remove those obsolete functions. > > > > Signed-off-by: Lukas Bulwahn > > Reviewed-by: Nathan Chancellor > > > --- > > applies cleanly on current master and next-20201221 > > > > Srinivas, Len, Rafael, Viresh, please pick this minor non-urgent cleanup patch. > > > > drivers/cpufreq/intel_pstate.c | 10 ---------- > > 1 file changed, 10 deletions(-) > > > > diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c > > index 2a4db856222f..0e35dd247986 100644 > > --- a/drivers/cpufreq/intel_pstate.c > > +++ b/drivers/cpufreq/intel_pstate.c > > @@ -76,11 +76,6 @@ static inline int ceiling_fp(int32_t x) > > return ret; > > } > > > > -static inline int32_t percent_fp(int percent) > > -{ > > - return div_fp(percent, 100); > > -} > > - > > static inline u64 mul_ext_fp(u64 x, u64 y) > > { > > return (x * y) >> EXT_FRAC_BITS; > > @@ -91,11 +86,6 @@ static inline u64 div_ext_fp(u64 x, u64 y) > > return div64_u64(x << EXT_FRAC_BITS, y); > > } > > > > -static inline int32_t percent_ext_fp(int percent) > > -{ > > - return div_ext_fp(percent, 100); > > -} > > - > > /** > > * struct sample - Store performance sample > > * @core_avg_perf: Ratio of APERF/MPERF which is the actual average > > -- Applied as 5.11-rc material, thanks!