From patchwork Wed Oct 31 17:59:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10663063 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 60E0B3CF1 for ; Wed, 31 Oct 2018 17:59:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53E982B4DC for ; Wed, 31 Oct 2018 17:59:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 489D52B4E0; Wed, 31 Oct 2018 17:59:51 +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 D5DBE2B4DD for ; Wed, 31 Oct 2018 17:59:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730175AbeKAC6x (ORCPT ); Wed, 31 Oct 2018 22:58:53 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:55689 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730036AbeKAC6x (ORCPT ); Wed, 31 Oct 2018 22:58:53 -0400 Received: by mail-it1-f194.google.com with SMTP id e17so17942313itk.5 for ; Wed, 31 Oct 2018 10:59:48 -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=ekgdwsyL/1q1OAmOF5n6AKxzU/3ITAqfHzp4xX+ENxSqohmd2twy1Hqiq16+ukYCdG SpohaE8q5i1vZvX0gM9n6CS0QXfuORX2EMKmEmjbHG0gzqEzMn8lXAC8tNJP/Rn1C54q fveTFnWi9LQ7MdTzS8s6oZl3GFRSoSXxTfuBGsIM9pIblZ2ZcxBO8ThHB+4askZXpQDl I5hp0NKnh3dYfYP1Fcp9N2sMm0VfgiwAyCopbgMwZGCAsZH8VgD/JWnxP6EKYve+hNlb 2opdVVupGN8I5f/5cVNnqzW6JHTD/ZmTxC9f15vDsBEpooJnn63IZYR+QHd5F32+qhCm tzdw== 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=aXZXb0QsWOm/26JT2/E7//jB6IPY8hu+dJd7DChEezyKE6C0xc/uTlWi6bNVI+h6E5 0jbe+wDuB1i7b22Lo2n8yAaowtWyHGmcpdpx0Yf7m+F/r/4AOn1XSMm2TnacuubGqn8+ yTZDTGqYt8ddaBiI/rndK7zZ/SXRMNjx0SiDML7TnYBw2MVYDw5RhxKpHtz2CGP4oynJ 4N7jv1HKtNHDwWkb9421TROVPLbWqX0vtHgNcBiCpAz2OI4oloiSIu2TVIbTjvm5zK5u YbLEbwIX9it2ZdBf9wI0YGAlEgri9J2dzopwMvzo/ULAzhFWA+bTQ2WHDGoj7+bLGeBs ywDg== X-Gm-Message-State: AGRZ1gIndbDv/CVTyhOX55kx6PrT1+r2HUlWFHaV8wkb7FmlhF3tHRHr Cnu6nOT/oxWfY2EXM5cMHiGAIg== X-Google-Smtp-Source: AJdET5c7fNxX91KkQffOgxRQ7rj67cJBhJ5eSH7MDCnnRHJuEa79PYr+CDdagcx8rEfVD3tTjrC+ZQ== X-Received: by 2002:a24:7012:: with SMTP id f18-v6mr2804591itc.87.1541008788526; Wed, 31 Oct 2018 10:59:48 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id 197-v6sm10982947iou.87.2018.10.31.10.59.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 10:59:47 -0700 (PDT) From: Jens Axboe To: linux-block@vger.kernel.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 11/30] dasd: remove dead code Date: Wed, 31 Oct 2018 11:59:03 -0600 Message-Id: <20181031175922.8849-12-axboe@kernel.dk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031175922.8849-1-axboe@kernel.dk> References: <20181031175922.8849-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,