Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4637993ybg; Tue, 29 Oct 2019 10:06:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRrww2ftrZ2tUKh8B3YkC6wyief4rgK6Tz1TK1/iWE0zP2FNlACLZZbhzo/T5dmzo1tcdm X-Received: by 2002:a17:906:218a:: with SMTP id 10mr4397503eju.38.1572368813650; Tue, 29 Oct 2019 10:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572368813; cv=none; d=google.com; s=arc-20160816; b=ffJGHowV2dAGgeVtymybAvvdhjGc/gGihe2oyPdvZq7RIoPHZBN5t4ZzLFqt6gcd6w XqBoY8yZkUYnS1vNlVOpSfcEeM333W3Hc8GhpZzZcpTkfjfYSzCYajtyZvmnnX+Fn37u RK66RlMg0jI1WIRNzjF+R9KwIbQip89L920/uNta26O+Gv9xHuwJRxYAjGqi90EsUE0X WiafQVkRrMeyLUdbBMvRgwE/3UnhEf6PCnVv5NT1ELsZYpfXmrq1779IY8YRrsqQiULR 0MNrvmPdarqbCos39ePhYfqTrjEC1kNRMslvzLP2J6+17OWSQiKKmqrLYD1G/CWvPzoT XFYQ== 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 v26si10993494edd.364.2019.10.29.10.06.26; Tue, 29 Oct 2019 10:06:53 -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 S2390692AbfJ2RC6 (ORCPT + 99 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 Content-Type: text/plain 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 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); -- 2.17.1