From patchwork Thu Oct 25 21:10:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10656523 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 862571751 for ; Thu, 25 Oct 2018 21:11:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 799432C64C for ; Thu, 25 Oct 2018 21:11:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DF662C650; Thu, 25 Oct 2018 21:11:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22B9E2C648 for ; Thu, 25 Oct 2018 21:11:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727230AbeJZFpY (ORCPT ); Fri, 26 Oct 2018 01:45:24 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:43799 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726556AbeJZFpX (ORCPT ); Fri, 26 Oct 2018 01:45:23 -0400 Received: by mail-io1-f66.google.com with SMTP id y10-v6so6381047ioa.10 for ; Thu, 25 Oct 2018 14:11:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Kqg2zBmU+arjsQNXoEbMnbQ/71PicV1snOlRPbiNMVw=; b=f0SkS+6qzcLuPfY54hunnr9AVTdC92Ue9TSK4rvxFmJ2WQgdGm12wq9PZxkZGbwjx3 uPxGXSlNy8xXqT2tvqITY4Z9e7OuC0nF3m2j1yVW6bsSwJSRTG2aGsPHv+1fLBbW9g4y zhs7o/IznW4aCZOXCg7/wh566QpKbuPZBJt7YA+fO3buxdBz0txAXEmjL5HAE21O1ujp ZH15CP10JR3kr2oJxW4yvos9SLOWu8lAKYVrMpJZ8qh6wfO2FzneLubuhbBbogqrVwoB Pcw2Z7D3X1w/H1wFMQEP6dugPzUdfRpuqqJ4e5iJEHBGHsCmqj49iSfuylc6N9u1E2Y9 Va1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Kqg2zBmU+arjsQNXoEbMnbQ/71PicV1snOlRPbiNMVw=; b=IICBdDGD3IQsiaNCksFxyO0IdZNdHC+TlFnrfMgYTsd1ApEurKgmF9lgMJ53y9rXmP wmDNj5lzIpZ6OsrMwVA8YOLUmNffItxwHzBFBJ6XJdw1kxmOPW3bqhah1mjwe6cygymC 4BMgWtZOMM/Dqu7LPACcHVNofZMDrstYaYcNFS6dsacF9wtZwCgstc3YQFCwpGrwmY9+ H1yg+lyNcMsBAfjQ6usLiZLOp0FOJXMuA1dbenf/Eog1UbVIBwDzDIRjeJ96PU0AXsG1 qY5X1PgxfYjgn6gou6D0OF4XoicXIBm7Yu8zgkdBqm5tumaXs/N0tRrGHAQCxlspVpC1 GDOw== X-Gm-Message-State: AGRZ1gJYSaLk0qeSgMDdqNfr94sFk7GGzSA+XGcYlKJZFvmZW8goCeBz UYGPFd5AzzUkONsGRW1bRQKb2BGUFGeu2g== X-Google-Smtp-Source: AJdET5dkcKVVc3+QqOCCZImlpgBbz+l3tXRFPh613rEzyxjuy9PFx3QPDSjCjr05rjyhPQEjd8maWg== X-Received: by 2002:a6b:b30b:: with SMTP id c11-v6mr488287iof.275.1540501863918; Thu, 25 Oct 2018 14:11:03 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id e65-v6sm3446375ioa.76.2018.10.25.14.11.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 14:11:02 -0700 (PDT) From: Jens Axboe To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 10/28] dasd: remove dead code Date: Thu, 25 Oct 2018 15:10:21 -0600 Message-Id: <20181025211039.11559-11-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025211039.11559-1-axboe@kernel.dk> References: <20181025211039.11559-1-axboe@kernel.dk> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since e443343e509a we haven't had a request_fn attached to this driver, hence any code inside an if (q->request_fn) is unreachable. Fixes: e443343e509a ("s390/dasd: blk-mq conversion") [sth: Keep and fix the dasd_info->chanq_len counter.] Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Signed-off-by: Jens Axboe Reviewed-by: Hannes Reinecke --- drivers/s390/block/dasd_ioctl.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 2016e0ed5865..8e26001dc11c 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c @@ -412,6 +412,7 @@ static int dasd_ioctl_information(struct dasd_block *block, struct ccw_dev_id dev_id; struct dasd_device *base; struct ccw_device *cdev; + struct list_head *l; unsigned long flags; int rc; @@ -462,23 +463,10 @@ static int dasd_ioctl_information(struct dasd_block *block, memcpy(dasd_info->type, base->discipline->name, 4); - if (block->request_queue->request_fn) { - struct list_head *l; -#ifdef DASD_EXTENDED_PROFILING - { - struct list_head *l; - spin_lock_irqsave(&block->lock, flags); - list_for_each(l, &block->request_queue->queue_head) - dasd_info->req_queue_len++; - spin_unlock_irqrestore(&block->lock, flags); - } -#endif /* DASD_EXTENDED_PROFILING */ - spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags); - list_for_each(l, &base->ccw_queue) - dasd_info->chanq_len++; - spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), - flags); - } + spin_lock_irqsave(&block->queue_lock, flags); + list_for_each(l, &base->ccw_queue) + dasd_info->chanq_len++; + spin_unlock_irqrestore(&block->queue_lock, flags); rc = 0; if (copy_to_user(argp, dasd_info,