Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2412824rdb; Mon, 12 Feb 2024 04:17:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV6XP2mIHolHrgqpXWdxWthZ4pxOTMOjjLZwcHQ8gT7LvzoTJdUqV0pmn1wFjbQoLre3FryvW1G1Wacysp1XBxC8hnQb/V7kJXVHKqAKw== X-Google-Smtp-Source: AGHT+IFD8mQvQSIDDlYodW3oJGxw1mibIyCbycb3FSSlxiM1NKpQo74AabfADOkK/hw2U2uIZ2sY X-Received: by 2002:a05:6a21:3a82:b0:19e:5d02:12d6 with SMTP id zv2-20020a056a213a8200b0019e5d0212d6mr11738290pzb.26.1707740226132; Mon, 12 Feb 2024 04:17:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707740226; cv=pass; d=google.com; s=arc-20160816; b=fk2HJc58o7GVT+XV5D/oQUSvfDvw/Xze+5piBSLmL2atmnBlQWMP10Q9UP/N9KFmav odGmSpH3SNRzHs2sTjM/uQO1VYQvarivfF9IpNYVic/NoIChmz69QrawgbW/ktZYF/PH 0hmQvQKEh0wd79lfadcdHZnjRFaeEqED9D6irsezl4ooQMw6hdrDWwDj95NDNW+2RSFn eNsGsN1yvT9JueTYvhIFhGNem+si+mtHj3IFciJg6GtNVI8za210KRHl1y3ZSD5G7f3J aUK2ymMvv609Zbv8xeYhSqLbPHGnEgDpD1O+Mm5s0ncEAi3+XHtgxnQbhjfsa2mxB3c4 kHhw== 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=+QS2a2aCTL6+trHHxqIlj54RybAomBJf4orPyvM0DVM=; b=IEgXpIM+mNMd5ifbFooN9iyZmIe35GjHN4DefjpYumWm8eOoPA7ZEwbWEfmb0kW1u/ 4MtBl6TrS+SxNFd6JZ9F33ryUqjbiL+tb5lxPZfXqhDhGHCIo9/JpDMpyVmbdNXNcdoJ +QY94wDiN7Ter6tS9qI3+s4G5Awss0Ib7jUuICn+UcFM0n8CCAyamoNvWUWuWlZcovYR otZ/imTtb4nqc8zlNRrkYWvU0Oo+sGQU0ZTo/2gA1SlN21jjxfofhyG2gahWhZzh0EFT oUtk0ANJYglMgLrnJ1maLCARfBJHVy9lX3+1SztoH+jz9n39M1JQSOfUMiHMkj521Jwm VHfg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=MO53C63R; 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-61475-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61475-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; AJvYcCWaDW7X2paWOvlFqjzDHmd6Uu3HELN21n/I9GHzjM8qoflsvgvu7XVKyDAG2FSb3E8nRjr/i4n5rQ+2QywBIPTTsqNtBqvo3/MXy37vXA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id bx35-20020a056a02052300b005dc2a16ba10si170022pgb.7.2024.02.12.04.17.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 04:17:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61475-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=MO53C63R; 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-61475-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61475-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 37B6EB2688A for ; Mon, 12 Feb 2024 11:57:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 212F13BB22; Mon, 12 Feb 2024 11:55:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="MO53C63R" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 A1BFB3A1B8 for ; Mon, 12 Feb 2024 11:55:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707738932; cv=none; b=V0RMU4tNM1FTrUGPOQr0uxinrc2tcxQ2oivgImUIBcq87wymSNxWMtTBT6RO+e7YWG3AzyRlUwI3K/TIv6pvshRdx6k33uYJRIVJ8JIxhqB6yANcPeFO2NSCZCJID1Ai28Aw3qRjfEVRrO1PyAoT1lgu+2gX2mvViZQEVWzfo/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707738932; c=relaxed/simple; bh=8E0JnpIDpqJTAIa7eziWdB8a1njbnn7OwwrjBeNl/Hc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eh9nWJgzjzYRLOFJPZeTK+MDoUlLWPUNveBEsGKldG3KGy+0W+FPmWWIyDu/6qHWBT8yCFbFs2jh44yOBn9ZKAmtGt+pgIhVXcBYQxCVFs+O7nDhK1EndTV/1vfyClCwtl4tlbR8URiQClWwKgKJYDtnjEG3oqFwZU/CUd5sQwg= 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=MO53C63R; arc=none smtp.client-ip=209.85.218.49 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-f49.google.com with SMTP id a640c23a62f3a-a271a28aeb4so386143466b.2 for ; Mon, 12 Feb 2024 03:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1707738927; x=1708343727; 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=MO53C63R6D5tZkUiKwO0QVmm1d832ChMYvfsPvXRIrDSuaEMiXPaI90sT5NqWEGQI4 WMqrsYRXAAXSGvoZCGIhnhMhNKyePkkede6w+RAh3bMt+rT8zK9WBxm5Q5HswQBCwVMx Tr7UdiUet/R0Uip17P8WeNzYd1g9U238lW1/kDXDR3Q3YYrIRdOZXd+KFz1iDAqokOdA dGPBm1cbIV28Bex8FhKKxK7Mt5ibfgMsyl8VBWDbZyMv28H30IsAKTeOOyih2MFlgh2P M85PpdxMYQ10JYOrRfoZzF14WLW971tjeTce85mJwAsGFjl3iXv5yhNhNXmOBaziuii/ T5gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707738927; x=1708343727; 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=wTkfXysS2SbJzfijKbodIjUZJ7sipcHJbIAqaWkrDQKBAnWPusYWQAKh2TWpi2+bmy vRXZZx2n/4DPUbWtw35cXp78i/oxLal4MlUPf8ROPqoIZmoScKWfJQrNqyFNu8Moip48 JExiGNoLRvigEBGXQxj1ZIBNMziZuuNl1CwC5lrqP40szFGCbhuw3Jo2mZDNB2RsCR1b B7mjgfNF7jAkFESemkKBBHGJaWwPVfYtvjHZ5vD7YQMPurjW1q5Z5JEZKBVUDs+e5KuF 0/CjZv/MVZpuF6TqHo/bHqYSbD2zVJ7cOr7OpkKO5tfgYbViADzd8SZYufNnSQWYx3DE W5+A== X-Gm-Message-State: AOJu0YzX6k9+MARdC62Zs8Yzdhjz4xcF5uyEHpJdaPnyjMxlD5O2Hl1u aa5EEd/ciDOSkZXOqDecCDqkapm3dvV3AUT//3TsHNDPgswgvtmiOZVddP8YQz2LVje+mq7pv6p y X-Received: by 2002:a17:906:b259:b0:a3c:6052:2f53 with SMTP id ce25-20020a170906b25900b00a3c60522f53mr2900710ejb.37.1707738927381; Mon, 12 Feb 2024 03:55:27 -0800 (PST) Received: from raven.blarg.de (p200300dc6f267100023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f26:7100:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id m1-20020a17090607c100b00a36c3e2e52dsm139203ejc.61.2024.02.12.03.55.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 03:55:25 -0800 (PST) From: Max Kellermann To: linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH v5 14/35] swait.h: move declarations to swait_types.h Date: Mon, 12 Feb 2024 12:54:39 +0100 Message-Id: <20240212115500.2078463-15-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240212115500.2078463-1-max.kellermann@ionos.com> References: <20240212115500.2078463-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