Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp693654pxj; Fri, 14 May 2021 13:18:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw45VI9xdo3piZw4CKXtJ8T17DD8cJRIiIT4BKHa45xYmGjqC/0nBPgrSBUgHkDXnLu4SmF X-Received: by 2002:a17:906:4d07:: with SMTP id r7mr50197381eju.224.1621023503057; Fri, 14 May 2021 13:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621023503; cv=none; d=google.com; s=arc-20160816; b=wFmZArrtHUx8GFzYU9yl+u1rLTFfNTLznKS5BtSZN4VeFLsF04qbU06WhdLhtia2iG w19dMsBYv1FMchBs4l0708ReUvEH7RLydFCrQfTfv6R9zkRQIJEY0DGFIMuue909VMaq VP2icvm1U07xPdNAKIXzFcvS650QXlFCFt0FTEhCxs5SAiNUdraEKdI1t8eVLfQuIkTq rIurGF52RsMDaFVO75QuDsplxAFdvj8J5VyOCCjEsV9VT8jX035c6m9/QryfBcy/+spy 3E+oOhi5HPOsixBKJJNPmBwMgy6scX/0VYf9HQAy5G5sabnsL7yZzToaPWtjLAq3g0/u 1beQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=DVkh83Us4Gtqht2wF2X6mkkdk/eMRZQpRtWlxQ/Vnz4=; b=KfVLNV4S0TCb/M4lQd04r3M+nps+tQJCYSQoKVvXWN8AP9eXXnqdP9/Fk94l4kVN3W dP7CbqbNfMS/lTR85k54uf7tU57sBk9jS+3Imvlbw9aFjFcSB7TwIiyjYbRtAozy4S7E 6tTjW88MXddRf2RjK15BplTq/VjSpfHyBVeamFts7F/SqQXal2VS0+QzV3BLB/IFpQcf RyCNOr5SywyYQYS/oFWVCm6g6FAO0iVyCT8izaeFdC91XiVIsfUvJoIQXC3C0i/vtkLk wnRE46RH+ZG8nUVpHkG1yTu8GS4Yz8Ys9casV2+3dAW0G96wbJHRQH5+1EvC1nO7ukg7 OX+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tXUuvnKN; 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 w6si7601980edd.329.2021.05.14.13.17.57; Fri, 14 May 2021 13:18:23 -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=tXUuvnKN; 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 S233019AbhENSac (ORCPT + 99 others); Fri, 14 May 2021 14:30:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:36482 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229701AbhENSab (ORCPT ); Fri, 14 May 2021 14:30:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6694561442; Fri, 14 May 2021 18:29:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621016960; bh=7Rxzqbp9zx/CR6YJmm0t2HgR3O+2xjtDuDGUkpxonvU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=tXUuvnKNYt6ogg+Zrg5ozgoGzCOEnODIzSMGsvm8iY+ju6dubP+7iYuQoEISYmJyn so4rLbvFvF/5S7fiQnO5jXfAtFmSDV4btsQfL5vGpLsSUsQMza1TIyntT3DDd1N/5s zVKDugctkRT3TgldWl5cJRC9A1RFq+WuXH3tvZPL7sKQ5a00c3MT5JQdbP+4EUPxg8 CxodPO+WQE0Rgmys74B9XPUhDgsabASGCfTmcQPxynTUy1MzqHVwyUb4ljwenAOKhX +FKBPUI8+fFdTngYGFhdwwd3LsdPYYaQZ7RA7QiomlgpM7oe0tjsToYTzsi7ztsdhZ C6kBUHRko2P2w== Subject: Re: [PATCH] kcsan: fix debugfs initcall return type To: Arnd Bergmann , Marco Elver , Nick Desaulniers , "Paul E. McKenney" , Greg Kroah-Hartman Cc: Arnd Bergmann , Dmitry Vyukov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com References: <20210514140015.2944744-1-arnd@kernel.org> From: Nathan Chancellor Message-ID: <0ad11966-b286-395e-e9ca-e278de6ef872@kernel.org> Date: Fri, 14 May 2021 11:29:18 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210514140015.2944744-1-arnd@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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); >