Received: by 10.223.164.202 with SMTP id h10csp121600wrb; Tue, 7 Nov 2017 03:59:48 -0800 (PST) X-Google-Smtp-Source: ABhQp+RLuGt11q9Du1Q2fqmRtLaJD3SwPUEUOxl/me5qwZ66GHoPg2Rq8REtgu1b64PtvtmeH/lR X-Received: by 10.84.179.194 with SMTP id b60mr9074346plc.275.1510055988097; Tue, 07 Nov 2017 03:59:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510055988; cv=none; d=google.com; s=arc-20160816; b=QN4jHKKCVvZiK0daVM8+GRsGJ7FjTb1UbKLjW188uIdCftTy51T66z+VMGmXUA7hcH nIeX/RN4wqwJtuZZedi9x7YnhiVBebzSg4bkZq9MTv2Qo5afIUJK4SpULGfyzN1pGSon 8SD2pJ+pt4WsjD6C4SP/b9gjM+8gQKVG7o3dIc9xrqIJydDDv/J6LRckG7odLa2ol5v4 bOy43h38jz0nQhdJpNllr668I9WB/25hhlW7R4Mj9ENcEJM92EtzNgbQsKuwBK9kXWz0 M+Z5AX3rETOoeQEOfWH60Xp1HdqR7NaV3zVH6eIyPxgZJrh/DfdbMuVlAokeLm3tLLam Tkng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=5LYnMQlsb3+VsUeyZOSGYU0arRoWKuXsHT7qdMrhVzY=; b=LSJRbqRBouEeodZv06Q+K9TixjnsmL/mLOVs7BX7foErTt4OPuWH3Yqr0g/UijpvhY OkpAqQiKOxYnKR8TFpUkvu4/qkGNx9nVeoZMUqdk6t69JOWOqI2nQuMqZGyolabF6kTe ICOiD1retfaznlB24YGJpLkpzHHLYS9WNoEE2jipIpuY6cRJxTEkTic34wcWlUiJbUJv G6IN5SRTQUf3ZBe/XTSns5Am9U+l0pGf/D9+iZLo9lWQN1ml0z/B4xGvXRmjKSMr/CWr QvYqqrthCEUk3ZsWgSW+NjGVeVHFRryScO/aCdz0xQwh3DaBczqgYD0DpNspbAFbx4/K GLpQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t14si1020258pgv.644.2017.11.07.03.59.35; Tue, 07 Nov 2017 03:59:48 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933707AbdKGJsp (ORCPT + 91 others); Tue, 7 Nov 2017 04:48:45 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39650 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756589AbdKGJsm (ORCPT ); Tue, 7 Nov 2017 04:48:42 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA79jhqh122179 for ; Tue, 7 Nov 2017 04:48:41 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e382c722v-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 07 Nov 2017 04:48:41 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 7 Nov 2017 09:48:38 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 7 Nov 2017 09:48:36 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA79maRm40042552; Tue, 7 Nov 2017 09:48:36 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8839642049; Tue, 7 Nov 2017 09:43:41 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B99CC4204C; Tue, 7 Nov 2017 09:43:40 +0000 (GMT) Received: from fir03.in.ibm.com (unknown [9.124.102.72]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 7 Nov 2017 09:43:40 +0000 (GMT) From: Abhishek Goel To: trenn@suse.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Abhishek Goel Subject: [PATCH v2] cpupowerutils: bench - Fix cpu online check Date: Tue, 7 Nov 2017 15:17:55 +0530 X-Mailer: git-send-email 2.9.3 X-TM-AS-GCONF: 00 x-cbid: 17110709-0012-0000-0000-0000058A68B8 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110709-0013-0000-0000-0000190509F2 Message-Id: <20171107094755.49440-1-huntbag@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-07_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711070138 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- v2: Commit message rephrased. --- tools/power/cpupower/bench/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/power/cpupower/bench/system.c b/tools/power/cpupower/bench/system.c index c25a74a..2bb3eef 100644 --- a/tools/power/cpupower/bench/system.c +++ b/tools/power/cpupower/bench/system.c @@ -61,7 +61,7 @@ int set_cpufreq_governor(char *governor, unsigned int cpu) 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; -- 2.9.3 From 1584194475488586084@xxx Thu Nov 16 04:13:03 +0000 2017 X-GM-THRID: 1584194475488586084 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread