From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBDD1C433FF for ; Mon, 29 Jul 2019 19:47:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A086221655 for ; Mon, 29 Jul 2019 19:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429652; bh=cfF5JTRL9wJTAdyolM8Phzi3rYbFHUx/a1jzKwjHkxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=czl+bcTgOx7H0mAIMsOfoDJb3Cb1TLBCuWRQnlq4AXJ+0WeKu6X0eaVPiJLhzCi2j kjyLVnT82JHePvD0FLqo6beYogwkr7oYavZLwlxWBo6fqM2040qmHF/7mDq6t5v4yO oSMlkV/+Q9afU+ZkxOCnRaSR/AsDWrH5FdrKF6+U= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390351AbfG2Tra (ORCPT ); Mon, 29 Jul 2019 15:47:30 -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