Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp258632pxa; Thu, 27 Aug 2020 01:09:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg0k97pNetISIjWKemc5oNscMbBliuzWTTDNxm92bqu5ccO6p2s0AW5hvIVkAK58FFMiSP X-Received: by 2002:a17:906:9382:: with SMTP id l2mr19203007ejx.513.1598515768949; Thu, 27 Aug 2020 01:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598515768; cv=none; d=google.com; s=arc-20160816; b=IC1+xyNoZ5xibx5qN0cj/IjxHtpImV+bkz2YkGPrKGG9eGFuSeKHybfHDhAC0zXCPF g7LtlD/MYZVlxndoY6zBMnuZx+6FHPqJo31pNGvVk5LoXowhjZa6ZJHoX+SfmdBE0737 ZDj3csCo088gsxoSLMfgozZOTsHWPI0eCUuwAoGfkQZg5bwvHHbBuj33dShbLBj5Q6bQ GDCJ6PQIici7F+90Y+JHuuyp6+fjupN5WpdPtxbWzulPjnq1RtbGgB3EKN4e7sM3wJuh R1M81nz5by5Kvi+fB6L+/cBugnG+BwlUtn35Rc2BJ6sKhGkFz4yWpEzAKeNjrSZdeaJV Fx1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=9M0ocZ3baadyw11j+qC2LnVbiUryR+aUlR2nOFARDeM=; b=qEuZZz3e82ZFdVYU8vGte21L0izpnCG3cmpnSfR1sBKpCDkbhhX7vzBYZzZRE0SeDc Q6k7k5Uqr1yvXNBKXlXCeVre4Q2LwY5GTVGjPBMg42IxomPto02Wi7CU8djV83JDkigx vlZGB3RLZ12snHjys99FQriqXeeLHb8ioAd/csQCkvHWhoLHKBqCMb6k4AFb+Nye8jOp iMU+JkM30DwHKt0pPMJBkWPIY1wNfd2VqdEjlr9XaL0xSz1kRsZiXIuqyxrd1geUt0oC ZPiNlp3qNnih+QMmbg6erpJrtR/eshJrvCEdLW0KLx19xNBWvjv4i0PeiiCcusUrofYW ac3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si984542ejl.476.2020.08.27.01.09.05; Thu, 27 Aug 2020 01:09:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727814AbgH0II2 (ORCPT + 99 others); Thu, 27 Aug 2020 04:08:28 -0400 Received: from smtp.h3c.com ([60.191.123.56]:54406 "EHLO h3cspam01-ex.h3c.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726851AbgH0II0 (ORCPT ); Thu, 27 Aug 2020 04:08:26 -0400 Received: from h3cspam01-ex.h3c.com (localhost [127.0.0.2] (may be forged)) by h3cspam01-ex.h3c.com with ESMTP id 07R6fTEB043927; Thu, 27 Aug 2020 14:41:29 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from DAG2EX03-BASE.srv.huawei-3com.com ([10.8.0.66]) by h3cspam01-ex.h3c.com with ESMTPS id 07R6f3mf042483 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 27 Aug 2020 14:41:03 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from localhost.localdomain (10.99.212.201) by DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 27 Aug 2020 14:41:05 +0800 From: Xianting Tian To: CC: , , Xianting Tian Subject: [PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag Date: Thu, 27 Aug 2020 14:34:17 +0800 Message-ID: <20200827063417.35851-1-tian.xianting@h3c.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.99.212.201] X-ClientProxiedBy: BJSMTP01-EX.srv.huawei-3com.com (10.63.20.132) To DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) X-DNSRBL: X-MAIL: h3cspam01-ex.h3c.com 07R6f3mf042483 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace various magic -1 constants for tags with BLK_MQ_NO_TAG. Signed-off-by: Xianting Tian --- block/blk-core.c | 4 ++-- block/blk-mq-sched.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index d9d632639..c7eaf7504 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -116,8 +116,8 @@ void blk_rq_init(struct request_queue *q, struct request *rq) rq->__sector = (sector_t) -1; INIT_HLIST_NODE(&rq->hash); RB_CLEAR_NODE(&rq->rb_node); - rq->tag = -1; - rq->internal_tag = -1; + rq->tag = BLK_MQ_NO_TAG; + rq->internal_tag = BLK_MQ_NO_TAG; rq->start_time_ns = ktime_get_ns(); rq->part = NULL; refcount_set(&rq->ref, 1); diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index a19cdf159..439481f59 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -522,7 +522,7 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head, goto run; } - WARN_ON(e && (rq->tag != -1)); + WARN_ON(e && (rq->tag != BLK_MQ_NO_TAG)); if (blk_mq_sched_bypass_insert(hctx, !!e, rq)) { /* -- 2.17.1