From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 368E8C433B4 for ; Wed, 12 May 2021 13:17:42 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C9595613D6 for ; Wed, 12 May 2021 13:17:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9595613D6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Xuz1qjEypYIM4kcxlbPOP4TFH6I7yH06y21Y0nykWlI=; b=WXJCH2ibWQbMjJZ79B4OyOwK2 0Dg/3mVSP9la94n1w9YhhYYIqu49gprz2xdLf02avgFJYXCrk9XI95bcU0yyCkABeA7ef9+VfHq64 uHNgVF4FCf9VpqsQ83eosj/Zk1t1VLlic8lkMxLTyz5E/jH+ifiNgCu7t9NDLbLpSDG+SWiBCvA/6 1TX0N7ONKpAvRihADMm7+3dRki+KjZCu6CKsjtn6RlrrOuTJ9s0X/IXQadnYd5Q0jDuLHz1lC3E2i 4SzTJ14uDIq+vTjtXrP4KL8d6LDWjMB0fKlV9Y5qXQHlb3en55oLSbrAc81UIwaRaXMN+7bsk4ZD1 +ZVQBwqVg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgok4-002rqS-DC; Wed, 12 May 2021 13:17:36 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgoie-002rc7-D0 for linux-nvme@desiato.infradead.org; Wed, 12 May 2021 13:16:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=dEGRgMGQQwP4FfVOy4dsOUeKKeFm50mq3cJYorsfvYg=; b=SfCyJDBMSucMIZ/bNm1qiN43qX SdYZFIkPhjdKbv1a+lnn7Srgw8uVG0c25s/6i7rFNHtASbgaOdh7VjDStCWiqHpbchidU6bkWKint CGHYWe0Km3/b1pZMcdJ5cPa6uKCZW89oQBsWvefZg4YdX+co/BGHvpedmSRQuGJvSmVWB9iXyO40K MUYQ8hcXS30xxdIEGXG7Pnws7ZqyQ/yjT1O8zv4/J2T0P4AbE8wXqYmDnHGVigdIrXhZ5+RfOrUpX S3Fz4JgB1PSE/W0QCgPKNBJPl5Y+bw8Nn7hQpT1k0HM4IcN7cbej0/4akoscptE61ijuvboijvj4m bui8KETA==; Received: from [2001:4bb8:198:fbc8:1036:7ab9:f97a:adbc] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lgoic-00AO3U-GD; Wed, 12 May 2021 13:16:07 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Jeffle Xu , Ming Lei , Damien Le Moal , Keith Busch , Sagi Grimberg , "Wunderlich, Mark" , "Vasudevan, Anil" , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nvme@lists.infradead.org Subject: [PATCH 07/15] blk-mq: remove blk_qc_t_valid Date: Wed, 12 May 2021 15:15:37 +0200 Message-Id: <20210512131545.495160-8-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210512131545.495160-1-hch@lst.de> References: <20210512131545.495160-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org Move the trivial check into the only caller. Signed-off-by: Christoph Hellwig --- block/blk-mq.c | 2 +- include/linux/blk_types.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 919712e2b34c..ac0b517c5503 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -3919,7 +3919,7 @@ static int blk_mq_poll_classic(struct request_queue *q, blk_qc_t cookie, */ int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin) { - if (!blk_qc_t_valid(cookie) || + if (cookie == BLK_QC_T_NONE || !test_bit(QUEUE_FLAG_POLL, &q->queue_flags)) return 0; diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 4c28ab22f93d..d0cf835d3b50 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -510,11 +510,6 @@ typedef unsigned int blk_qc_t; #define BLK_QC_T_SHIFT 16 #define BLK_QC_T_INTERNAL (1U << 31) -static inline bool blk_qc_t_valid(blk_qc_t cookie) -{ - return cookie != BLK_QC_T_NONE; -} - struct blk_rq_stat { u64 mean; u64 min; -- 2.30.2 _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme