Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2556923imu; Thu, 29 Nov 2018 06:52:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/U5RycJz6zGYRLLkt7aRMN81fLO1pZbL4viYGU1HArlh55cDFEHebvBYf6jHYfmFg8Ud9rS X-Received: by 2002:a63:5c22:: with SMTP id q34mr1464795pgb.417.1543503127311; Thu, 29 Nov 2018 06:52:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543503127; cv=none; d=google.com; s=arc-20160816; b=J8mraJIFtjVMXJ3F/CsrNRk25PXB9cARKUJpQArW2OPEeuEOluXehsD24lX5vmMOKI yauQ3oeT5haZOaB37tBeaV7GCtt5yVsQ7pOW56sroZGk1QzIPiSISzGXnS1vFbTLL4Zq D8S+W+wjP+adxEbFT/6dd4enlzLJuV/davhhjl7sfeMWMt6qHJE8ONbfjbAeacr9V7Wl wwEYRbgfprsw5FqiaVzm8Z8aUwW4UgYKIaVQWL5kxtu0Hr0HZc2jx9oKi/fFnHg0muJp Oa9t/xmpm878b/4GrycQr5KJDxFHUs/yoZlsiUSakpPf1T6r5l1DDPru95F7aZJQJH60 x/gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aeGOBkLnyioT9aTHEaFewvyIPI5zewk0NzBTucsVeFw=; b=jyMzRVqITQ+qejEaAoPDStHt1oXFPid6iltqFPa4ySDsks3P9MpH2yVqIrj9cHPmpR wfG8tLUN5B7t400sNd8ynPNQ1R8/efTnpx2aQxElhqZuEdQ6Zdec32cYiKOISKVy5rFg LUKMMGWpF20ZRs1JzMQcqhUNYysJoeZccjm+351rE3oNRObkn1lM3E+RNewEOD7pTOBU 0cv/dKBCd+73ngvt4AmbLqDGoDe88GUNqE2tHWA/37slq28S0ybnthBL1FLQYqVCP4ep WTioPC0SCnq8QrPPRkgpVSegOopVfqXYA2YcO6F9W2+z+XNp1yY5ZU3aG0tTTNQgDHRc p2Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=g0U1dYyu; 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 f22si2150254pgm.81.2018.11.29.06.51.48; Thu, 29 Nov 2018 06:52:07 -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; dkim=pass header.i=@kernel.org header.s=default header.b=g0U1dYyu; 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 S1732783AbeK3BaY (ORCPT + 99 others); Thu, 29 Nov 2018 20:30:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:57410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728616AbeK3BaX (ORCPT ); Thu, 29 Nov 2018 20:30:23 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F54C2145D; Thu, 29 Nov 2018 14:24:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501491; bh=R333l4Et05IJgk4K1RIQIbxBNB0GseHMBoPL4fnZrl0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g0U1dYyu4DSkIKe4ewOaw0yn4zSu6otyGj+xn2e4JP9C2w7wkCQsPPL7F26uYYad2 2cTzfSPG6l35Dl+0/BHCyz7Ja2xTar46awFNfT7J0B/+amA9kd4xMafyKCUuJcqF1D 82gy6GEodjDx7fA0INb6TsoJZvyu8q3SGK65gXrU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Konstantin Khlebnikov , Thomas Renninger , "Shuah Khan (Samsung OSG)" Subject: [PATCH 4.14 020/100] tools/power/cpupower: fix compilation with STATIC=true Date: Thu, 29 Nov 2018 15:11:50 +0100 Message-Id: <20181129140100.544789877@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140058.768942700@linuxfoundation.org> References: <20181129140058.768942700@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Konstantin Khlebnikov commit 9de9aa45e9bd67232e000cca42ceb134b8ae51b6 upstream. Rename duplicate sysfs_read_file into cpupower_read_sysfs and fix linking. Signed-off-by: Konstantin Khlebnikov Acked-by: Thomas Renninger Cc: Signed-off-by: Shuah Khan (Samsung OSG) Signed-off-by: Greg Kroah-Hartman --- tools/power/cpupower/bench/Makefile | 2 +- tools/power/cpupower/lib/cpufreq.c | 2 +- tools/power/cpupower/lib/cpuidle.c | 2 +- tools/power/cpupower/lib/cpupower.c | 4 ++-- tools/power/cpupower/lib/cpupower_intern.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) --- a/tools/power/cpupower/bench/Makefile +++ b/tools/power/cpupower/bench/Makefile @@ -9,7 +9,7 @@ endif ifeq ($(strip $(STATIC)),true) LIBS = -L../ -L$(OUTPUT) -lm OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o \ - $(OUTPUT)../lib/cpufreq.o $(OUTPUT)../lib/sysfs.o + $(OUTPUT)../lib/cpufreq.o $(OUTPUT)../lib/cpupower.o else LIBS = -L../ -L$(OUTPUT) -lm -lcpupower OBJS = $(OUTPUT)main.o $(OUTPUT)parse.o $(OUTPUT)system.o $(OUTPUT)benchmark.o --- a/tools/power/cpupower/lib/cpufreq.c +++ b/tools/power/cpupower/lib/cpufreq.c @@ -28,7 +28,7 @@ static unsigned int sysfs_cpufreq_read_f snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpufreq/%s", cpu, fname); - return sysfs_read_file(path, buf, buflen); + return cpupower_read_sysfs(path, buf, buflen); } /* helper function to write a new value to a /sys file */ --- a/tools/power/cpupower/lib/cpuidle.c +++ b/tools/power/cpupower/lib/cpuidle.c @@ -319,7 +319,7 @@ static unsigned int sysfs_cpuidle_read_f snprintf(path, sizeof(path), PATH_TO_CPU "cpuidle/%s", fname); - return sysfs_read_file(path, buf, buflen); + return cpupower_read_sysfs(path, buf, buflen); } --- a/tools/power/cpupower/lib/cpupower.c +++ b/tools/power/cpupower/lib/cpupower.c @@ -15,7 +15,7 @@ #include "cpupower.h" #include "cpupower_intern.h" -unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen) +unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen) { int fd; ssize_t numread; @@ -95,7 +95,7 @@ static int sysfs_topology_read_file(unsi snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/topology/%s", cpu, fname); - if (sysfs_read_file(path, linebuf, MAX_LINE_LEN) == 0) + if (cpupower_read_sysfs(path, linebuf, MAX_LINE_LEN) == 0) return -1; *result = strtol(linebuf, &endp, 0); if (endp == linebuf || errno == ERANGE) --- a/tools/power/cpupower/lib/cpupower_intern.h +++ b/tools/power/cpupower/lib/cpupower_intern.h @@ -3,4 +3,4 @@ #define MAX_LINE_LEN 4096 #define SYSFS_PATH_MAX 255 -unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen); +unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen);