From patchwork Tue Jan 23 11:03:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 190871 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp265306dyi; Tue, 23 Jan 2024 03:26:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IEI6La9rzmx5BjETeqVPSyBLAXlHWuVsgLLNNrX2qeeNfA59xgGS++r4EBJaiqTDnGP9Qlm X-Received: by 2002:a17:907:6a0e:b0:a30:c661:8ed0 with SMTP id rf14-20020a1709076a0e00b00a30c6618ed0mr438448ejc.16.1706009195018; Tue, 23 Jan 2024 03:26:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706009195; cv=pass; d=google.com; s=arc-20160816; b=oYP+NI3ZhykZ3uY++EuJBl2rt2shTjE/f+Aa8WjRNomM4nt9cQeMRd3wFWC/1rYxf4 G87x6H9O8OeXAaHNu/XHuVEhQCoJhpCjtppmh2JLJfuAZFXfEkiIlesBQ9bqwg4iESMB gtxuL2o2hu1ngVkMgmk+LLf7VZ7nFbdGBxFbtrApLs6zwSMR9exGZAEfemDlaPsjNr+T QnOLoq+iDFdh1SXYGFlT0Jml1ECh8DYjMrPWCtdvNS/nqytOlxDIPxxlFTCWYuaR04tC wR3xq+y8yi55LF1IPDe0+D7o6+tuOHk7e5IaPfIDA+RuisjfJRNWCZO2lo1ZXhGGdlX1 JQVQ== 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=2OUCyawv763RJuh0tp1OY7aBUf41Q8m3nxrITJmYLpc=; b=p7b8fMZ0HODL/uGv/paTM9cOcPO4piAgrYsjon50lQ/jRAsMVgnclOlq+xxtq9fHBx 5YajqRWJlg+yygu2ebgYYxBtPqO3mkWEuo91peAf9ia9Ostbl2wMohiiUC4FGCCMNedX rKLlK6MHD16oOSWSrfpTYv3fNL7Wjqh/SYK1+B7ODl8UJbSZGlZEtAXq8xxwxLuLddeS OAqmyW0hAPbqBKH/vW+/IB+sPheBOoPbCOXVBeB7BTiweaYRq7+L5UEIY5PEsUWn1rvJ UPI3uhFNW5NwvV94ieWsSR9k+ro47XO6Nk6Ix9TdWgnEEkqFQAtCG7SImCTv22YBewCK jVLQ== 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-35184-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35184-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h16-20020a170906399000b00a2c2a7b792asi11610510eje.377.2024.01.23.03.26.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 03:26:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35184-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-35184-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35184-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9A4231F28653 for ; Tue, 23 Jan 2024 11:20:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA0F45DF13; Tue, 23 Jan 2024 11:19:36 +0000 (UTC) Received: from out0-205.mail.aliyun.com (out0-205.mail.aliyun.com [140.205.0.205]) (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 31E8B5D72F for ; Tue, 23 Jan 2024 11:19:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.205 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008775; cv=none; b=i9FaBP7/EBNE9DaG/sqnY3/gAX8IbFBOmKzENobCVWlsfeVtR9FpwyIPgLjOf5mcPoXOOpV1vQM2vhqbhyNt50BHQ58E64/hpHRSbPyGhIDlO7MbJNrFPHsG217O1ypqIrZhO3Fdpva+bzJ7wUDMh9GEt8/Run4SiLQilyPJNuE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008775; c=relaxed/simple; bh=5BvnaK+Q3e30bHwbnZ/Zuza3SgyqFfcHiBGD0cfTfMY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=nTLuuKU9eMPNXBzGCK8RZl29KOtsrHwszWBDajJSjQ+vB9KN8BiklSWYX6Pg4DhbSuxxh4gRME8pd2pV2u+yIl1E1bM1uaFxP9RLRjwop+FbEKKcqZBrjP387ffylsa0vqISZMaXHMvg4DkZ52em0UEwYSYUAF9yn+46elRlxzs= 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=140.205.0.205 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=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047190;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.WDCKTk0_1706007836; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.WDCKTk0_1706007836) by smtp.aliyun-inc.com; Tue, 23 Jan 2024 19:03:56 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH 3/5] um: Remove unused functions Date: Tue, 23 Jan 2024 19:03:45 +0800 Message-Id: <20240123110347.1274217-4-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123110347.1274217-1-tiwei.btw@antgroup.com> References: <20240123110347.1274217-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: 1788880297334275311 X-GMAIL-MSGID: 1788880297334275311 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;