Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp3863926ima; Mon, 4 Feb 2019 06:29:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN43F4JqCJAf68FRv4iCpE4OO+/Sfz4gu8wMNuIHOTwnjpDoVFQBI75yc8hB5qRne9wif5mV X-Received: by 2002:a62:6b8a:: with SMTP id g132mr51833521pfc.201.1549290594757; Mon, 04 Feb 2019 06:29:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549290594; cv=none; d=google.com; s=arc-20160816; b=e4mNzr84NGB6eNL3qYBReuKt6Qs/sZ2pcE4Xg00GybOuURtdqP9tBAe3IT6lUotz53 5c+F+yFqeHECzrao3RaB/newCcR9DTYbfquvN9qaxXlJvgCwJVgSBrMTmg9pEbZ9vAIA XF5Kf5tTSxCX52dMmmjYKZQHg3xx1zDEQJScljHJbB1vNRdLhAtd0MNAGEjQmZnI45gK QqVcJPJ0FDVAptX2HXvtbovsEGPHPuF4nukyo3Cnr5AkqTT/4kJsxeI9qThu+nYYM1Y0 hH38h/Mts3sTJpQoMyL/RlXzouy2ZSYViOBaZgnJvyHPNrBb8/fGyfdcuMv4HwpgAQnJ Emyg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TmOQSXGEBk97U5RJF28ewCmxSmS4ibeUojwFavrfioo=; b=O1rcGpWIyHSnwJSe+Ps9sYjbjt50veujuapx2Xz9fg3zxTFVae5knuaZLyy8XV0SXw gsLvkJP7xeHcFc+v1lSGq8rl+xxRiNhGWRM5m/cd4tykCcI6Byy0/BdoL1cIy+7c2yqY QonMusjg0MnXZSK34EJ09pOZH5TGVhJPiTjPQXvKOGq78M3G7w7kJJ4IqtuugxmYvvB4 ntjKo28KeaBgQpf91Rs4VJxaGC+LhannjUX0bN188m5WTMbWSNzTFJ+uzLmtbaKUAerH A3trdlUoKmFKtj6CqUp6lw8rfE98f8d0Wet4t5Ppqzj++0+mQzsUan9FdOgwTb7skV8n ZOyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cEHHeNI2; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si137881pgh.422.2019.02.04.06.29.38; Mon, 04 Feb 2019 06:29:54 -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=@linaro.org header.s=google header.b=cEHHeNI2; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731360AbfBDNmm (ORCPT + 99 others); Mon, 4 Feb 2019 08:42:42 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:40485 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726610AbfBDNmm (ORCPT ); Mon, 4 Feb 2019 08:42:42 -0500 Received: by mail-it1-f196.google.com with SMTP id h193so20990128ita.5 for ; Mon, 04 Feb 2019 05:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=TmOQSXGEBk97U5RJF28ewCmxSmS4ibeUojwFavrfioo=; b=cEHHeNI20ix2Q/lRNrQal4jipkEGvSenUuXx4El3wFStI6japF4+ZgimtRVkbCuSre vgMfeKFGRbAPSKOM7RLFeLjrP5u72IzHCZmrT7hQvafBt+CmTa8rat5bbzJaQZJHDTIJ EelEzOGpXYLNN7BZqa+U9CmCPNJyrJFbIvGFM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=TmOQSXGEBk97U5RJF28ewCmxSmS4ibeUojwFavrfioo=; b=ISFaD3klQSbmJkcywob1YQMwvfqHqyhc3RIH6iYt07N1ktWp85FbZurdsW4Q5iJMdF ozqsp0vnfRUyv/K0ZB9rhpG9zaW/AukPjhnn0BnXlFOX31uFUsbwFezY0fkS7Y+ncSAx P26/bpP5t7VJ5OZCdL9II7GSP4KeJjxGmdMEv1v92fahC00/XiFtm266o+r+3LFxpH6B TT1W6d2OjM9Hdj4pGoCwr27BqfZQhPHlbqAWHQvEp212y1o5NuOXd0xWASi0yZ0Ml4mL wyCbv58NfTF6M+z2/JzCnOUqgTiePVpy4+CV50GVE1QwuUzLWZ3RoiljQnH9zqvHL1UF 1EXQ== X-Gm-Message-State: AHQUAuY9rU/Li1IWcpc0jSXFfMCkm+4ssgqVtIHDKSVl3Ud8IJKzCwXC UjaCoAp1jfxqCdfH9gXcGKoOOuLrdkg5iEkjNaba+Q== X-Received: by 2002:a5d:8410:: with SMTP id i16mr13994122ion.173.1549287760907; Mon, 04 Feb 2019 05:42:40 -0800 (PST) MIME-Version: 1.0 References: <20190204132904.9288-1-anders.roxell@linaro.org> In-Reply-To: <20190204132904.9288-1-anders.roxell@linaro.org> From: Ard Biesheuvel Date: Mon, 4 Feb 2019 14:42:30 +0100 Message-ID: Subject: Re: [PATCH] firmware: efi: arm-runtime: fix build error void value not ignored To: Anders Roxell , Catalin Marinas , Will Deacon , linux-arm-kernel Cc: linux-efi , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 4 Feb 2019 at 14:29, Anders Roxell wrote= : > > Commit e2a2e56e4082 ("arm64: dump: no need to check return value of debug= fs_create functions") > changed the return value from 'int' to 'void'. > > ../drivers/firmware/efi/arm-runtime.c: In function =E2=80=98ptdump_init= =E2=80=99: > ../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 Hi Anders, Thanks for the fix. Someone else spotted the same bug, and sent a similar fix, and I asked Will or Catalin to take it through the arm64 for-next tree since this is where the offending patch lives. So for either this patch or for the other one Acked-by: Ard Biesheuvel > --- > drivers/firmware/efi/arm-runtime.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/ar= m-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); > > -- > 2.20.1 >