Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17931678ybl; Thu, 2 Jan 2020 15:03:48 -0800 (PST) X-Google-Smtp-Source: APXvYqz033LzMtQVbsHesbOPKyr9oqudq8THdH8LhIITKFKiX2zdj8mrLBuLRLX4ErJYwogoDKQC X-Received: by 2002:aca:f505:: with SMTP id t5mr3265646oih.136.1578006228280; Thu, 02 Jan 2020 15:03:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006228; cv=none; d=google.com; s=arc-20160816; b=UsT2Xg2B9yOjN2nKIFPkc7hfjDjKUWxWA8yr0skHuDiCGo9yYUFy0Wu8/C4E7rxFzd 0ANrmiPBiflF3ir4QSZun3j8yUs/oVAwWEDT/axqvteQi2Z0HDw9XZDSyG1BxPscXdgO kucnp41yjRAEo7/hz/NwB4pDBBZ9zVuc2/aIaID/nwnQE2Y5phSfWdyyLwU7ck38o7tF 7jfQBTgxoZU94ZxX8zgfj+fVbqhg10snFaeumG0GKGxIfY5NCPDAoaXP9W1U1YwIHOIn xlgdIYliXvwdmWIpHBsbC/vEvqLFGaZV14pxuCan7F1jHzg895P1P+46EQn9YVck78Qw 6UVA== 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=NHnfZcDKENgcxrWsXfdipwsqRkVcdt7QzPv4W2JRcR8=; b=n//Q7J3sb6u2rGRICrzR7tDDeArmBBOS/OiEiREmX7/piPspZd8wDQ8rBV1ubDEY2w 9Vvuqip9t9KGZUv3/pg7csltZdm+4g2N8JI6XuXVgF55rqEdgLQrZlj2M2jR+72KrOgb GOr7KE3KNoYSUHh7Sg9EqxHNdM4CSN0YIJvqxKI1CSvMLJHTCpxzStAKxUcfnf6cvOX1 zUrCNj5EJZnbQvRKK9akxv70usqJ7AEPSXRkrAcSjZ0xxcWvHm/rdRyfzrSu3QDvj9xt D8q6oo7CZ9EwKYfgoaUc+nGtuE/86aLCfq5/yb6W4QAZItCI4j5z7hjOtukTjoCbydQM R6qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U+uRkcIh; 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 z4si25225322oix.48.2020.01.02.15.03.36; Thu, 02 Jan 2020 15:03: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; dkim=pass header.i=@kernel.org header.s=default header.b=U+uRkcIh; 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 S1726488AbgABWL0 (ORCPT + 99 others); Thu, 2 Jan 2020 17:11:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:49392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbgABWLY (ORCPT ); Thu, 2 Jan 2020 17:11:24 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 E9713222C3; Thu, 2 Jan 2020 22:11:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003083; bh=IeJ6x5BZrVJtQg3SHJegVlPO8lhZFQ7CoeSf1gsbnCc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U+uRkcIhMISvDtTC1G6yornfUk0GZXwGApY2erP1jZONiUVyHgrc9euJ5BHYOYXIU riO14Jfprrs0qETjfKa0oKpoSBwQyZq9kaVjuZqKL8ne0smnV7Y4saGy7mffVaHsFa oCBiJbbA52olcQbdZTMcM24D/WwVqjT8q15n8ox4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Pandruvada , Andy Shevchenko , Sasha Levin Subject: [PATCH 5.4 013/191] tools/power/x86/intel-speed-select: Remove warning for unused result Date: Thu, 2 Jan 2020 23:04:55 +0100 Message-Id: <20200102215831.136234211@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Srinivas Pandruvada [ Upstream commit abd120e3bdf3dd72ba1ed9ac077a861e0e3dc43a ] Fix warning for: isst-config.c: In function ‘set_cpu_online_offline’: isst-config.c:221:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(fd, "1\n", 2); Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko Signed-off-by: Sasha Levin --- tools/power/x86/intel-speed-select/isst-config.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c index 2a9890c8395a..21fcfe621d3a 100644 --- a/tools/power/x86/intel-speed-select/isst-config.c +++ b/tools/power/x86/intel-speed-select/isst-config.c @@ -169,7 +169,7 @@ int get_topo_max_cpus(void) static void set_cpu_online_offline(int cpu, int state) { char buffer[128]; - int fd; + int fd, ret; snprintf(buffer, sizeof(buffer), "/sys/devices/system/cpu/cpu%d/online", cpu); @@ -179,9 +179,12 @@ static void set_cpu_online_offline(int cpu, int state) err(-1, "%s open failed", buffer); if (state) - write(fd, "1\n", 2); + ret = write(fd, "1\n", 2); else - write(fd, "0\n", 2); + ret = write(fd, "0\n", 2); + + if (ret == -1) + perror("Online/Offline: Operation failed\n"); close(fd); } -- 2.20.1