Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2412840rdb; Mon, 12 Feb 2024 04:17:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRBbIAhxe4n3/HNMiUO1g2wJmdKfgX0xR9aMgKE3LFNXTi3TpgCgnQC9oGCYRsa3AxkKyw X-Received: by 2002:a17:90a:ec03:b0:296:669d:bf74 with SMTP id l3-20020a17090aec0300b00296669dbf74mr4365578pjy.1.1707740227948; Mon, 12 Feb 2024 04:17:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707740227; cv=pass; d=google.com; s=arc-20160816; b=qLWVBos8X8EpYAvV6TvQwJazHJ6fxdy/z9KLJ/80XkQmpm0sNk/4UTxv4M2paZcunG 1XOoc5nZCvRpb56avt1Q9u9PfDKVMn8S0x8YKh8/FTtiXIDRhj3TH8Tpg+e987c9hjZM gIC1mPliGrIJCQ6a0q4MF+0w0VrRgxXxKW8JIaJZ1DafiXSK9gopvU3DuBM7XmCVfOFE UZhBecbISpzyG5X+bNDJMd5hR24G32ePSfn0sbTJ9vSEalnyDeZ0ag/wnYIv3KgUGWvC hkOJ7ubs5OVfEbXag+DkmmCV1+InV7kmkUkhJkS9di8NKtSS6o3yDULd7ZmHFDLRMkKU 5YAg== 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=jYWONKEfyypsQx26Swj5H3vXFHTxMGTOOr2K1QsNu0M=; fh=tpeDDDrMsUJB0ukCpaUBz8LuiriCW0CEypjirbWYN0Q=; b=o92wWL859agagEuHZU7/YOSHRmePvTH5EZSNCThtAuTxPxKq3onxMDd/p0Szr91hGd EsdBpGc8JikZN8v1Rd2Al56HqmTk+b8plKL2kdzWmmZWtafhoJzSFOeR8AuoC1nIdtjp DJmzAeXdBzHMjjVk+ZOVRRJeC7hRDPJS0qKXGY79LmkpJ8QFTwA4luXbuvdoLTgPnjD8 Ux6hTTtAuCORuBh+byI+7mBTDuY36Tg8evmlIf16DJJQWFbxDqaeeOaX4m7GoNCusV8T tngAEsGTejnSbY3QutsmDepq7lwdd5hL8TY0/XIiJbmnRGD9KIDS47c3AuAzT6eT3Yz7 wyWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=WUR+egWe; 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-61478-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61478-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; AJvYcCUPT2wit8tSxelrHq7FIZAvg25W96lsd/MR+ky9zDXqf97866S3wD/62dxgqsLb//n5aQhracYp7ygyiAqKnKwpn3JUGWUoFUMqnTRZDA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id sl15-20020a17090b2e0f00b002965e1e4b1fsi200751pjb.51.2024.02.12.04.17.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 04:17:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61478-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=WUR+egWe; 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-61478-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61478-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 5D8F3B26AB6 for ; Mon, 12 Feb 2024 11:58:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B1A43BB29; 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="WUR+egWe" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 EEAA43A8DB for ; Mon, 12 Feb 2024 11:55:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707738936; cv=none; b=kI1U1DmTTjR2/xxd9pEfjZvjOXcKI7yTN78G15OsSJEe0WdTfiUGbW60xzEg2T9lo6qKgw48hlFYJa6UOg3KnArrRGO0Jz94iMq13lfMewYlxGI01Ijis27yF5ipE8yD5TRfyzHMzAa0aiR1AfhySw4srl+ilrArHTXNBRemCU0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707738936; c=relaxed/simple; bh=3EMwRWQVmXFpMULqT0KRcNauX3dUmEoNi+TxEAuDB/E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Z5Ckzifaqg2nGKlWOXae3hC+y19qYGPE0Yc08GhXu3zwF4arfVEPou2urfstVxGiYl+6pYd3aSKZ7KWKOYKUu7XtDzooJ0RVigggysU7VT8sYhw44VdWANvvBLeVpfyzSR08+lvsSkf7EBwuV8sl+cwAlHfa6EAjT8oJk+jPk9U= 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=WUR+egWe; arc=none smtp.client-ip=209.85.218.47 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-f47.google.com with SMTP id a640c23a62f3a-a3ca40db065so76974766b.2 for ; Mon, 12 Feb 2024 03:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1707738932; x=1708343732; 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=jYWONKEfyypsQx26Swj5H3vXFHTxMGTOOr2K1QsNu0M=; b=WUR+egWeUsyUe4XxZWMHNGZx79eFhW/o/6UA/Cz4MID0LftctkEiea7sb3CXK8toBo 8Y2GAlPxp1hZ0N1VgknaY84ehWDHgShaaFr1U+ku/2uouQv8KecxCCSuqRFvwqj7Nl3+ fNAiK5YEIEIdwWDgiNGBd54XqHVwhWS08qesc+yj1LaijyEJI/2yVsLdzmWTb1N8pzyp +uTuFV/oXDaGTEBLStzRZDaOf39PxRngeURIvJ6xNrYmKFV/EmC6fzMXWeUs4jfQUekK vxidH2L06kQkca3w1J22LavnST4ddlfxLo/JQf/gdQaApc0ZCyWpT6+DA/d0xANeDi1e hTnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707738932; x=1708343732; 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=jYWONKEfyypsQx26Swj5H3vXFHTxMGTOOr2K1QsNu0M=; b=MQosWC1p6Exai8e224orI/7QDX4wNLDvR+hsPtJcQkjRLTM61k1qmsBmfRE/Q0wIX5 5zTc/k6s/E5aK/RBUUkkx2GiNfjLMJviftHviK+hyQLBv/tIKgfggmMmLM+8ViCwwkya lgr2piPkp/0jpteaYXg0Zs4Bqon0CgE6iRfvaAyqQvWaAMeWtBrflxbW0EFzHcaQlqP8 7XbPWTkQdLSzMCR2lxLDHsrnJIqHEHCJGeVYjM57JYzC0W2WlJAVLhb8ukJsPcu6wYRN CyF/oZRn40mXyw83Z1dJkSoOw5tyOh3EyRctQDJu4qkk0jkG8shGhe72EL5LeHX9Q4Cl 2Z4A== X-Gm-Message-State: AOJu0YyJjD5UfSzcGhbsEfNMti5a3/fpWJwgiqSYu3sNYK2HnoYjEmJc naBdjialz9wj6JYbJ8rowgoAjTr/VoF6HosrY6nmr4a3WGDHUZ7Nyy1ysHIE/7YTHCvFdshKoOI Q X-Received: by 2002:a17:906:d96f:b0:a3c:ccf7:5fda with SMTP id rp15-20020a170906d96f00b00a3cccf75fdamr687984ejb.46.1707738932239; Mon, 12 Feb 2024 03:55:32 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 03:55:30 -0800 (PST) From: Max Kellermann To: linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH v5 18/35] blkdev.h: move blk_op_is_passthrough() to blk_types.h Date: Mon, 12 Feb 2024 12:54:43 +0100 Message-Id: <20240212115500.2078463-19-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 This is a very low-level function without any additional dependencies, and moving it will allow certain sources to omit the "blkdev.h" dependency. Signed-off-by: Max Kellermann --- include/linux/blk_types.h | 6 ++++++ include/linux/blkdev.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 96a37f399928..ad48c3f5ddd6 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -434,6 +434,12 @@ static inline enum req_op bio_op(const struct bio *bio) return bio->bi_opf & REQ_OP_MASK; } +static inline bool blk_op_is_passthrough(blk_opf_t op) +{ + op &= REQ_OP_MASK; + return op == REQ_OP_DRV_IN || op == REQ_OP_DRV_OUT; +} + static inline bool op_is_write(blk_opf_t op) { return !!(op & (__force blk_opf_t)1); diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index e67298984913..6bfa4b92bb32 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -260,12 +260,6 @@ static inline int blk_validate_block_size(unsigned long bsize) return 0; } -static inline bool blk_op_is_passthrough(blk_opf_t op) -{ - op &= REQ_OP_MASK; - return op == REQ_OP_DRV_IN || op == REQ_OP_DRV_OUT; -} - /* * BLK_BOUNCE_NONE: never bounce (default) * BLK_BOUNCE_HIGH: bounce all highmem pages -- 2.39.2