Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2171473rdb; Sun, 11 Feb 2024 15:18:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIxqcHz8ee3WYRxfXHUxkV1+bj6Iz+iegzzB7Y5fdQo6kPfExZ6zYIcwGmIIc0DxS6YoN5 X-Received: by 2002:a05:6871:580b:b0:210:cd75:8e34 with SMTP id oj11-20020a056871580b00b00210cd758e34mr6613929oac.17.1707693484299; Sun, 11 Feb 2024 15:18:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707693484; cv=pass; d=google.com; s=arc-20160816; b=E5oPuQfqW+tJSH9+PQEO+LgeF7papIntifYs46zjBdFMGHxCcmNHNI1J/YX7mm3/6k i972jTW9BNGdtpLhxo1HFPr+VAV8+zLcsmTrXnaoa5A/nmEH3IeJbVL0i3SpjAjUP4eS Bd5BHbjCElOHJb35bd27MTLZAYeqiyvjgVpRtEx15GgedFAt3iSPxP0TtYHNMwfT7JAy nWwElndV4lFljgX5gtH8OT8AOrmP4aKJVAtTaSqLZz4c9Fd2e02PYJUFKhDCp2fvRcLL 2pS3mlj768ZF7IZgDy7hj7bjtKbSpg17TKfQhJDI7SYtMYXoQ2891+ZO0/hpA07e/gpm /D0g== 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=lUreXpkRM/uEEfXImujL3vc6nQltmr8WlBThd5ZzaTQ=; b=tdGC1R5HXw1aIX/DIfeTOCITbnxTx1n3hdZN/C5o+0lnvIbIRQuuQJVIMnZcg2orEE vajfH3ZsqR/6RYcR5c5IhMddrRpWgd4hvY/J4n6RPzTeoyz7UsHko0sidfpeJGnrFWwz aEep6ebssqe9ILP9M8ylqdftd91sF69I4hRd8jFAM496GbD7aQiIEv5cQazZs29wN5Re FJkZ7UemeFGGSl1xVMZB5JANmFZSQGOYzMHSFL920KhbUvWRMIbKSlHULrAS8lc/0Unz +wJQYQKryuMlW+fo08Rr66JZ6v1Zzgb5UCL4pKNUPCFTwK4T9nkV7jM+3UcpJi4UTaP6 uBiw==; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60999-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; AJvYcCX/0SN3eC5Lk6YMS9vAUiH8QSWQmc+EXTvf0FNj/wjIswz8BJqDZA0bHNTKY+V+RbK4nh8FZRaputn48ChWUl+StHwXtcL38tQkSre7Wg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fd36-20020a056a002ea400b006e06e699385si4030293pfb.350.2024.02.11.15.18.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 15:18:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60999-linux.lists.archive=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="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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60999-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E3679282416 for ; Sun, 11 Feb 2024 23:18:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1B422B9DB; Sun, 11 Feb 2024 23:16:01 +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 ; 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 ; 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 To: linux-kernel@vger.kernel.org Cc: Max Kellermann 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: 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