Message ID | 20240131145008.1345531-19-max.kellermann@ionos.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-46649-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1958905dyb; Wed, 31 Jan 2024 07:18:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGH/XCIip1iHJDgPDCk367DnH2zlIIE7DhqBP3czjvN4l+LfmFGvWr33YkmT1kxhAOpbvwO X-Received: by 2002:a05:6a20:2921:b0:19c:6f20:599 with SMTP id t33-20020a056a20292100b0019c6f200599mr1905072pzf.26.1706714288209; Wed, 31 Jan 2024 07:18:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706714288; cv=pass; d=google.com; s=arc-20160816; b=m3+dQoDBaAvRLKVzwKd5RWZ80ud7NRZg35kqIOQ06U6DMVlrsvhUJrr9nlkvBRm6bF baFmyXxFU6gzp8ed/v4pnRPE3w4wdIwwk+kk/FQCo/rEF6fVL/VMEvFRBUA/PuTk3Fcw J6dehL9CBUUhP9fR7xrxnkL5m9/y9arIKDhbROUbfTjl5eYdXBfYPOlwkPi5vd6SWRdU HcVPJJ39hbGIEivsxSDWcZib7jDYSHo1Ba8ELxWn4edcrhtJWYKnZDEyvypTIUc9GvqQ AwkgEwLHCGwuv/7yXSSXeuNh5AQEA2328DOLX1m0yoOgQ20x5CgMoKyzpv+JRd1r6jtr 531w== 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=0mbaZiKy2gj/Ag7nIoIhu2w4coHbnrCERj0vQ/xP9W4=; fh=ue1H27Zwbzu1sz2mc8Jr6En0cZaZbQBYShuDXX3UhHY=; b=RQkVhtCZQDV1t9ut6g+u9E8tYu9BAAsQ0p0Rigu7SESvQD53sC4iA5qnPIz4svJ/vz LJp03y1mmD5K2o0O0NKPd8cxSvLbYyX9S4uVuXs1YLvcMTjTnN8bOXUs2ALR9NEgCFxB py883L3qK6tnmG0/2YuL/dIwb1rH45S1nA3sOq+VQnOPI5fbcA4HRukWwuD1bGxIW+3W nLXQp/BNenFlYX/CGygtuW37p3WOgUxrhTyeOr0Z9VXq1m8eMKTUhORr4EAJcJ4WyZXQ gPhX/ezDCH6Mg85XgWJg0SpJcp9AAK/Zf3DVnGGiA0o18hz9tx5BsV60WT6G6iDDl2gW pqnw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=QoR8q9om; 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-46649-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46649-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com X-Forwarded-Encrypted: i=1; AJvYcCUgjH+lIiIoGH4BE4QHst6kNNJvSR6H3vnFRhrHmGVzRkCyMMtyCIgs8sHy8kTwt/Q79vR2UUoPn8MnYttKdGvmj6ttKQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y2-20020aa79e02000000b006dbdb8ae514si9565182pfq.314.2024.01.31.07.18.08 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 07:18:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46649-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=QoR8q9om; 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-46649-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46649-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E2E17294843 for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 14:56:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69321128363; Wed, 31 Jan 2024 14:50:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="QoR8q9om" Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 0434C84A40 for <linux-kernel@vger.kernel.org>; Wed, 31 Jan 2024 14:50:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706712636; cv=none; b=gEkAWHa2DETMxtgwxOeQBIuZ06YY7uVGIrzrTCEcd8b7AUCCFQErgMiQG5Haav5gA18Rspcsib4RFeGarA/PLGmZxqBdcQCykMoGXkWG5VD6VUXPVfDNoiDmYMSbomY/mwfJFMUO9QAlStNSEeT34KcPlR7KKchEZdKI++6MJ4w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706712636; c=relaxed/simple; bh=nKk/y25uTEBLSW/GB/hBFVugbtV2eXB0vBG1lhYY0WE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=luY83VnJeCaLQjrUV6SSpWVEvCxu2QL8oFx4PcAytiHioi0XtYP6p5FDbP45WDwJ+LCTfBT9l2nOID61MlzoGSK5dsr+ZFB0Or+7RiMfvNb3OAaUuLvum4egfpRY5P2aZkUzhRDKihzFuKRfJRRBUWOyksvnJpujql/nRKITw4s= 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=QoR8q9om; arc=none smtp.client-ip=209.85.128.44 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-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40ef75adf44so28231165e9.3 for <linux-kernel@vger.kernel.org>; Wed, 31 Jan 2024 06:50:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1706712630; x=1707317430; 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=0mbaZiKy2gj/Ag7nIoIhu2w4coHbnrCERj0vQ/xP9W4=; b=QoR8q9omoVLlekYAK4rm3BefQv3Fl7OjepnlUYl+MDdlZnDcyOo7LDz0MAkztBCqXc eSeX2DKP3BVKprp9pKLMTAg3oV5tjp2Y4axVy+zFhTuy3vCeZg4srQ4ekC5DFTtFUTjj HJswlgsTCTmNAcDp+crufZsVI4UiJx2teijR5e0L7P6ISlR9IoXkNf0rUNH11TOMXh71 TWUUhZ3fnwKlS1gblI5eEpnK/0mM23APzj3dkTl3MkaCXWbuHP7X0v4dZgXfihTxO784 1FIRlvWmgrIoxfeGVl0DJEPN/ADJSZi0xTvhEIJ05LLWQTx6slLq8kAMkQR1Zud6ZlQU 63Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706712630; x=1707317430; 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=0mbaZiKy2gj/Ag7nIoIhu2w4coHbnrCERj0vQ/xP9W4=; b=qtL5mOJwrGmMI3V0Cm5husQduBddqWZseVlkPwk4lJ2xQiJ4l81IXUE3It2BlM7zlx SpTlBbyw8E20B4KLTJ6k2jdSXW4Z1ZkWLt891d1Pl9y2cp8RIxqsybVXE6GQUCfbeELf +RrrFj+ydMZ9siL0Sfvk7tcSUcYtWWaFjVtGdLqLpDz+hlLxHLn/VNa1Rf5wFgr0e0vd SZmvvm3vlyER5BXbfNvUNVAkFPhOrVH90Dr2UbJqhZAFwAssSbTiHJLKXGfiiBJvL5D7 BobOerDyPjo79XEM9HZv2W/OTf+h9zZhQnu3UfauwpSkN4e7hpvADufZhHGi6XPNfWAx uY7A== X-Gm-Message-State: AOJu0YyEVMAc18NQPC81cgwpJYitFwy3AGEOnVRme1K6Ci3I1YVAkXEj eCaRn+vVrza7PI5b3yY2ukb6ShB+w4p7kU47xsHlRxs01utaX8wYXqNmQbEw1MVx+q9OGwN30l3 o X-Received: by 2002:a05:600c:1c9c:b0:40e:88be:ec58 with SMTP id k28-20020a05600c1c9c00b0040e88beec58mr1376079wms.31.1706712630796; Wed, 31 Jan 2024 06:50:30 -0800 (PST) Received: from raven.blarg.de (p200300dc6f2f5c00023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f2f:5c00:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id ch15-20020a5d5d0f000000b0033905a60689sm13850173wrb.45.2024.01.31.06.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 06:50:30 -0800 (PST) From: Max Kellermann <max.kellermann@ionos.com> To: linux-kernel@vger.kernel.org Cc: Max Kellermann <max.kellermann@ionos.com> Subject: [PATCH 18/28] blkdev.h: move blk_op_is_passthrough() to blk_types.h Date: Wed, 31 Jan 2024 15:49:58 +0100 Message-Id: <20240131145008.1345531-19-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131145008.1345531-1-max.kellermann@ionos.com> References: <20240131145008.1345531-1-max.kellermann@ionos.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789619641481292453 X-GMAIL-MSGID: 1789619641481292453 |
Series |
Fast kernel headers: reduce header dependencies
|
|
Commit Message
Max Kellermann
Jan. 31, 2024, 2:49 p.m. UTC
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 <max.kellermann@ionos.com>
---
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 d2c0934a7224..a5e41a54de18 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -259,12 +259,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