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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9BBB5C4345F for ; Tue, 23 Apr 2024 12:09:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0ToxibymbxSxXu/3U2e7lO1wHttOZIGCXSzIiNxS0Sw=; b=d3GxiSPEU6B0gCgFKZDuZojKQT DTVpYf4MrfPBf6caJUBwc43+618h/2HhGVXksHCRwf+XeDv8r8GYeS8FCzt3Mrht4kAwBYFUy4N7g cYeVSbEVs6i28Baak53ZrR5W+RdnB2W4CcY1VMm5w4h+KAFavtGi8jeGRgWGTOyB1wU+02t1wwkRa UBTOKn7VxUfO2fMOEFOQd48zzWpalCPbmh9nDoZYpWAa0y8OOHS41SiNqpuRTXV3erDVknWy57sZH jZ0yzzSY8wxLySSpmgZO387bGu0floi+Vl8oRzhCGBY7xSGyd5f8DhJ6GMwz4YAFzUVZIRsqSLE/4 EzQkq5kw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzEy1-0000000HJUq-32Ow; Tue, 23 Apr 2024 12:09:45 +0000 Received: from out0-199.mail.aliyun.com ([140.205.0.199]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzExw-0000000HJRv-3FBO for linux-um@lists.infradead.org; Tue, 23 Apr 2024 12:09:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713874177; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=0ToxibymbxSxXu/3U2e7lO1wHttOZIGCXSzIiNxS0Sw=; b=eeP9ttq8wi5tPTGNaKsw8maO0a8PJtKXYY2lPBxlQpOX3cTi90Rfx732QryQ2TS4byt1hpTrGglfk9lwkzPq5tZcr7OlaeL173UqN7o2bdTGvoYmDPu2rXaD/Lv7IZgjwYcNGZDSdO69WItn1k2mfAFTC6Rcz7R8vmHC38Lcaoc= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047213;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---.XJWNYgx_1713874168; Received: from 30.230.91.3(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XJWNYgx_1713874168) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 20:09:35 +0800 Message-ID: Date: Tue, 23 Apr 2024 20:09:28 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/7] um: Add an internal header shared among the user code To: Johannes Berg , richard@nod.at, anton.ivanov@cambridgegreys.com Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org References: <20240423112457.2409319-1-tiwei.btw@antgroup.com> <20240423112457.2409319-6-tiwei.btw@antgroup.com> Content-Language: en-US From: "Tiwei Bie" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240423_050941_114072_BF707E84 X-CRM114-Status: UNSURE ( 8.05 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+linux-um=archiver.kernel.org@lists.infradead.org On 4/23/24 7:30 PM, Johannes Berg wrote: > On Tue, 2024-04-23 at 19:24 +0800, Tiwei Bie wrote: >> >> $(USER_OBJS:.o=.%): \ >> - c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include $(srctree)/include/linux/kern_levels.h -include user.h $(CFLAGS_$(basetarget).o) >> + c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include $(srctree)/include/linux/kern_levels.h \ >> + -include user.h -include $(srctree)/arch/um/os-Linux/internal.h $(CFLAGS_$(basetarget).o) >> > > Why not just include it explicitly? I think it might be more convenient if we include it implicitly, especially since there are two levels of directories under os-Linux/. But I don't have a strong opinion on this. I'm also willing to include it explicitly. > We do have the warnings? Yeah. Without this patch, I can get below warnings with `make ARCH=um defconfig && make ARCH=um`: arch/um/os-Linux/skas/process.c:107:6: warning: no previous prototype for ‘wait_stub_done’ [-Wmissing-prototypes] 107 | void wait_stub_done(int pid) | ^~~~~~~~~~~~~~ arch/um/os-Linux/mem.c:213:13: warning: no previous prototype for ‘check_tmpexec’ [-Wmissing-prototypes] 213 | void __init check_tmpexec(void) | ^~~~~~~~~~~~~ And below warnings with `make ARCH=um SUBARCH=i386 defconfig && make ARCH=um SUBARCH=i386`: arch/um/os-Linux/elf_aux.c:26:13: warning: no previous prototype for ‘scan_elf_aux’ [-Wmissing-prototypes] 26 | __init void scan_elf_aux( char **envp) | ^~~~~~~~~~~~ arch/um/os-Linux/skas/process.c:107:6: warning: no previous prototype for ‘wait_stub_done’ [-Wmissing-prototypes] 107 | void wait_stub_done(int pid) | ^~~~~~~~~~~~~~ arch/um/os-Linux/mem.c:213:13: warning: no previous prototype for ‘check_tmpexec’ [-Wmissing-prototypes] 213 | void __init check_tmpexec(void) | ^~~~~~~~~~~~~ The compiler I'm using is: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Regards, Tiwei