Received: by 10.223.176.5 with SMTP id f5csp987142wra; Fri, 2 Feb 2018 09:17:15 -0800 (PST) X-Google-Smtp-Source: AH8x22730gvh/NUP+Gw1kpLdnh84nNR7PwJJEIRlqaNoJgIaYpgPigC6AlcGLbLDuA/D76cmhQiL X-Received: by 2002:a17:902:7897:: with SMTP id q23-v6mr14870137pll.166.1517591835746; Fri, 02 Feb 2018 09:17:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517591835; cv=none; d=google.com; s=arc-20160816; b=yZ8yOfEsxberF/wD2A2Av3AZs9prcYVTiqXRg4mhhsusbr+WE6UXIVuXYR6J9RcYTw AqLK1I4sxAQ3q/nIuZQqcX1PZZJx/r2QdjfPcVZ0XuNgwWmvNAY3EimE172ixIJBZh2z cFigSeksfaS+U3dBkmsWAft5QLu+JLUlzrGOs4SCl+JPSqhOKq2z527CaP87d88pFM0z Hsjx3zdOjOAmZPEdAjv+WhKFj2Zt7Us+AnA8AWjlLL6mpUum3kr/Ozbf5QV56PlocAaQ KESotoRzakz2UByG29/UNx04o4K4hpDCWK95H4rmVxhCB17He1TWDJx/zPF52Rura/TN 736w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=TFmGVzYxU/dqq0CEK+WbOV6D4pnBmgpvAxT/g2H3uN0=; b=kW/Fig655MNfh+vSxQg/nOUrjWlmuwhIqOSkOpkejNyyflahRCaNlvMe90QYFDVhy9 755EYHpXImrf5nm8PloC2WvBPJhI+pYsDrSyjCeMjrUqd8zmjS/TqNz9WRH1lGCY+x7k 4uBubRJkPScVECc4B7oVg3gBZIQ+gDTa/yGXmx/nDUkUCI3JnYTB+3ft+Fj4D83ugRLH 4hw42hck8LTH7oPh0mns3S4l6Fknct/hwaY41vNKcexOCCEJHlS4iiC5DCsFSNjIOsGB dTxS9M6NGZ3Gltbp4AGbd4A4XVbCtaywg8Blm0nf7dLgyEZuEThFrVfYGH5ARCP4MQeD VWIw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15-v6si60610pli.585.2018.02.02.09.17.01; Fri, 02 Feb 2018 09:17:15 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753847AbeBBRQh (ORCPT + 99 others); Fri, 2 Feb 2018 12:16:37 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38158 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752909AbeBBRKF (ORCPT ); Fri, 2 Feb 2018 12:10:05 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7C10AD31; Fri, 2 Feb 2018 17:10:04 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abhishek Goel , Shuah Khan , Sasha Levin Subject: [PATCH 4.14 034/156] cpupowerutils: bench - Fix cpu online check Date: Fri, 2 Feb 2018 17:56:55 +0100 Message-Id: <20180202140841.859086842@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Abhishek Goel [ Upstream commit 53d1cd6b125fb9d69303516a1179ebc3b72f797a ] cpupower_is_cpu_online was incorrectly checking for 0. This patch fixes this by checking for 1 when the cpu is online. Signed-off-by: Abhishek Goel Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- tools/power/cpupower/bench/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/power/cpupower/bench/system.c +++ b/tools/power/cpupower/bench/system.c @@ -61,7 +61,7 @@ int set_cpufreq_governor(char *governor, dprintf("set %s as cpufreq governor\n", governor); - if (cpupower_is_cpu_online(cpu) != 0) { + if (cpupower_is_cpu_online(cpu) != 1) { perror("cpufreq_cpu_exists"); fprintf(stderr, "error: cpu %u does not exist\n", cpu); return -1;