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=-16.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 656C5C43460 for ; Fri, 14 May 2021 14:10:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 47C0B6145D for ; Fri, 14 May 2021 14:10:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234254AbhENOLz (ORCPT ); Fri, 14 May 2021 10:11:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:33940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231373AbhENOLo (ORCPT ); Fri, 14 May 2021 10:11:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EC583613E9; Fri, 14 May 2021 14:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621001433; bh=GvOgMOa5ZuePNrd238Dh7TPxvxow4q6donvCFAtghLQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KXerAm9PrBDPzWTktpYwR4+YFKSIxBt4j3EvqLh2IX1ykHK6khxQKY40CFM+RfdAe r1lmypdoUs9Un+2Yz1kxaYhV1+cxiqq1ilYhdBsqOuzSv1RXm1TrgZ/6ZBe9LTn1S8 +h/oQwpoJRLhlS6Gei0wVLnAcSJ994NnUwHeAqIA= Date: Fri, 14 May 2021 16:10:30 +0200 From: Greg Kroah-Hartman To: Arnd Bergmann Cc: Marco Elver , Nathan Chancellor , Nick Desaulniers , "Paul E. McKenney" , 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: References: <20210514140015.2944744-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210514140015.2944744-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 14, 2021 at 04:00:08PM +0200, 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 > --- > 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); > -- > 2.29.2 > Reviewed-by: Greg Kroah-Hartman