Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp26858pja; Fri, 22 Nov 2019 03:01:16 -0800 (PST) X-Google-Smtp-Source: APXvYqyLM4fx2rpG2XQuECd0X5LnfPUesNlIBvZPFutClhBrd7o/U9U3w7L/kViIAW4+hsV7LWYt X-Received: by 2002:a17:906:2518:: with SMTP id i24mr21580410ejb.4.1574420476671; Fri, 22 Nov 2019 03:01:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420476; cv=none; d=google.com; s=arc-20160816; b=QTSywjevxmD7EiN0X2aOdgWKsNP3WpmxhK8Rfdn2Axqo4UZIG6OSs5p0WMvKLmwJoO inD1QWaszvHVMbR/wYBMFXt9pljgRRzQ44OGLoi+JLkSdHIW7lrncTFymuUFhxxxEDCR O5Did9EcskxUpe1B0KIzsRyTQYrorjBrYIC6DHzkUO89EF1XeTsKsuErHv2dOMwWaCdz xurC12f50tPVaq92qhccEJP4EDj8bz8wS6ZUyOx2IeH/UjKxVIKgF5ni8XoojmAjO/0i aCeYPYajOJcwSFe9B/54GoY5alUbsg9+Zqqa92JfQeEhz+FraulJ3lCYTs5uxz0Y9f21 L8Iw== 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=nucSDZgDakzll29uPC4XGd1GRNvNEqGLOztq+0Df1lw=; b=OQ4Fy858PqO3vIU5D29s9DgnRrE5c8HJSdOJ3kcB4SQfF1JDYqD0lFQoogvM7ML3HX pMTJt9IGX3ZSnBlEzhM1uWXpbG/OiaABVcNBjXppR3r48IKadIzY0N6zBg2u6VMn4jdF K1sWspcp7Q518recb1GhsmbPA/6KS7d5nRwKx/McsyoHVNQuYCczdb4RCay8KO2babSj 2w65LfuhkBLCxpjqHZ5FIt8w9uOo5FcZjgJTsCHUHb3+U62paLyLMUqEO4P8hZMhjGad SXeNiA4Fef0tqC4xZrX+pN7nEdZ3SCCb661gTrwyy2/zaq3fJrQMR6pW1gmXDjImy7hM 7/Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PRED9w69; 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 b18si4382364eda.307.2019.11.22.03.00.52; Fri, 22 Nov 2019 03:01:16 -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=PRED9w69; 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 S1730968AbfKVK74 (ORCPT + 99 others); Fri, 22 Nov 2019 05:59:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:51500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730961AbfKVK7z (ORCPT ); Fri, 22 Nov 2019 05:59:55 -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 C328B20706; Fri, 22 Nov 2019 10:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420395; bh=4NfQ9fxpNP+h0TZLuSv/Z7hVRrKUXXgL0ky5mqRXjFU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PRED9w69/V6i+1WWcseoimSmw4KUjMpE0bLcgSB3jVhtMmVQrE4mhHKqOX2pkXORi cQARbwKc33O44y86yw7XNElsKEteWM4EZkRrv+eC/ZdwytdltA+JNZ4PZ4gts5oQ3j DUEs3GycEHXXe/nGxoC2HDDzsALhoFfPy2OKbf48= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gustavo Pimentel , Lorenzo Pieralisi , Kishon Vijay Abraham I , Sasha Levin Subject: [PATCH 4.19 075/220] tools: PCI: Fix compilation warnings Date: Fri, 22 Nov 2019 11:27:20 +0100 Message-Id: <20191122100917.694687117@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@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: Gustavo Pimentel [ Upstream commit fef31ecaaf2c5c54db85b35e893bf8abec96b93f ] Current compilation produces the following warnings: tools/pci/pcitest.c: In function 'run_test': tools/pci/pcitest.c:56:9: warning: unused variable 'time' [-Wunused-variable] double time; ^~~~ tools/pci/pcitest.c:55:25: warning: unused variable 'end' [-Wunused-variable] struct timespec start, end; ^~~ tools/pci/pcitest.c:55:18: warning: unused variable 'start' [-Wunused-variable] struct timespec start, end; ^~~~~ tools/pci/pcitest.c:146:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Fix them: - remove unused variables - change function return from int to void, since it's not used Signed-off-by: Gustavo Pimentel [lorenzo.pieralisi@arm.com: rewrote the commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Kishon Vijay Abraham I Signed-off-by: Sasha Levin --- tools/pci/pcitest.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c index af146bb03b4df..ec4d51f3308b8 100644 --- a/tools/pci/pcitest.c +++ b/tools/pci/pcitest.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -48,17 +47,15 @@ struct pci_test { unsigned long size; }; -static int run_test(struct pci_test *test) +static void run_test(struct pci_test *test) { long ret; int fd; - struct timespec start, end; - double time; fd = open(test->device, O_RDWR); if (fd < 0) { perror("can't open PCI Endpoint Test device"); - return fd; + return; } if (test->barnum >= 0 && test->barnum <= 5) { -- 2.20.1