From patchwork Mon Feb 5 11:47:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 196759 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp818540dyb; Mon, 5 Feb 2024 03:48:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYy+uZiFGQ26NwOgUBflXL9IP3r+eXYu0x0RiJ6a+siNc1pdQK9TwSdGrcXRLPurZ5eHuZ X-Received: by 2002:aa7:d854:0:b0:560:d8f:7def with SMTP id f20-20020aa7d854000000b005600d8f7defmr5159483eds.17.1707133703188; Mon, 05 Feb 2024 03:48:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707133703; cv=pass; d=google.com; s=arc-20160816; b=DLG0LHb7qbAYWkoi9gnqSzBdGZ8QZ8Z/Pu4gx7Qd9oLzfZshMlYWd/1b2CbF5pGS/4 VZZN3iZhKJ9gysGLmybRqol34/8ITlUlR5FTIc7Ug/6jLBFBLt79VsRH1FldfBwZIxj+ 97VyU4Y6TRPkFKKgDRDaHbsY1UluBvZWrmZSKzuGbhs/SRf70xKcLXAvAclqiWtDsSoH 6btVdghpJXfrUT4TApDFwbH2TnsKq5tzOwfDffvjcE1lX1wpZsvVjtDz+7BlstwmW/Fy sO/uFHGIjI+a3W9KKIsBh8fun4CZOvqy811yZ9VO2dfGxfbyyYWg9BGXW0OjaoB+bIk5 zs1Q== 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=gr7z/SlPhRJd7tsl4kQkoTMn2fox0E9luuadMesY+gA=; fh=dBZXBP1Ije55bomAbPc+4rdrqUurKdIX4p3q3I6erAo=; b=H7/M7Cj8cFQ1IdKdOixBQqNhcuvutOGiCfuMafx8pZMaJRSr2QdZdH/FgS0+dAiuwE pMhV7xG2VDsoKloMlF/jt4S8SiagaWAfaeDArPkEJdRXPtakcK98vNCO4RZPklm3zcci KKYJhMH4Zm0GJWm98TKB8iZ1PsE4GalDystMT8WLhg3S5Rl6/QfLmobHL+CvDhQ4n2an qYxSbQH7uot8HE0dtJlf6ls/OPPL1TN0/nLCTWPqhzHp+Qp7b5LKb0qKvNdfnPt4sgtQ yEystV3tw25WnudUmxkhDsr0U2zM7KtNTyF5DMJPpRYbxzLEs6ONK+sOgnTCeNMmgue1 ooGg==; 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-52516-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52516-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com X-Forwarded-Encrypted: i=1; AJvYcCXMGL5aqECMICuJJIZGHPtivqGw3E+GzLqvrxNjX+A3rmG7Wf1DYKEp9v1dTFUH61C2S0H5OpzslvyVJcUesRcsgeNymg== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j10-20020a50d00a000000b0055d33a14abasi3875419edf.367.2024.02.05.03.48.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 03:48:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52516-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; 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-52516-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52516-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 C379E1F23A7C for ; Mon, 5 Feb 2024 11:48:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32F721B97C; Mon, 5 Feb 2024 11:47:33 +0000 (UTC) Received: from out0-197.mail.aliyun.com (out0-197.mail.aliyun.com [140.205.0.197]) (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 B4B441AAB1 for ; Mon, 5 Feb 2024 11:47:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707133651; cv=none; b=BeExNfAOzTXlkM6Fc0mDHm46ZhB9Pcz43z98yeQLQJePRx2PjTnYqAM4PzOhsnQ3MmeS7w42+H5VH94QrmByFkZv5OyhXzF5D7LctnvMVLw727fEd3yzyrfoUohsDxhD/fVivIXEN22RmS5zZ+jr8B0STme9NHlHRuInzDZqvJM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707133651; c=relaxed/simple; bh=e5W/30uahPxnnobqPEw5qPDCHBhsj0fyCzs0F+PD/V8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=B0NrkC+TJbfLU1lCHlOhh8K2c8chUTRcXRkyKLMaO4G56j0wDHOnhIzf6pRSiF2n1U9doirHHD1lofVEUDHCjJXQO9JlzGyzVeEbtSB5xpflGDulNKDmm9AywiCbvi/tcjf4eoOvFyuoQS04ol5J1I+juRynPDWascFbIgwGGz8= 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.197 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=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047193;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.WNt.HmC_1707133639; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.WNt.HmC_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 4/6] um: Fix the return type of __switch_to Date: Mon, 05 Feb 2024 19:47:06 +0800 Message-Id: <20240205114708.25235-5-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: 1790059430367178586 X-GMAIL-MSGID: 1790059430367178586 Make it match the declaration in asm-generic/switch_to.h. And also include the header to allow the compiler to check it. Signed-off-by: Tiwei Bie --- arch/um/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 292c8014aaa6..a7607ef1b02f 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -73,7 +74,7 @@ static inline void set_current(struct task_struct *task) extern void arch_switch_to(struct task_struct *to); -void *__switch_to(struct task_struct *from, struct task_struct *to) +struct task_struct *__switch_to(struct task_struct *from, struct task_struct *to) { to->thread.prev_sched = from; set_current(to);