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 A4DD8C18E72 for ; Tue, 23 Apr 2024 11:25:25 +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: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CiQKB25MktD/QLDdLcPUH0+dexeuRZvHnI8X4wiFwkI=; b=ckAzvrFyHF/o54Q9nuF7eyrTRf CB0d7fsq8oEOTj7zg7M0+oeyWQwpHWmYCWGf+z4ksCv77/7xoa7EA7k9wKdGuPNjM8bixqy6k4KrT qOXWp9vBjbm0fllmSt/j8s7rJphRsuUL/gvd83p1zDZx/NyzmIvVjjBW2D8LBVf6Dwzp1ZwYN5Yxp f/8hbZM2b+wtvkxOBa1eLnVPU0aZBHfowQGu7OuWqibCsJwIvHLM23R4m6p4XuA5SAZL4H/thPvsi rvjv5v3cPoaDOcceGY4kql6AoM9VlnQxpDCU+R4TUW4ld3R6E0SnzBJ56fjn9Nm8XbzldfsYNER+j X5zNM2eA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzEH7-0000000H5HN-0kzk; Tue, 23 Apr 2024 11:25:25 +0000 Received: from out0-214.mail.aliyun.com ([140.205.0.214]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzEH1-0000000H5BY-1y7D for linux-um@lists.infradead.org; Tue, 23 Apr 2024 11:25:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713871514; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=CiQKB25MktD/QLDdLcPUH0+dexeuRZvHnI8X4wiFwkI=; b=p2L6upQGJGbGQR3Jan20L3P6RqEzMR9vi25BecvQ99xMjjKPMS9WMw3kL8e0v4j7n6GLNB0Gd+znSe9adRIN2XudMprCe7RLPc8I2h/qYQ6HwR/pcWMxjqXIHd/zey7xRa6OC2nG+6iBdoSM1Jf+nfuRbf/Al/aZmKOraCb9m8s= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047209;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XJTUYhm_1713871512; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XJTUYhm_1713871512) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 19:25:12 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH 2/7] um: Fix the -Wmissing-prototypes warning for __switch_mm Date: Tue, 23 Apr 2024 19:24:52 +0800 Message-Id: <20240423112457.2409319-3-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423112457.2409319-1-tiwei.btw@antgroup.com> References: <20240423112457.2409319-1-tiwei.btw@antgroup.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240423_042520_456861_9FF65374 X-CRM114-Status: UNSURE ( 9.08 ) 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 The __switch_mm function is defined in the user code, and is called by the kernel code. It should be declared in a shared header. Fixes: 4dc706c2f292 ("um: take um_mmu.h to asm/mmu.h, clean asm/mmu_context.h a bit") Signed-off-by: Tiwei Bie --- arch/um/include/asm/mmu.h | 2 -- arch/um/include/shared/skas/mm_id.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/include/asm/mmu.h b/arch/um/include/asm/mmu.h index a7555e43ed14..f2923c767bb9 100644 --- a/arch/um/include/asm/mmu.h +++ b/arch/um/include/asm/mmu.h @@ -14,8 +14,6 @@ typedef struct mm_context { struct uml_arch_mm_context arch; } mm_context_t; -extern void __switch_mm(struct mm_id * mm_idp); - /* Avoid tangled inclusion with asm/ldt.h */ extern long init_new_ldt(struct mm_context *to_mm, struct mm_context *from_mm); extern void free_ldt(struct mm_context *mm); diff --git a/arch/um/include/shared/skas/mm_id.h b/arch/um/include/shared/skas/mm_id.h index e82e203f5f41..bdfab67174ff 100644 --- a/arch/um/include/shared/skas/mm_id.h +++ b/arch/um/include/shared/skas/mm_id.h @@ -15,4 +15,6 @@ struct mm_id { int kill; }; +extern void __switch_mm(struct mm_id *mm_idp); + #endif -- 2.34.1