From patchwork Mon Feb 5 11:47:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 196764 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp820373dyb; Mon, 5 Feb 2024 03:53:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUKBJJlH9DK/ol2gfPm3/QtNk2/FwWA7/u4I+50vybkJjGv0h6UNJkDXsi7cxuvquSR+1/ X-Received: by 2002:a17:902:d2d1:b0:1d9:5ce0:224 with SMTP id n17-20020a170902d2d100b001d95ce00224mr15866912plc.0.1707133997353; Mon, 05 Feb 2024 03:53:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707133997; cv=pass; d=google.com; s=arc-20160816; b=PgVUxhZw4+q96Qa8f3S2kScbp8RQkUbky2E78IvhzL7DpY+lrcd4PMBqPgZ8x80jWA UCDO0YgwStYc5Jqjmb/Lo46mB4t3NWL14oJMS+Ynj7RAm+Xc4hv9CX2aElUexONLU18u q3ztNDVXLVEP8YpRdr8JfkGIw5ydlbITIQqDyA8khtfbBaSK2ftWLpRTaXjAEq/cn1N/ UxlaMlqHlbikacLRyR92sV7rBCaiDf1Aw3Q49ji6+OlvYxAOnRdpPpSkYs7Ij16kFhHV eVinKlcZJL6xwDc2mUBkbIruE5Ke98OUf8A3ES3jJRiIGq25rbFSYmpFfUhWe2eF0ih1 Z5wQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=frsTSfnbtdY0EwKKmgBZlH7qjZ5z3lr4ZV/9EOlionA=; fh=kqhUzT5H3GrGIDlnd2x+EoRvJ0VupRenbWrh7UAt3hA=; b=gtf1kCNP35n57zKbdLPelyzdOGTVRm0njjVKqlhRTzhLiEMNrAPYasqeZQe5udc2HM kSkwV9vshh6ggyr1jbPq+TEInUYgGb9BL59uXcvtrq90IA/ymcU6o3uZKM+EIRhKxRxz 3g+V1NeRJQgmLXVmbNoNVG02uYSWb8UfsJtv57GXJPfWoyQzifZ/LfO36uYGOhZSzVT0 yoS3382a2RY9d33tLNYgZ2HOK7dqAE+F3GGJDY3cjKA+69sSc0AJRQLAhqD+7P6fgwZS qnQQdu+B+w/C0e8PV/07q5goXp/cf+t9YISzGGeZziIEHijKGU3HCaJ1k2cVfsQs8yW9 W94Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-52523-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52523-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com X-Forwarded-Encrypted: i=1; AJvYcCUx6/NB27+QKadfhLAE7hhLacYlVL6wZHyZ1H5QFrQm8lfxhWO4RLBqIevRZJ7kVYdoBFwJNjYwRjN3WLAZBlJXPb1rDQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w17-20020a170902d11100b001d91e56ea5esi6021972plw.242.2024.02.05.03.53.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 03:53:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52523-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-52523-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52523-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 07E9C2811EE for ; Mon, 5 Feb 2024 11:53:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44AD71B597; Mon, 5 Feb 2024 11:52:58 +0000 (UTC) Received: from out187-18.us.a.mail.aliyun.com (out187-18.us.a.mail.aliyun.com [47.90.187.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B81A21A5BA for ; Mon, 5 Feb 2024 11:52:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=47.90.187.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707133976; cv=none; b=VhFOd+BYDoL/0Wk3e8zkZazST7D/4fgzsplqljT68exw8XYuWIOlxrszgrQk5ol0gadZWC9rU6eyz+HQFlgo+cybz38oRyjpq29ES6t4tI7BV5xcUNyNb7SCLAcU7lJPGPEHoZI+/e84OboMOZzixRYZK2D66YCUK2ELH8mu7Zw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707133976; c=relaxed/simple; bh=5QDpZzhiE/3GWfDd1mWBtLqh/MBq9MNvFNphZMB8Phc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=etcW8Q5UCxHAozX9uOsxCOac4sFA0/HleCCb1TtWBKT8ANZbhtiy33fdvETHGz0xQGYwRnMG+Qy5BWeoC6C0CGAimKMMn9Dk6xCNDHVK07uHx0P92A3L3EbyOPc2la9XPdCbnUFRyiNuGSgqkKR5tC4Y1cKjZHJJMsVTV6AxOFc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; arc=none smtp.client-ip=47.90.187.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R511e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047192;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.WNt.HmH_1707133639; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.WNt.HmH_1707133639) by smtp.aliyun-inc.com; Mon, 05 Feb 2024 19:47:19 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH v2 5/6] um: Add missing headers Date: Mon, 05 Feb 2024 19:47:07 +0800 Message-Id: <20240205114708.25235-6-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240205114708.25235-1-tiwei.btw@antgroup.com> References: <20240205114708.25235-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790059738362569001 X-GMAIL-MSGID: 1790059738362569001 This will address below -Wmissing-prototypes warnings: arch/um/kernel/mem.c:202:8: warning: no previous prototype for ‘pgd_alloc’ [-Wmissing-prototypes] arch/um/kernel/mem.c:215:7: warning: no previous prototype for ‘uml_kmalloc’ [-Wmissing-prototypes] arch/um/kernel/process.c:207:6: warning: no previous prototype for ‘arch_cpu_idle’ [-Wmissing-prototypes] arch/um/kernel/process.c:328:15: warning: no previous prototype for ‘arch_align_stack’ [-Wmissing-prototypes] arch/um/kernel/reboot.c:45:6: warning: no previous prototype for ‘machine_restart’ [-Wmissing-prototypes] arch/um/kernel/reboot.c:51:6: warning: no previous prototype for ‘machine_power_off’ [-Wmissing-prototypes] arch/um/kernel/reboot.c:57:6: warning: no previous prototype for ‘machine_halt’ [-Wmissing-prototypes] arch/um/kernel/skas/mmu.c:17:5: warning: no previous prototype for ‘init_new_context’ [-Wmissing-prototypes] arch/um/kernel/skas/mmu.c:60:6: warning: no previous prototype for ‘destroy_context’ [-Wmissing-prototypes] arch/um/kernel/skas/process.c:36:12: warning: no previous prototype for ‘start_uml’ [-Wmissing-prototypes] arch/um/kernel/tlb.c:594:6: warning: no previous prototype for ‘force_flush_all’ [-Wmissing-prototypes] arch/x86/um/bugs_32.c:22:6: warning: no previous prototype for ‘arch_check_bugs’ [-Wmissing-prototypes] arch/x86/um/bugs_32.c:44:6: warning: no previous prototype for ‘arch_examine_signal’ [-Wmissing-prototypes] arch/x86/um/bugs_64.c:9:6: warning: no previous prototype for ‘arch_check_bugs’ [-Wmissing-prototypes] arch/x86/um/bugs_64.c:13:6: warning: no previous prototype for ‘arch_examine_signal’ [-Wmissing-prototypes] arch/x86/um/elfcore.c:10:12: warning: no previous prototype for ‘elf_core_extra_phdrs’ [-Wmissing-prototypes] arch/x86/um/elfcore.c:15:5: warning: no previous prototype for ‘elf_core_write_extra_phdrs’ [-Wmissing-prototypes] arch/x86/um/elfcore.c:42:5: warning: no previous prototype for ‘elf_core_write_extra_data’ [-Wmissing-prototypes] arch/x86/um/elfcore.c:63:8: warning: no previous prototype for ‘elf_core_extra_data_size’ [-Wmissing-prototypes] arch/x86/um/fault.c:18:5: warning: no previous prototype for ‘arch_fixup’ [-Wmissing-prototypes] arch/x86/um/os-Linux/mcontext.c:7:6: warning: no previous prototype for ‘get_regs_from_mc’ [-Wmissing-prototypes] arch/x86/um/os-Linux/tls.c:22:6: warning: no previous prototype for ‘check_host_supports_tls’ [-Wmissing-prototypes] Signed-off-by: Tiwei Bie --- arch/um/kernel/mem.c | 2 ++ arch/um/kernel/process.c | 2 ++ arch/um/kernel/reboot.c | 1 + arch/um/kernel/skas/mmu.c | 1 + arch/um/kernel/skas/process.c | 1 + arch/um/kernel/tlb.c | 1 + arch/x86/um/bugs_32.c | 1 + arch/x86/um/bugs_64.c | 1 + arch/x86/um/elfcore.c | 1 + arch/x86/um/fault.c | 1 + arch/x86/um/os-Linux/mcontext.c | 1 + arch/x86/um/os-Linux/tls.c | 1 + 12 files changed, 14 insertions(+) diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 38d5a71a579b..ca91accd64fc 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c @@ -12,12 +12,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #ifdef CONFIG_KASAN diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index a7607ef1b02f..4235e2ca2664 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -27,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c index 48c0610d506e..25840eee1068 100644 --- a/arch/um/kernel/reboot.c +++ b/arch/um/kernel/reboot.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 656fe16c9b63..aeed1c2aaf3c 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c index f2ac134c9752..fdd5922f9222 100644 --- a/arch/um/kernel/skas/process.c +++ b/arch/um/kernel/skas/process.c @@ -12,6 +12,7 @@ #include #include #include +#include extern void start_kernel(void); diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 70b5e47e9761..8784f03fa4a6 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/um/bugs_32.c b/arch/x86/um/bugs_32.c index 33daff4dade4..d29929efcc07 100644 --- a/arch/x86/um/bugs_32.c +++ b/arch/x86/um/bugs_32.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include #include #include #include diff --git a/arch/x86/um/bugs_64.c b/arch/x86/um/bugs_64.c index 8cc8256c698d..b01295e8a676 100644 --- a/arch/x86/um/bugs_64.c +++ b/arch/x86/um/bugs_64.c @@ -4,6 +4,7 @@ * Licensed under the GPL */ +#include #include void arch_check_bugs(void) diff --git a/arch/x86/um/elfcore.c b/arch/x86/um/elfcore.c index 650cdbbdaf45..ef50662fc40d 100644 --- a/arch/x86/um/elfcore.c +++ b/arch/x86/um/elfcore.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include diff --git a/arch/x86/um/fault.c b/arch/x86/um/fault.c index 84ac7f7b0257..0dde4d613a87 100644 --- a/arch/x86/um/fault.c +++ b/arch/x86/um/fault.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include #include /* These two are from asm-um/uaccess.h and linux/module.h, check them. */ diff --git a/arch/x86/um/os-Linux/mcontext.c b/arch/x86/um/os-Linux/mcontext.c index 49c3744cac37..e80ab7d28117 100644 --- a/arch/x86/um/os-Linux/mcontext.c +++ b/arch/x86/um/os-Linux/mcontext.c @@ -3,6 +3,7 @@ #define __FRAME_OFFSETS #include #include +#include void get_regs_from_mc(struct uml_pt_regs *regs, mcontext_t *mc) { diff --git a/arch/x86/um/os-Linux/tls.c b/arch/x86/um/os-Linux/tls.c index 3e1b1bf6acbc..eed9efe29ade 100644 --- a/arch/x86/um/os-Linux/tls.c +++ b/arch/x86/um/os-Linux/tls.c @@ -6,6 +6,7 @@ #include #include +#include #include #ifndef PTRACE_GET_THREAD_AREA