Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3098183ybi; Thu, 18 Jul 2019 21:00:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAS3OHyz+RKA1Ti5TV8hdqWA0opSHV8WgcvektdfrKnEj3vDnwmCnrf5rWWXyhduxJcnBn X-Received: by 2002:a17:902:1081:: with SMTP id c1mr55038604pla.200.1563508817524; Thu, 18 Jul 2019 21:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563508817; cv=none; d=google.com; s=arc-20160816; b=05LgYfUk9/Q4WGp3jP0obcTujZpzRIZWMsxmIjw3arnDYpL4wAIaFyIfC4sdv+PgxM ZD5YLxQuITXySUUWHNaq7QxgNaaYpBbg+nx59hIH9+fqtERCRM6T5/ZzvKkQMQRzxhEi 4Lz5SWSAThySstnQCsLibisqxbCubszweYIbVzQRC/BcKuwFOLSoF0AAHYnCb8O+Zc0t 5iEyMG5/pLWXjFlWT2vWk23xHnsbgPl29Aob0RcbJPdqOkVqhXP7yggsbxlhCxwIhc/Z LPqGqFIHUW9PhdPZ5OhgrNtIMElst8UARWS/GLBg768rxBqs+LRuERLiZLPVjBr+OR8b emww== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KEXrmKrPt90EPWi0UrQUQB68pqHH/B3nDl/GcXwI0Fs=; b=eBTF7B3eaAZzFzK9lKW/wCK9f4yhfzR0AaFKPCUouaWXlQpMMqFy0prOXpWSjMUDS0 qzed72a1svWZI4DG5IGyl3wjbGNRmQUHzs6RxZIGIalXCmGC9JKzG8GM2zswkajS4485 IrwSuXePbKz/R/RXgadxU9HOj6lR5O1lLchqSDoFDI6ciBtFI1RVCctUsRPpC3Qsyr0Q 7rr2DHdpl4JuBz6rqYWBeaianOxbrZPRc6/69iafN5yXer+0CL4D/gGhDuGceG3wyIMe pNxtIYQVih9Lt5Umze4KPKUvuw/ccZiVPTIB9eXVnFZnFE/tXHg5isBDP5zfWZfVaCdO 3Xuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v4s27w0J; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c25si1020864pgm.73.2019.07.18.21.00.02; Thu, 18 Jul 2019 21:00:17 -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=v4s27w0J; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727744AbfGSD6B (ORCPT + 99 others); Thu, 18 Jul 2019 23:58:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:57226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727681AbfGSD57 (ORCPT ); Thu, 18 Jul 2019 23:57:59 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 338052184E; Fri, 19 Jul 2019 03:57:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508679; bh=uQA2gpES8zyRLAP8LaB1TaiMSzsmJOa2FGTLM7RHEWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v4s27w0JehJYlpiAOyHEXAIGV6lXqKm2psD5QD3hxqFMPMsZ+ZbR41Q0bYEMo9xAB rqYc5xpLeVLLNl8CHyPmx8T95DAhndabCtvptvjbdAnvgthFX9pe9xrUv5UR2kV/+N FSmHFWCyvNESfF2z+JvkDqFj6pEeVZT7KJ7kpOqU= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alan Mikhak , Lorenzo Pieralisi , Paul Walmsley , Sasha Levin , linux-pci@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH AUTOSEL 5.2 030/171] tools: PCI: Fix broken pcitest compilation Date: Thu, 18 Jul 2019 23:54:21 -0400 Message-Id: <20190719035643.14300-30-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alan Mikhak [ 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