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: 10656519 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 2028114DE 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 1451B2C650 for ; Thu, 25 Oct 2018 21:11:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08A802C654; 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=ham 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 B40C12C648 for ; Thu, 25 Oct 2018 21:11:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726793AbeJZFpX (ORCPT ); Fri, 26 Oct 2018 01:45:23 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:44705 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726829AbeJZFpW (ORCPT ); Fri, 26 Oct 2018 01:45:22 -0400 Received: by mail-io1-f68.google.com with SMTP id c6-v6so5696781iob.11 for ; Thu, 25 Oct 2018 14:11:04 -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=QAOWO4iWjmp9+RTt/HEWn6dbmQvE8+Z7WKxUcPxxN6iuXAoFthUmf4blWdPxMIQpmA pRFT3ScnCkF4DtAT3RqVrHelMLJI3x6sjv+K+32FAtO3aJRpyyLAt4B0qUlTMu60ZNYc 4CHx2JgDG62mkd/O7BRD0mlKGqqFvLvlUNb233HMPhz2zkxiPoPE4LoJT6x8/DWSvouM NBaIc65w9+5/HF1zOTyAnIk8ynsFuBz2yoaEuVV0RkIz/oyad7MPKZXjAaDSKp3yIY0V vQ3SRx60ieKdZsS0FOF+waO0Xbrv5d3FAOuxZcZ3FuJdI+sSSke+FBOJFlzQPG+OFr2M R5Xw== X-Gm-Message-State: AGRZ1gKxtLOSPDb7dScqpK6/ztoKdXI2ukwKejOp9uHksur56Ct/FJ3e ITO36zGcsPLtwlW9tCT+QFk+Rw== 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-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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,