From patchwork Mon Feb 4 13:29:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 157413 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3917253jaa; Mon, 4 Feb 2019 05:29:13 -0800 (PST) X-Google-Smtp-Source: AHgI3IZshlVpL/fAyVIIS674Zq9wbBl8sCBNvlNcERrmsewWg51wvdZGVVjjbBX8def7ira37TnZ X-Received: by 2002:a63:4384:: with SMTP id q126mr12883104pga.160.1549286953246; Mon, 04 Feb 2019 05:29:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549286953; cv=none; d=google.com; s=arc-20160816; b=vzOwurluS4ZR8APAjOzs14N0oiI4YTdIgnRiJMql8Cv+BcqgKnWsnoPqL8Rcohgq+7 2vbAb5ixjOzy8xKtxrzJAmjHyRAbuzYooWy+xDinIYqut+dYYEos23eK3x5klRnggHNf g4lmPEkDgXkmL77AnTxSII46XYcynMs4WEhsijTMJ9j6ypmWhWvR7qsrzk9whCBG81hy ImuCkdTov9Kqqu76LPmjCLIVCeUiUBQlePzWqxa9xnxef+3CK6UPzSsFUTKL8Y+oDmG0 YEGCyBIkCdUk8q/3OyYF9FxPeb8rG+Ei/GOiLKJTL6S8/EVnTLwGj1QhZwVFXYf4ilMD 5koQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=4XGjf/4n/g7by+tKFc+fyDkehnnu/w7heG4AKutSXqE=; b=CV8nhM8oiPpJzKAr1d8t5V6wYIAK8/Yhw7P8h/VdeD0M5r2DyH7JSOvI29c5kJ4ZVI VXQbVbk1JzmI/kY2uSkdYtZFIDey0zHydXOttdxrrCPGL3XHopiNx/BrX5y0XnEXMAfs o9jF+cNk62JKc4ojvZ1UnADDqvPa/QvkhU52EogfUuDBMObTCGffN6NVdsJwYWAX/tue nZG3R0yeinVqtYNLUblSmghD7zii972CFqduvCTypUB/OZTtnWwBBlsm53AbuchqM/+j TiCmuLYy+NRIpR2iO54IltUSQPvdID73HUyWLSKZexWN3hq6V3J+ERNZK7Ag6m3R94oF GPjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ib4mNsZM; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si48135pld.353.2019.02.04.05.29.13; Mon, 04 Feb 2019 05:29:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-efi-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=@linaro.org header.s=google header.b=Ib4mNsZM; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727757AbfBDN3M (ORCPT + 3 others); Mon, 4 Feb 2019 08:29:12 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:36685 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727062AbfBDN3M (ORCPT ); Mon, 4 Feb 2019 08:29:12 -0500 Received: by mail-lf1-f68.google.com with SMTP id a16so10361369lfg.3 for ; Mon, 04 Feb 2019 05:29:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4XGjf/4n/g7by+tKFc+fyDkehnnu/w7heG4AKutSXqE=; b=Ib4mNsZMtrqb9oI20M0ZlQ3ReAQY02BecRC1PDYBbdyi0Ia+B3BfGVLonOKcj4m6V+ a6ZxSlkexzd6g94hfsPd1bQm7px3T+MD73S4TbZ1inWLjOQTf4cQj3AlwpSF5iGbvgt5 EvC+l/mzqWCJRocYiH87484GvM5gubltkpapo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4XGjf/4n/g7by+tKFc+fyDkehnnu/w7heG4AKutSXqE=; b=thZd5flmQtAvygjQDCp0fYfOI1c0/imKiNc3YADtSjV2CEkPhnKBuCft1j+CkXUnIv ZN7bA43OqQbibNSHCEMSsm4tbR+8jvNbUmUbrOeCJidVdCinxWTAAk2S7iyP/Ozz2pDC eMXKRPIGsK/vhCI9/CzVdaqKI/zQ5PV3La5QUzTFtUkgsAgMBUhmgC+vmej4ZQk6HUWl /apJEGwkgp80//hFzpUFVS9YeaQzcEfB6lNo8HIQFmVvyEDJMN2vfJZmg3Qgb3dfZzwQ uPkWVKB6LPGmwFnbNfmymlofKwSuoZKJCLLRmmr/ZMNp+wV/RW2ZJzxS8n2skFOk8aSF NYRQ== X-Gm-Message-State: AJcUukddqlOBtU1aKInm00fNrroue04a3hgNko+JtpllWJSJEmZg6x9/ JiDjG1nifYBy5qlL7xIgpyyxpw== X-Received: by 2002:a19:a9d2:: with SMTP id s201mr34794845lfe.154.1549286950276; Mon, 04 Feb 2019 05:29:10 -0800 (PST) Received: from localhost (c-573670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.87]) by smtp.gmail.com with ESMTPSA id w9sm3124861lfc.66.2019.02.04.05.29.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 05:29:09 -0800 (PST) From: Anders Roxell To: ard.biesheuvel@linaro.org Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] firmware: efi: arm-runtime: fix build error void value not ignored Date: Mon, 4 Feb 2019 14:29:04 +0100 Message-Id: <20190204132904.9288-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org Commit e2a2e56e4082 ("arm64: dump: no need to check return value of debugfs_create functions") changed the return value from 'int' to 'void'. ../drivers/firmware/efi/arm-runtime.c: In function ‘ptdump_init’: ../drivers/firmware/efi/arm-runtime.c:52:9: error: void value not ignored as it ought to be return ptdump_debugfs_register(&efi_ptdump_info, "efi_page_tables"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/firmware/efi/arm-runtime.c:53:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Rework so that function 'ptdump_init' doesn't 'return ptdump_debug_fs_register(...' since the function can work or not, but the code logic should never do something different based on this. Signed-off-by: Anders Roxell --- drivers/firmware/efi/arm-runtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 Acked-by: Ard Biesheuvel diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c index 352bd2473162..b9ae798192d6 100644 --- a/drivers/firmware/efi/arm-runtime.c +++ b/drivers/firmware/efi/arm-runtime.c @@ -49,7 +49,8 @@ static int __init ptdump_init(void) if (!efi_enabled(EFI_RUNTIME_SERVICES)) return 0; - return ptdump_debugfs_register(&efi_ptdump_info, "efi_page_tables"); + ptdump_debugfs_register(&efi_ptdump_info, "efi_page_tables"); + return 0; } device_initcall(ptdump_init);