From patchwork Mon Oct 29 16:34:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10659609 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 9CF7A3E9D for ; Mon, 29 Oct 2018 16:35:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8170329C31 for ; Mon, 29 Oct 2018 16:35:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7577829C43; Mon, 29 Oct 2018 16:35:14 +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 2A0B729C31 for ; Mon, 29 Oct 2018 16:35:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727990AbeJ3BYd (ORCPT ); Mon, 29 Oct 2018 21:24:33 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:35233 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727970AbeJ3BYc (ORCPT ); Mon, 29 Oct 2018 21:24:32 -0400 Received: by mail-io1-f66.google.com with SMTP id 79-v6so5372340iou.2 for ; Mon, 29 Oct 2018 09:35:11 -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=0JuAX5hqVnrUxoFN3kofrxm2g6m+VAcWjnWRFptgEdo=; b=fON+tOEbdgBvm40SydqASWn1g8DdC5CdD5RxoqrC/ZnDEIJY3MxwXlEF63/R524WZo p/fhzVcaNPb3ep6FfDVTy3MU/QQy5T/sFiq+IRrNv2Jebo41xQKaQ3RiBU4IM7C01tkY 2I1NFS0NEoK+/IRsS8lqYIdnYE4rNO4nlH+AYAIfNZSa4el9kuY5WugsHUg/KUpCzwnK 52wrjP0JAeGelfpxR7dIuRghR4kRu8rijQ20Y5e1RKzh/AIC89dWcBLuHbqowP4pTjcF jJaNN8J3vZIqJcKO5qI53xBrxp/DqNjsA11OjQ5Ea16beh8smtqTOo1o44yBNYvoaVxF WD2A== 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=0JuAX5hqVnrUxoFN3kofrxm2g6m+VAcWjnWRFptgEdo=; b=H99jveszsnagX2Jv3rw15FkegvMbfeFFtYAMzuRb7hB3xBeAnIH7fOqEXNQuyQxAMv sx6fTzUHKwTBeyeXhG61HRnkqVf/ba7dIv5+mnzO5JKmSYRJy4tNR6b+ItcEohK1q6xk 5fu16OwVVQ/QFZDYcVrjxqKtwC5yZJYT/NWxYUS7a5wJH1ECiNvn9sGh36KohqX9MsM6 c89p7rtrqLH4dKi+DT9c9G+zcygcTTAI+vA/VRNpGKLz6PPuu7bE3Sdj5+0nt+bB9Ohg fnNLaCBIJZCEleJgFG8T/BczIU5POJH1dZuNQCiALKhyKAS0m402ajhx+Ws7EOwCiVJh Hmig== X-Gm-Message-State: AGRZ1gIe41eMqly2Qcw4wcdQ11alByg2f3sheyWeCJiJu7M2f35HgVTi ZxerZhJUiE7+uuqByINXRIxp8w== X-Google-Smtp-Source: AJdET5cKpkJbVTyY6y5oMLz0P1j7XGebHxkn7wK5PjpawXAhq+0TW+svPybg5RKXHWWzPXryjF+Amw== X-Received: by 2002:a6b:b417:: with SMTP id d23-v6mr8880450iof.227.1540830911291; Mon, 29 Oct 2018 09:35:11 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id n7-v6sm6464500itb.22.2018.10.29.09.35.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 09:35:10 -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 11/29] dasd: remove dead code Date: Mon, 29 Oct 2018 10:34:26 -0600 Message-Id: <20181029163444.9940-12-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029163444.9940-1-axboe@kernel.dk> References: <20181029163444.9940-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: Hannes Reinecke Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Signed-off-by: Jens Axboe --- 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,