Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp978279lqs; Wed, 6 Mar 2024 02:36:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXC4xqBDhRXmrkaycVSqyMCj0OeQNlONEr+kRdVEj7xzlHcKc5uxzP8lpogrpSJtl5y4JTDVgQ4TQdp9ULs6L/iHmF+gxIWtTS/VRaHgQ== X-Google-Smtp-Source: AGHT+IGbofN83anBpFjIdjGBqUSQFnvSkoYlrDQXRa7pnxYZs8SA7gvrl63oorn4kHzobXEssIeH X-Received: by 2002:aa7:88c1:0:b0:6e5:5425:d914 with SMTP id k1-20020aa788c1000000b006e55425d914mr15677107pff.2.1709721378538; Wed, 06 Mar 2024 02:36:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709721378; cv=pass; d=google.com; s=arc-20160816; b=GDI7EL8hoklfjj2ti4rqFVWNFkMyGAwDkTjh92hvlkGYY5nW0LN+kejsb+CCv78yMC ipzAhNscm3690zAYg3Yq7qm7c81cU2HAVTcqDGtsHn6+K8D/4JpiKWgNAsR0215+qjCy nsOx432GMtnBSSjpk170yIhIUgLN3lE1zW2TuQM64NxCiUD2hsOeHz7r8BFdUQb6Bs7o Euc9I9Mr0k5K46j16GeRd73BsY3QKhusOuYBXkers7ZxOGcPZtVIX3UHmfb96EEPe4fL 6qpwMd9RgxGU92HrkofSTY9aXlybu0UOYUdtPbAq9n8F5oKVgVBe3Rr9F4Qo6oYnPSby 8UIA== 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=4+a6MSyPXgEKom2aMNv4B3aI5DSh2DcgVCjXb8KtvOY=; fh=lQ2M4e1FRnWVc02SlCLk2j1DdH8ys+lfLCZTieMVhWc=; b=yJWsTD+cO7FXC2+1VmGKaIvKylUrGQAoCU1kgrlL/A0/Xw1ylG0PN3bK7AJH/kPE2R b/Kvf3Hsu++3mmmHB1R/+5FybJEq2IGK5qxgyTiZvD7/+XrGqIuVy54ZH0KmLo2jjfhi jL+eFyTrz3VN5yRLfe+lV3e2DrXfooDnf6OTjx92LBbDDdXKwhzq90Ypx7zZhuXomVDe iUIm+NUVEz1uhKJpMs+PR2WDv3pxTsF6tCs8/3Ux0P2rYzw6mZ+OQ8W7Cl/LU0+4r+bI AJ7Uea5na3swpIvRrbPt4XVF0/L/Xsd8Taub4B2CDFoD+M9fpyA38LSbo70eVsx3eh7A e9Lg==; 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-93774-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jc6-20020a056a006c8600b006e62aff96fasi4173051pfb.34.2024.03.06.02.36.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 02:36:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93774-linux.lists.archive=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-93774-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93774-linux.lists.archive=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 3B968280D54 for ; Wed, 6 Mar 2024 10:36:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 14AE1605B1; Wed, 6 Mar 2024 10:35:29 +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 30D7360B8F for ; Wed, 6 Mar 2024 10:35:25 +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=1709721328; cv=none; b=eKtPrFoOLTPYFa3ZiqFX/h+Kg0u8ggfmRowQviHBiccPJEc/ZO6MRnCOpNrOA2vj9y7JFsHUejv3LweOiNZA2KeY8hP/tkw1WnXOUPetOk9ftLwDNW1H+tGRdPFy1rNCHFpZV0flwZzhO3bA9CR6c+ONUmGUfBjJrh62+AbI63c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709721328; c=relaxed/simple; bh=5BvnaK+Q3e30bHwbnZ/Zuza3SgyqFfcHiBGD0cfTfMY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=VOAJT2+4EWMaLkAVFGMul6hwp8Rs9GFrG5oOd5eWb0A0NGZia+dJPhhRjA0VvSD2aENyw0vbrCDhX4FNc6UEV6BvFxNKPX0TSWah/AHuae00BwD5pCA0/4lOwuu6jne+1AWaPWKumoT0KzHODCQMPPH/9Z1AswYOMCQA3Tu51k4= 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=01201311R451e4;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=8;SR=0;TI=SMTPD_---.Wgbn-Jf_1709720382; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.Wgbn-Jf_1709720382) by smtp.aliyun-inc.com; Wed, 06 Mar 2024 18:19:42 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , , , "Tiwei Bie" Subject: [PATCH v3 3/9] um: Remove unused functions Date: Wed, 06 Mar 2024 18:19:19 +0800 Message-Id: <20240306101925.1088870-4-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240306101925.1088870-1-tiwei.btw@antgroup.com> References: <20240306101925.1088870-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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These functions are not used anymore. Removing them will also address below -Wmissing-prototypes warnings: arch/um/kernel/process.c:51:5: warning: no previous prototype for ‘pid_to_processor_id’ [-Wmissing-prototypes] arch/um/kernel/process.c:253:5: warning: no previous prototype for ‘copy_to_user_proc’ [-Wmissing-prototypes] arch/um/kernel/process.c:263:5: warning: no previous prototype for ‘clear_user_proc’ [-Wmissing-prototypes] arch/um/kernel/tlb.c:579:6: warning: no previous prototype for ‘flush_tlb_mm_range’ [-Wmissing-prototypes] Signed-off-by: Tiwei Bie --- arch/um/kernel/process.c | 21 --------------------- arch/um/kernel/tlb.c | 6 ------ 2 files changed, 27 deletions(-) diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 20f3813143d8..292c8014aaa6 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -48,17 +48,6 @@ static inline int external_pid(void) return userspace_pid[0]; } -int pid_to_processor_id(int pid) -{ - int i; - - for (i = 0; i < ncpus; i++) { - if (cpu_tasks[i].pid == pid) - return i; - } - return -1; -} - void free_stack(unsigned long stack, int order) { free_pages(stack, order); @@ -250,21 +239,11 @@ char *uml_strdup(const char *string) } EXPORT_SYMBOL(uml_strdup); -int copy_to_user_proc(void __user *to, void *from, int size) -{ - return copy_to_user(to, from, size); -} - int copy_from_user_proc(void *to, void __user *from, int size) { return copy_from_user(to, from, size); } -int clear_user_proc(void __user *buf, int size) -{ - return clear_user(buf, size); -} - static atomic_t using_sysemu = ATOMIC_INIT(0); int sysemu_supported; diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 7d050ab0f78a..70b5e47e9761 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c @@ -576,12 +576,6 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, } EXPORT_SYMBOL(flush_tlb_range); -void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start, - unsigned long end) -{ - fix_range(mm, start, end, 0); -} - void flush_tlb_mm(struct mm_struct *mm) { struct vm_area_struct *vma; -- 2.34.1