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: 990388 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="fON+tOEb"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42kKvj5v7Xz9s3l for ; Tue, 30 Oct 2018 03:35:13 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727991AbeJ3BYd (ORCPT ); Mon, 29 Oct 2018 21:24:33 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:40750 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727972AbeJ3BYc (ORCPT ); Mon, 29 Oct 2018 21:24:32 -0400 Received: by mail-io1-f67.google.com with SMTP id a23-v6so5372845iod.7 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=fIEEyleaMVYJIDHFuKDLNAoGXr3KbwRlskmfCJzLEc9ZzMrY6wxv3jAeurz2fkgXoR WY9DU7GOMYhSNsmFHLOaq+PkjMcpAxK5ONDJ4eCIIHhTb9hVPDZ2lV3QEhgImsvgFmRS d6+Qhc0qhdbjxrp5oCqgRswd9y7IQwLIJ0hukBwxe8gLowhnKbTuu+OyuS7UyRoWzn/4 azYWupt9dtNdX2Sd1Ih8RabWrL7vAGsg3itJwtbVDrl5QEPmZ7mQo35+tWHfIlUpQuBd A38H9qAFRXO0VU1z0j9FSYsYWWNSYbn7q17NHiiYpGYFrWicVw0PRBB4GnRq/WUUukAv B0kA== X-Gm-Message-State: AGRZ1gILmyRl3UEYrylvdo0BRsdiHjsWUfCFgoxDy0vmSfReb9e8Wz4I zlXG6GAkGrxKIITPZqPHsgml/w== 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-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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,