Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3797008ybi; Mon, 29 Jul 2019 12:48:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLtPtLWbWgZpJpH9uDnxuYUEXhjuzO7sKWB6NWcbK2eTGNf6dp1fVFSI6wpsH4A6NBSRKZ X-Received: by 2002:a17:902:6b81:: with SMTP id p1mr108578809plk.91.1564429736330; Mon, 29 Jul 2019 12:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429736; cv=none; d=google.com; s=arc-20160816; b=tyAMcXvXWx8IrIknE8RMkaz2A0B5J7gfNIjT8PwTr7hYxwccEBdXWEzyrccJA6zZTr 1/ppvnzs4P7SWy4G7Oel3TXfnKNIxFFnfh19xoLJ2Rv5lGyDpA/v4Rywn9u4Gw9nFFpc VCegUSXOtStHLcOxUpV8Srrva8m02AIP1Omn/PPbQFs9G8I6+uYvCRMc2ck+WFT4ZmL8 EXeaNypNhX/FnLu+EtEsgU6GGUnqyEi4k+2zpPsdn4TUI7oHr2WpPztYj+6IsuXGD1Q2 MQFZrqritimAowJ+2adOdIjt4eZTwrqxffCVPrE2YGciYQXqGF840JY3GLYiPQh06zqy rb1w== 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=PnqGdLl85TjkybRyNupKiFcGeUl7rsPCyTyQEzpngns=; b=a3Yjfn7QHC6mlRmqmq0ictzJcOMng59IQR+Cw/qYeCltGtRb6pw1aWUJcnK6bwQ/GG 7bLIgIPsvf2RGIDkezZxPABRQFpVDo1hsUPqZmVUusc+DPEuDE50zHlAdeG2xFFd8qMM WZaaWymhYRKGuxtYNUmG431N2KM3Zc6EjahfAdGL783ZtemRcG7w8GqmPoNLwsm/B2z5 bGwGmz+ddgW5sGToKKt51Ejv3aeSJ7wbnSFfTtHfN2npzGgdWdPS/lpZZ+eQAVynaNwk +OEUWtnCEunxwzAIoPKFaj4/7ZPIanXam7CBhSkBglVRHzpjJZ77Sfl7kK6A+LktHvHy XW2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=id6SBAwO; 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 j66si25074128plb.375.2019.07.29.12.48.41; Mon, 29 Jul 2019 12:48:56 -0700 (PDT) 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=id6SBAwO; 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 S2389788AbfG2Tr3 (ORCPT + 99 others); Mon, 29 Jul 2019 15:47:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:37138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389965AbfG2Tr0 (ORCPT ); Mon, 29 Jul 2019 15:47:26 -0400 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 1AFE520C01; Mon, 29 Jul 2019 19:47:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429645; bh=cfF5JTRL9wJTAdyolM8Phzi3rYbFHUx/a1jzKwjHkxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=id6SBAwOkWf70euLLop96Jz2EoicRfoWzktQNaXRp+IvjZWQ0gVzPI38GiW9ZDVNr /587km8GdZcc4qi42Up5JVwOed640D4kPLIiQjXfygbe03RVFWWUhg/klmeyYN1chf h1CNiJlYH9Q+0UA8tySBa9gipWe6B1920ydJR4aM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Mikhak , Lorenzo Pieralisi , Paul Walmsley , Sasha Levin Subject: [PATCH 5.2 032/215] tools: PCI: Fix broken pcitest compilation Date: Mon, 29 Jul 2019 21:20:28 +0200 Message-Id: <20190729190745.776649298@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@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 [ Upstream commit 8a5e0af240e07dd3d4897eb8ff52aab757da7fab ] pcitest is currently broken due to the following compiler error and related warning. Fix by changing the run_test() function signature to return an integer result. pcitest.c: In function run_test: pcitest.c:143:9: warning: return with a value, in function returning void return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */ pcitest.c: In function main: pcitest.c:232:9: error: void value not ignored as it ought to be return run_test(test); Fixes: fef31ecaaf2c ("tools: PCI: Fix compilation warnings") Signed-off-by: Alan Mikhak Signed-off-by: Lorenzo Pieralisi Reviewed-by: Paul Walmsley Signed-off-by: Sasha Levin --- tools/pci/pcitest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c index cb7a47dfd8b6..49ddfa6f5a8c 100644 --- a/tools/pci/pcitest.c +++ b/tools/pci/pcitest.c @@ -36,15 +36,15 @@ struct pci_test { unsigned long size; }; -static void run_test(struct pci_test *test) +static int run_test(struct pci_test *test) { - long ret; + int ret = -EINVAL; int fd; fd = open(test->device, O_RDWR); if (fd < 0) { perror("can't open PCI Endpoint Test device"); - return; + return -ENODEV; } if (test->barnum >= 0 && test->barnum <= 5) { -- 2.20.1