Message ID | 20240211231518.349442-19-max.kellermann@ionos.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-60999-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp2142462dyd; Sun, 11 Feb 2024 15:19:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3qfnu1NmEzWyji7DuV6Ya0oHHsm2O2pCrOo9icRwFW/6WQbjecaHu6BRy2DSqklytonM8 X-Received: by 2002:a05:6808:448c:b0:3c0:320c:8c3 with SMTP id eq12-20020a056808448c00b003c0320c08c3mr6571518oib.32.1707693545976; Sun, 11 Feb 2024 15:19:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707693545; cv=pass; d=google.com; s=arc-20160816; b=Vh9Fozb4Ba2xqem9Pvn64h7ddAMcNapOqlqBw0x9BWzwTJEoyJMsUQ8Kj9aQsJVWhk stVzVqtXk6P3FQ3LXp8TIh7zIwH+TV0Hlf3HQUnuOfRjt6lOWlRDgd9S/p1BPJqyU11Z LScmO7n1MbOiKwAzBlIG08fgdwciy1m2q/L/VNe3gaCZBsYlNURHD7DIBt5Ip7uiDGko 8GqL5rYBMfyHh6uUPbDORewnemuZxcvAiruLFk75LQ8Lv0sMe1YqqYBxLwV6Hnly4iWT OrhvSscexwzBSdP08YN6RDCA/YZZY8Yqw+ow65sq49QDliEx19iob0DQdMmwScKcwOX/ Wfkw== 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=zwBjMRo1iMumZIXz1B5DykRF7c4hR/as9IbgwMpkv/U=; b=A1LTr27GMDNasz9cSQY71Q5CI+OxuXKU0PkT93bbv1PPSj3LIFU30+BAaENgxY86x6 6Dc1MLdiCWg2w1BZxvinvnGH+GWemgyyTq2F62dNb2BnsLVTf7EQ7Rj+q0N4pu1dbW8y +96rn9yxhnytvT2ZW37ja4iXc4pg5cfr1munTCl51fckScgUSGJYkwLg1o5xc+SNRENd CUm37jVAbuT2pIW6LgfWNo8rY/qjTz0EeliV2oCbIyZuG0mTyncmtHT7zjkDDmVu8ZDf 9IHkKRTa9TXpjb9zDqSq3daD7rKzX1KG2uoDSuDco7KhVbqO8gAjRYaBka1toCv6HigR fyIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b="G1/AvoMi"; 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-60999-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60999-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com X-Forwarded-Encrypted: i=2; AJvYcCURRj3I/963ANyHINHZewCTvWOTqTQVVtTACNzX0JDZBl54tycFizHRvtNQck3D4meN6u0FeaA4OimcPJsTF+XTkLPL8w== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l24-20020a05620a211800b00785b03a74e1si4572485qkl.80.2024.02.11.15.19.05 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 15:19:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60999-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b="G1/AvoMi"; 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-60999-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60999-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BEA461C20B67 for <ouuuleilei@gmail.com>; Sun, 11 Feb 2024 23:19:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62641383BC; Sun, 11 Feb 2024 23:16:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="G1/AvoMi" Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 49B2318032 for <linux-kernel@vger.kernel.org>; Sun, 11 Feb 2024 23:15:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707693354; cv=none; b=gvoIEodvqYVQak33rzNNdwiUbg96/kRHrHF3KX72oJqVYT/0ePrqqZfOxUShTpM4x7P6AFIIJlSpHij+YsMMFOXh4gpAD4aO8tijJvz/JHals0lBkuWwR3IMfanO0yokG6aUDMo5ubjvmOOS0Ce+daXihFTCGDgqhYtF5A4sJXA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707693354; c=relaxed/simple; bh=3EMwRWQVmXFpMULqT0KRcNauX3dUmEoNi+TxEAuDB/E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NrHfcXkuQDV9z/ieHcsDt6fe/mwumxV3fdS2V56exDgMG6EFEXm8vTuBFVsvRGaOrnKNoAxNpmDoMrUVCHVB/rXhxqIObL43Kfwgc2OcpqDEYNLbgwKeHRxSJShOG41A+amik8z6ZcLhHewhJFaEqqjmzDHqVQ4c8wxpbnH11k0= 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=G1/AvoMi; arc=none smtp.client-ip=209.85.208.45 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-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-558f523c072so4017781a12.2 for <linux-kernel@vger.kernel.org>; Sun, 11 Feb 2024 15:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1707693350; x=1708298150; 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=G1/AvoMiYFxT5kzuRBYAAg8YtecErA2NtNeY91K7BP9rFfnKvGNfFUWgPj4SQpLX01 w09KGgZpCfVCqC3xqNfD1GZmNw0jtqSqof6IxqPLZ04ggDNtZ8k3S+KVRegt8y0rXTfc 52D/LrPfYRnufK2SGZOoMLuMI/Bl3G2LXNYE35A1Gr5jK+ULtG27JpG0HyiCKck40XU6 b3RP2cDkzIJpE4/R8KgB3f3HPyYj4VwftTvQPNvKQpdILRFlA02cixPTkBd+YvxpCGLO iFBej1wpLl0nGG3KFpSv2hl4+rs0VKJVc0hnPpv6A4Gmbd2pt6Tj3YgH3S9qSZPIuQaZ ETuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707693350; x=1708298150; 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=eSwoLVumD+XhhAeEazGMG9isK9IHlRdlE/0f6VuDsIgCBQhiPbyi0o+CkMG2hl0ipc Z+o89DZYPuP9C1dQE5XJxbRGs9pYUZL6WldY0DvXk88aOM2+3VbVQ/ZA6u30CDJ7HsJu U6pEAarV/+iU+ERFx1dkd6zc1TlFElQClBO6HQRo7l0Xw+hDLMwbquXKQ2DFMu7r6Ptg 43+EWOzTKMFXBIXPY/whL2u2g745WFqdCMLU2YOcvha2m42lj37GtQjCYP+xyQOTYo0s QyRLsnxMFa+B314c0kt7UGM77btz3tUUS0lhOqaq45SfXo4xzsRE+t1wAqI/BB6G4qZf aNIw== X-Gm-Message-State: AOJu0YziUhTaFQpdOUvItOXaOYW3r1D4sIv/ZLYibm8VmSjFIZzq247s f9wx1Sto7tCgFtg7yPqD3rN3I2Ed1hth1r22eRG0f/HQxkjH4hnO01DVjrcCJBIhyDa+JHrN5x8 C X-Received: by 2002:aa7:d6d7:0:b0:55f:4464:d044 with SMTP id x23-20020aa7d6d7000000b0055f4464d044mr4094729edr.6.1707693350163; Sun, 11 Feb 2024 15:15:50 -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 et13-20020a056402378d00b0055d19c9daf2sm2170180edb.15.2024.02.11.15.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 15:15:48 -0800 (PST) From: Max Kellermann <max.kellermann@ionos.com> To: linux-kernel@vger.kernel.org Cc: Max Kellermann <max.kellermann@ionos.com> Subject: [PATCH v4 18/35] blkdev.h: move blk_op_is_passthrough() to blk_types.h Date: Mon, 12 Feb 2024 00:15:01 +0100 Message-Id: <20240211231518.349442-19-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240211231518.349442-1-max.kellermann@ionos.com> References: <20240211231518.349442-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: 1790646467214225806 X-GMAIL-MSGID: 1790646467214225806 |
Series |
Fast kernel headers: reduce header dependencies
|
|
Commit Message
Max Kellermann
Feb. 11, 2024, 11:15 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 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