From patchwork Mon Feb 5 11:47:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 196763 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp820283dyb; Mon, 5 Feb 2024 03:53:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQmVWH+SYkZocgf2bOyIxqibWKLDbY1WFzeOebp7m+KZScPkWS8s9yoH51vK3JtWLk/5u4 X-Received: by 2002:a17:906:b754:b0:a35:fd93:8be3 with SMTP id fx20-20020a170906b75400b00a35fd938be3mr8133410ejb.2.1707133983507; Mon, 05 Feb 2024 03:53:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707133983; cv=pass; d=google.com; s=arc-20160816; b=Rk/v95VtVuY8XA0brZlrb6uIh4Sy2pNq4qId6VXdyy7L+LKBsJWh9RxUXJrgPSSB40 4iISCMUPi0+6aAV2TiNC2lXsrWCaS1puT8UZn5b9lawj3A6dMnza1bWQV4NmSpZI0A/u jNpdAdUs0IPd+K0SiaRep6JfJ71uB4q4itIU0mvWzugJA7suxrZI+voFHJs6oYbg3e23 CbIN1brFBpkM2DI4/rYflSedSZTn24u/8MrIbkVOUSxFUrnr9emUi+gIL3dI4gOXVc5H YJha5LWzrY1NAm6Q+3ESs+CxITq4OVIJy8YqiT3/XugjUQaSx7rhRwJw71d/DeVLnafD W85g== 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=PWHxm1357uCYvpt+BrtH5O1/xzqKWuvwu1BwYxUfVl0=; b=BgpvLPPbo7wjPLeZOAGjpnI+8GQeKfEuEfP5xcQoKy5glxPjrqbIjxADDDaUaHU7r9 DG7Sf4SimnYpMdC0BDMAAaSS6x7qw9IXDBU4tED/aR+mm/b7+htysZpWNRs8pFF1qbum Vroek2+PP5pK9+tJuVE9ZoUEVFEkhN4gC3egO84zX/weTrX2g09rcyVeQyhQTLxVpz2L 2UU8vVts2RdFh7l+XLSQ7VbVciGKpIo++knPnCCUOAQ4VaaTMpCrqhP0Rsgx992Wa+hd De5ELsRe8kNdVxtLAogjfEOalxsUNVjMFQZpY3W+MvWciYXuGMiv1vg0fo/z0OPQOfut jOdw==; 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-52522-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52522-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com X-Forwarded-Encrypted: i=1; AJvYcCUpLZ3/voB10m8rqgHGmNvAL2tJi8x43afg3+dh8j7jaAbQVBBs8CmfPiW4uGfcR6eLxYYC7oA0Ahfj+9Vrx71hlzqrow== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h19-20020a170906719300b00a3064ce6062si3825773ejk.388.2024.02.05.03.53.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 03:53:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52522-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-52522-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52522-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 220321F227E5 for ; Mon, 5 Feb 2024 11:53:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25371199DC; Mon, 5 Feb 2024 11:52:48 +0000 (UTC) Received: from out0-195.mail.aliyun.com (out0-195.mail.aliyun.com [140.205.0.195]) (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 683F218EB2 for ; Mon, 5 Feb 2024 11:52:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707133966; cv=none; b=eqP/ooutg7ky25lFh/9McCsOHbAOyRDEpaXgCNQJdvumVfM67d+OCET/zrKen6RzEiGshHv11TFgppnfzpVtzPk9T9pvWwCfjxdroxqid6KUYCksjjH+OBvGj5BVBTTlNAUCz9QxD1bbsYGzHOF9bXMAemekUBiXX/uxqTzPGdE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707133966; c=relaxed/simple; bh=5BvnaK+Q3e30bHwbnZ/Zuza3SgyqFfcHiBGD0cfTfMY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=fRfPy+StFX8L96KhD6NmQJZwnF+seZZ76Lkl1Qo6FCkDJAIbSAUB4+xW+CDrMbpuu0GNBiC2hYOhx+hTZnJuj5hBilLI6Vvcwq1kvi9bMnR1RrETX8GONmPliT/PEJfOAi4ROkoCoG9/sjF0DWhH+KwMMbENfXbzurKFzrLSteo= 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.195 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=01201311R671e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047203;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.WNt.Hm5_1707133638; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.WNt.Hm5_1707133638) 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 3/6] um: Remove unused functions Date: Mon, 05 Feb 2024 19:47:05 +0800 Message-Id: <20240205114708.25235-4-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: 1790059723832663129 X-GMAIL-MSGID: 1790059723832663129 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;