Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp231791pxa; Fri, 21 Aug 2020 06:02:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXzEl78tfc4zpWgiFG2brR2FA+4iEmES1rNDuzAvulYCdnJQuuhWh60GWtdLPw5gmZ7Ebf X-Received: by 2002:a17:906:1cd3:: with SMTP id i19mr2686252ejh.552.1598014946953; Fri, 21 Aug 2020 06:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598014946; cv=none; d=google.com; s=arc-20160816; b=mg3H/EVOp0F/CkqWYD2rkY5Iijk3/ybre2CpeEfuQM5iUAQzrsMXVS+/qF93ekH96t 5c4VQtLslqAEKDyhH2RdYvRa1lCWsLFqA1kHd9Zarz9avZMhggIuZVCpjqVmePiCqNCk p5DBGBkINSjP5B//BdeSuAto9lTjfziu9PojR0x6nWIj7CNw9GnGvHukePjbuw/7GA/d PsacC1N5DQKhP7PMRo44b2x3Hp6ostyyPEOfMnvH1VT52YFpyUAb44CHu6dWLxqZ9kw4 B93KIZILo64oSu7sB0kojVAI32E1bja5eb6l8emB9D/gaKxRTaxMgMcWrFYZL9LGr+MW yX8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:wdcironportexception :ironport-sdr:ironport-sdr:ironport-sdr:dkim-signature; bh=LX5ilookIRYiiZLvUg97VHfuDQhs2YXnygegrB6KjO0=; b=uXJk57b2bsV2avPegiwOHBT1K9aoO9z1Fl+ow46UowD7Cv2zJ4CY2Ct/4ZbKogkovV wqXA4yNUyD6aGIe+cc3kTqfXPr/Zu7YiWEJle0C5rB+UIkpktl0kaBBYvRbvz4+TbJ4E am7w8MWPQIuoEFo5kj8hYmYk2HD9wPrp3JuRDEojW/AT5FC4DjfOkc2ahCylZeHjqDSq bWUioTgRdlkgcqOHH/5D9ASdpSznyxVeND3qsffwwH8Z8nQ1UnWO2gDnLFrC1QcfmSKy /IYqTxa7uTVRiknQt1biqmagyOjoBcoV4/DzE4eeeGejgUEZQP6eF5Nn/LQ2SCUF6ceo SFUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=SKFzwkSj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si1302247ejp.500.2020.08.21.06.02.03; Fri, 21 Aug 2020 06:02:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=SKFzwkSj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728648AbgHUNA2 (ORCPT + 99 others); Fri, 21 Aug 2020 09:00:28 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:55563 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727888AbgHUNAZ (ORCPT ); Fri, 21 Aug 2020 09:00:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1598014824; x=1629550824; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WAKxIe2g/DU6K/n6Phi6bqK/kf/xMjB7uoOuFEtpdwc=; b=SKFzwkSjBLIIrcyf0ilRgMw8nlJauOJ5kCO5IsKIkyXPCQtJDcLQXjAt AikUMO19AOJafQHF2WFUv+djXQArhaUkb2IK2Ai6LZnm68Y5O1ju38xJM NXjajp9qGac9QDY7ulHzYBk0hv+IiCO2vmYQB0Oz1nFcnjNycdO0xf2al 0v0BtNtnAYCcdPicfBXuHNUHq8lv3XmsZG4NUQKau90p7w/VczRavUqX6 EvGShJQqwki5wRkuhMUjGs76Nsp2+3HwJqHo3fWthuKFwPhD1gNEyOHjo qowKLYz7Y8Kdnx1v+BY6PgU9ONRaEE6BOZc/24BF9+K0qhYTVmx/QsOcP A==; IronPort-SDR: O52R0U1qsEFlfYvXHCenq2O+0JuBwz3YvGpy+VNSpdibe6ICpuwviEJlv5DJLeqd759KjRZnv7 Ebaq7hN/uhVaLHXwtING03sk1KgTnXedWLihkLYBCEW1u+eB8IaGy1HRNLvqm7Aqb+BWAuK4Dd YzlUmKUQVUnUKX/69McBL4OSGMVms/T2YP8OK+jcCSl5GYYZiflgSzRqn5LJ7gnn+BfDFP7kw2 9ZOMpgWV9KEO6DaDss7z3gXLC6iK1unlWwBu8ML7ShjOjkukYlt3iKx83z0EnE+DzAX5vEJs0X lHo= X-IronPort-AV: E=Sophos;i="5.76,335,1592841600"; d="scan'208";a="145461417" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Aug 2020 21:00:23 +0800 IronPort-SDR: 7WixDaGDzpfa78Ke3EHsM+4qK+SlPPAxglK5+7k9dGnk7oYc9/9DP+3oCdWAms84WtsGvq16Am J3qRnNBDnYHQ== Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2020 05:47:18 -0700 IronPort-SDR: L04YRptmobvqN3BJpLyZuEMHO7kdcUXvLY1EnJxpGGhe22GxcBylNoEuION7kZTo1e4PHitCRM TEtuoSSA5zGA== WDCIronportException: Internal Received: from 8fr9cg2.ad.shared (HELO localhost.hgst.com) ([10.86.59.94]) by uls-op-cesaip01.wdc.com with ESMTP; 21 Aug 2020 06:00:21 -0700 From: Niklas Cassel To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: damien.lemoal@wdc.com, Niklas Cassel , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: scsi_debug: Remove superfluous close zone in resp_open_zone() Date: Fri, 21 Aug 2020 15:00:07 +0200 Message-Id: <20200821130007.39938-1-niklas.cassel@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org resp_open_zone() always calls zbc_open_zone() with parameter explicit set to true. If zbc_open_zone() is called with parameter explicit set to true, and the current zone state is implicit open, it will call zbc_close_zone() on the zone before proceeding. Therefore, there is no need for resp_open_zone() to call zbc_close_zone() on an implicitly open zone before calling zbc_open_zone(). Remove superfluous close zone in resp_open_zone(). Signed-off-by: Niklas Cassel --- drivers/scsi/scsi_debug.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 064ed680c0530..912d6f4878bae 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -4482,8 +4482,6 @@ static int resp_open_zone(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) goto fini; } - if (zc == ZC2_IMPLICIT_OPEN) - zbc_close_zone(devip, zsp); zbc_open_zone(devip, zsp, true); fini: write_unlock(macc_lckp); -- 2.26.2