Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp699540pxj; Fri, 14 May 2021 13:29:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXuUv62Y1ddsJdeLFlZpZ+BJ4QBduv2k5JDTigSmBKKKo2GojonrGBjGxw2PVSX6dKaJd/ X-Received: by 2002:a05:6e02:1488:: with SMTP id n8mr44783917ilk.158.1621024145888; Fri, 14 May 2021 13:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621024145; cv=none; d=google.com; s=arc-20160816; b=oY42VExGVQuLyDPI0zyQZNlU54io+UCb1bIhEmMEIw9oB6FlzcTrWJKdlIdnVJpbUZ zMAPjwAsayJhNUo7QDbk7CGfkFnJOhjexe30SIq3gCTTC5vsLY+g/fNWFCHLvCWoD0/7 BnI03TL1PAsIgpnl/eO5d3iSYDVWkYrYk3pvCOc74MeccRcWkCtrq3AGcTvbl+EJVBjA 2sne7PkgND3BKXob2DcALvDmyMsL/oIi/MFV6ydDc/eiiqFyVhPnTD6KX3+Sz3UudN7f oe2DgSJ8TJsv/knqd/ebiu8JGYabDO9FHvx0LRPUxlAE6jhOJL1HJrzNr+jPamg80imk bqNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=BuSk93p/Y6Y2CEWVCz7dqF1P83kLBzvJOTXHq1YUWec=; b=UuSFxWEi28AXEwJFa2lAoq5T7DF620D4KMgbXmn4buVShIShaccI6VwG3pSbigpBCj eR8/gEh+XNN4OpE8C5GzVi1ljq8XYPJ5d0/GjyjB2NdH50BJgJAkuU1TGwOx0UwFY3Jc GbFgXTjRUfTebguulz/Tv8XdVvt4j09fYUO7T2C7SXGJWAu5ZPeWR0TK992ZrL8gibF+ AG1dMqb/r9Dran1KaS7MJYoBSa0TqvbfR398SvZBuvMaFNg3KRKmF1VnMyNndltiPW36 6rXyl+NPDT9gXhocWxcOcqgAqQFqgRhVQLkjEOtRAkF4VGC3ypU8Hnt8/sskGZkqkayb szHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nw1yr7gm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id y24si8465927ior.40.2021.05.14.13.28.53; Fri, 14 May 2021 13:29:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nw1yr7gm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231358AbhENTiJ (ORCPT + 99 others); Fri, 14 May 2021 15:38:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:54344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbhENTiJ (ORCPT ); Fri, 14 May 2021 15:38:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3A854610F7; Fri, 14 May 2021 19:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621021017; bh=Hh0QonQZjmEOkFxHlLabLQ/ulBr/IzaZmwAVlG28RlU=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=Nw1yr7gmTaNsIqyvluuIzuWg6ihBMfQ8R3/UpA1cYXHmf9PUzKOLZ2NVCJl2L+A6j 1ggAtjNhOZnsbRJeIOSTCqL9bspCVgo+6Y6je9N25iyGeFAr6RwXj2/qBQNrj+0NAL 0jvzrIWJp6ZnvGxAl2FzdwKZe8OiSQbH25nUOIg3Nm57COWkR0H4VRDZ+yChJ6GwmD o4qEdc8BxG/ESQuj6ZaQX4a4S0TJJYWMWRjLWQ3jczpeoyL4xZgDuUKFLuWvBfz6iH kx5+YKHoJxXxQ+onmBZSbKARukQagkJiBAC3pk1uVqIXcd2bDk7jBZ9nVXjdRkEbeD BKWqkmdTCU6vA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 0AE945C02A5; Fri, 14 May 2021 12:36:57 -0700 (PDT) Date: Fri, 14 May 2021 12:36:57 -0700 From: "Paul E. McKenney" To: Nathan Chancellor Cc: Arnd Bergmann , Marco Elver , Nick Desaulniers , Greg Kroah-Hartman , Arnd Bergmann , Dmitry Vyukov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] kcsan: fix debugfs initcall return type Message-ID: <20210514193657.GM975577@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20210514140015.2944744-1-arnd@kernel.org> <0ad11966-b286-395e-e9ca-e278de6ef872@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0ad11966-b286-395e-e9ca-e278de6ef872@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 14, 2021 at 11:29:18AM -0700, Nathan Chancellor wrote: > On 5/14/2021 7:00 AM, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > clang points out that an initcall funciton should return an 'int': > > > > kernel/kcsan/debugfs.c:274:15: error: returning 'void' from a function with incompatible result type 'int' > > late_initcall(kcsan_debugfs_init); > > ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ > > include/linux/init.h:292:46: note: expanded from macro 'late_initcall' > > #define late_initcall(fn) __define_initcall(fn, 7) > > > > Fixes: e36299efe7d7 ("kcsan, debugfs: Move debugfs file creation out of early init") > > Signed-off-by: Arnd Bergmann > > For the record, this requires CONFIG_LTO_CLANG to be visible. > > Reviewed-by: Nathan Chancellor Queued with the three Reviewed-by tags, thank you all! Nathan, I lost the thread on exactly what it is that requires that CONFIG_LTO_CLANG be visible. A naive reader might conclude that the compiler diagnostic does not appear unless CONFIG_LTO_CLANG=y, but that would be surprising (and yes, I have been surprised many times). If you are suggesting that the commit log be upgraded, could you please supply suggested wording? Once this is nailed down (or by Wednesday if I hear no more), I will rebase it to the bottom of the current kcsan stack, let it soak in -next for a couple of days, then send to Linus as a fix for a regression. Hopefully some time next week. Thanx, Paul > > --- > > kernel/kcsan/debugfs.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/kernel/kcsan/debugfs.c b/kernel/kcsan/debugfs.c > > index c1dd02f3be8b..e65de172ccf7 100644 > > --- a/kernel/kcsan/debugfs.c > > +++ b/kernel/kcsan/debugfs.c > > @@ -266,9 +266,10 @@ static const struct file_operations debugfs_ops = > > .release = single_release > > }; > > -static void __init kcsan_debugfs_init(void) > > +static int __init kcsan_debugfs_init(void) > > { > > debugfs_create_file("kcsan", 0644, NULL, NULL, &debugfs_ops); > > + return 0; > > } > > late_initcall(kcsan_debugfs_init); > > >