Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1045805rdb; Fri, 9 Feb 2024 08:42:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiP+I7iuVCo0E/ekMwtyXmSIXsbBdnRzBoAbjVXVn4LTtgfrzx/AKaxg0GgyYRPSkNvqTR X-Received: by 2002:a0c:b4c2:0:b0:68c:96d2:5a53 with SMTP id h2-20020a0cb4c2000000b0068c96d25a53mr2026202qvf.32.1707496952540; Fri, 09 Feb 2024 08:42:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707496952; cv=pass; d=google.com; s=arc-20160816; b=QNKIlVPS/aW2Q6hSj8pH+1X12EK4wSsje3aAs9SIzRJTO3Gv9Gvl3VqvQR1tcdGqMD F66utgjNxmu9d5VL5JrEaNMycnl4hvke+IlbTl1WJsQCyMGNs5pKrXXQmK437xQs8Iaw ivTGek02WhJ6F9d+aDoVMtjiHnsLesx0xVDIS28vrqr9aAKqJkgmWn9AFMXcQtsjCVZP S7NFNSf5cBQtV+4O7OgnVeJ5/xRC1KhMrf4JIxPm5JCXNVE9urLgQbhWwTe78wctbZ7l ildum2gzaWP6KNQPHyKBsUCv5w07n3x4XlaSRNYViZUYr5z/W5Cmg6sOCftZvAUR9Qt6 ku1A== 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:dkim-signature; bh=SjsOhN8aSrNAMTgfG/Xy/2KiT6HC8gp9GBm4gpWbj44=; fh=cYKVl3qAMJbmupi+bQgk4LJADQwRp7pKHrAXoAuaEkw=; b=CzPgf+lDDM2k5w4O2Osd3rPXEymSGfbkSfTF3oK/U6pES/UceUXe5CjBSd3mv16s3B Hy1sQTckCTG8Bihw0wk23Kv2Z9Jc5Q1u8p0mJjfMo+Tmp7ppCNiZXLXSeC5lvQHMpOvg Nm8SJrpUX9RDl86vc52poxcqvdsT07feq3+BbM7+YR/z8m8jZ6m17WeQng+u/lM0IGIE THoFQ16pUURdYWQrl/riZDleph9CkUY0TPw/i8JgNXEh9EzpKR8jdpHYP3vajOEoYlyF W3dZVl5budEXr9eaCu1hvDyqnFyTggQjphizqg2MucyvFf6L9pn3bCtZUNXVTVrY9qbJ 3IYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=GtpeMLCW; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-59633-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59633-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com X-Forwarded-Encrypted: i=2; AJvYcCWmooA+MuUC42KXmoLewcXRW8tbfkfYQN2CuqXdAeKCwOOxuIzk2DpeTrSR1/X5B59B0Yi/X7EU8lCUXMPAqAzckw9a52msv7j7qofnkQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 4-20020a0562140d0400b0068c9caf9caesi2327474qvh.272.2024.02.09.08.42.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 08:42:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59633-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=GtpeMLCW; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-59633-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59633-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4D00F1C23C3B for ; Fri, 9 Feb 2024 16:42:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74C1F83CA2; Fri, 9 Feb 2024 16:41:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="GtpeMLCW" Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B7A27BAE5 for ; Fri, 9 Feb 2024 16:41:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707496865; cv=none; b=KT4ZWsZ8+1f7/OMNE5re+sbhaZXZVVm5wkIjcCDTI+vTihEVTgZLHDoOn0eni45vVxgKYwA7F6+TflWbgz+iD04Zg/1YOm6w1M850MnbRBwvt+a8GU04V1WgLb4khPm4SX/ceCOp3SN5Qn9/yXt+cIZQJGFTbPvRqWjO4WDFmyQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707496865; c=relaxed/simple; bh=8E0JnpIDpqJTAIa7eziWdB8a1njbnn7OwwrjBeNl/Hc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Delu9qhJ7FecCYcgJlop9yIrp6Uk+ZRCPPfXqh1Dqjb6REydbKgOduhqxdo6ijg3/dLvi6/jyvJF1PU/YZw0yMwxGhzM4jvGYNS2cF9QJZAdUjRW1GrGSol6bK6FqdKRjtjqzglWgc6RHzZecTwzS8Njsf7h5oasg3noAVU/oTM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com; spf=pass smtp.mailfrom=ionos.com; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b=GtpeMLCW; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ionos.com Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a3864258438so206026766b.0 for ; Fri, 09 Feb 2024 08:41:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1707496859; x=1708101659; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SjsOhN8aSrNAMTgfG/Xy/2KiT6HC8gp9GBm4gpWbj44=; b=GtpeMLCWrNSyngKv1QSew5KaM/SR3bLHcNzWTrNX22T5ST4Y6VwOiNq7T7CoC6dvim 8KsD0wWRZ1Baj6ir2enCacXkyhWtrGpHNoFa8ZMeKTPPPQGo+8ZV3s3Ep5rCIznQTEsr dn4j/2WIOHuLhpM3f8iia8Q0f3k0z5AgKTJ6JRzJZ7G5duKBfaMkPI1cRKMQhgx5O5GD xOirmU09IdXzrJORvBP5qUajOupH5ZinbreeDnOliSBvx6pXAmrBkuV3lhuOZhO/LVab CdE3Z6k/S4wibiI9X8T2616Rev3Z9TGRH2kGT7zj3k2ejUxWfl1rCmONHaSbz3lDUacz 7xkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707496859; x=1708101659; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SjsOhN8aSrNAMTgfG/Xy/2KiT6HC8gp9GBm4gpWbj44=; b=S/iANoWj5V2BmfYiKHHdtFXQFXwq9ohS/ZoVTLHKxegQ8wIupMqL6UwjSsXOAkMjTz HU37Usbk6/hjnyplPz+5WSRWVNOM/EWdAnmzrmpSvkp9g1OOZVo7Ns+2jtLQIeL0t9r4 AlE0gs8v/JUepZg/z826V4NoRM3C22V0QAyRqspHku9nn2UJYNR5sdZxecGNPPu0EjoE GHlJBtTtOd3gHmjh81nDAuAg9Nam3+v6A1iknq6my+B259Ufpyn5qRs63BKWnTT34dT7 8G5mwfXfPhIFUK0viAwRHMTq4vO8XbI7/J+M5uA4YBlA8vX2DoAG8mG0E0c3idwJ8QYw WD7Q== X-Gm-Message-State: AOJu0YyZy131uhjQ2NXEI5PTIYS2+/EDFbfnQLWypOrco6prGpNzaQoO Q0hzkyhe9ebo2Al2yu4bnz9atS0tMzEP0t9rQCBnbaktNjiRP/UCPf7N9gT5Gw+DolQn2KdGiKB S X-Received: by 2002:a17:906:796:b0:a38:9911:cd2e with SMTP id l22-20020a170906079600b00a389911cd2emr1452524ejc.3.1707496859300; Fri, 09 Feb 2024 08:40:59 -0800 (PST) Received: from raven.intern.cm-ag (p200300dc6f267100023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f26:7100:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id tl27-20020a170907c31b00b00a3bfe97fe27sm477724ejc.218.2024.02.09.08.40.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 08:40:58 -0800 (PST) From: Max Kellermann To: linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH v2 14/35] swait.h: move declarations to swait_types.h Date: Fri, 9 Feb 2024 17:40:06 +0100 Message-Id: <20240209164027.2582906-15-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240209164027.2582906-1-max.kellermann@ionos.com> References: <20240209164027.2582906-1-max.kellermann@ionos.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit By providing declarations in a lean header, we can reduce header dependencies. Signed-off-by: Max Kellermann --- include/linux/swait.h | 13 +------------ include/linux/swait_types.h | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 include/linux/swait_types.h diff --git a/include/linux/swait.h b/include/linux/swait.h index 68c2e30edb1c..4a4a240b337e 100644 --- a/include/linux/swait.h +++ b/include/linux/swait.h @@ -2,6 +2,7 @@ #ifndef _LINUX_SWAIT_H #define _LINUX_SWAIT_H +#include #include #include #include @@ -38,18 +39,6 @@ * wait queues in most cases. */ -struct task_struct; - -struct swait_queue_head { - raw_spinlock_t lock; - struct list_head task_list; -}; - -struct swait_queue { - struct task_struct *task; - struct list_head task_list; -}; - #define __SWAITQUEUE_INITIALIZER(name) { \ .task = current, \ .task_list = LIST_HEAD_INIT((name).task_list), \ diff --git a/include/linux/swait_types.h b/include/linux/swait_types.h new file mode 100644 index 000000000000..316038879a37 --- /dev/null +++ b/include/linux/swait_types.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_SWAIT_TYPES_H +#define _LINUX_SWAIT_TYPES_H + +#include +#include + +struct task_struct; + +struct swait_queue_head { + raw_spinlock_t lock; + struct list_head task_list; +}; + +struct swait_queue { + struct task_struct *task; + struct list_head task_list; +}; + +#endif /* _LINUX_SWAIT_TYPES_H */ -- 2.39.2