From patchwork Tue Oct 29 16:59:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 178054 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp72899ill; Tue, 29 Oct 2019 10:03:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmw/+5RYzuTvf3wQFI5PRx9pyqDwuGy1+2859OQ7JoFuqrVc+o0fVUM/6M7WmIoDF/GSye X-Received: by 2002:a50:f096:: with SMTP id v22mr27669408edl.149.1572368582452; Tue, 29 Oct 2019 10:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572368582; cv=none; d=google.com; s=arc-20160816; b=eu2nrQGs8H7NuT6Nr6aoCEflu2rnbONZw8cIzF+K2kvgcFFbH9cL8lcshMV0QIvtHK gNJNdisAzqQ2HvMAJkH7iFXP9EHdMuhrh0IMXKJ35REd7uJaHNtb/v+PYz+6KqPCPLlF hFRxiLOPw9DrDhtTBe/fJPo4buzDFVKQ36d/vnS7IVgkCXuYmdObhhs5S6NnaNKM+hUZ wzwYKxIirOuvvA6fsCL2CmWW1h52xI5Aa6wapaNpUrdUJel6JTt4K0D5Fa/hf6nJc2Av qtFt5S6r4wRLUbxCj/MBZ6nVSSR3pIDwcj4NcL0pISlcsLN99jC2OG0Gn+wpLh85M3Pw Fw1g== 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=X55peDFXdZuaMUfx/o4ohs9nVBke3yLq42BowUGzfj0=; b=WCvSGt1WZRWV2fPDhPT2egjuovivJXX8hoo1OsL/BmPzNdAqWH+Jx+/X3eB4FBKMhQ Q5HkRvj22NxvMS6MkdoWNtUXvaV7VJIDqJzl5BxN6/BM8IOWplPE0DaVapsfM/E/AyvC pqti8zekctg1cJyz0DxRNa5TMAbEmX48JrSxAmHBh3Wm+rT3MBkoUSBxkGFDM3KgCKDF +kgQJ1UruqbFk9EZpsQmMfkoanj8X+0AktZBfvfSMHQlAlXuo9jlf+7RJ3hRqn22BOJA sV8ANcUWV/t33AWB3D5RpivnjeJgOeftYpGfAbaUef4zQiW+L8k24veAS6uBqGdPkx+r 4Pgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hb23si8534786ejb.377.2019.10.29.10.03.02; Tue, 29 Oct 2019 10:03:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390704AbfJ2RC6 (ORCPT + 26 others); Tue, 29 Oct 2019 13:02:58 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5220 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727279AbfJ2RC6 (ORCPT ); Tue, 29 Oct 2019 13:02:58 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A20CA818D8ED80AEB7C5; Wed, 30 Oct 2019 01:02:53 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Wed, 30 Oct 2019 01:02:43 +0800 From: John Garry To: CC: , , John Garry Subject: [PATCH] blk-mq: Make blk_mq_run_hw_queue() return void Date: Wed, 30 Oct 2019 00:59:30 +0800 Message-ID: <1572368370-139412-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 97889f9ac24f ("blk-mq: remove synchronize_rcu() from blk_mq_del_queue_tag_set()"), the return value of blk_mq_run_hw_queue() is never checked, so make it return void, which very marginally simplifies the code. Signed-off-by: John Garry -- 2.17.1 Reviewed-by: Bob Liu diff --git a/block/blk-mq.c b/block/blk-mq.c index ec791156e9cc..8daa9740929a 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1486,7 +1486,7 @@ void blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs) } EXPORT_SYMBOL(blk_mq_delay_run_hw_queue); -bool blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async) +void blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async) { int srcu_idx; bool need_run; @@ -1504,12 +1504,8 @@ bool blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async) blk_mq_hctx_has_pending(hctx); hctx_unlock(hctx, srcu_idx); - if (need_run) { + if (need_run) __blk_mq_delay_run_hw_queue(hctx, async, 0); - return true; - } - - return false; } EXPORT_SYMBOL(blk_mq_run_hw_queue); diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 0bf056de5cc3..c963038dfb92 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -324,7 +324,7 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async); void blk_mq_quiesce_queue(struct request_queue *q); void blk_mq_unquiesce_queue(struct request_queue *q); void blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); -bool blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async); +void blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async); void blk_mq_run_hw_queues(struct request_queue *q, bool async); void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset, busy_tag_iter_fn *fn, void *priv);