From patchwork Wed Apr 17 21:44:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10906247 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 1CFC817E6 for ; Wed, 17 Apr 2019 21:45:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 080F628A93 for ; Wed, 17 Apr 2019 21:45:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F044128BA9; Wed, 17 Apr 2019 21:45:26 +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,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 940CA28A93 for ; Wed, 17 Apr 2019 21:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387940AbfDQVpY (ORCPT ); Wed, 17 Apr 2019 17:45:24 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:35441 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387790AbfDQVpV (ORCPT ); Wed, 17 Apr 2019 17:45:21 -0400 Received: by mail-pf1-f196.google.com with SMTP id t21so88350pfh.2 for ; Wed, 17 Apr 2019 14:45:21 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=gARxyKpfYyRwj7cmkjcfDh93vFm/0nbvIPOSrb8vVHc=; b=bY4CyDzpS4hjuO3uXAnZ5jnaEuikt2YPO01kllHsnBjk1eIu1D6ZByUbCHkwLLLAc4 brc6TtPuUZYu/yhfIe3q1J/eb0WUuoMhVSmBJIQi4VXKKWmmLbpocx9R8fOAaaO+2DcX 9yavK+py+mLSfhocV04kK96o/A/vh8QlPwr7YdohisxtXM2vsQO8M2V8rxrWT/b/LFoB jytU+4jI/v4pxTIhWI5BXVgF/9fEgmcmjviNx7SomClYCtipVZph0MdOFEQ32Vuvx/FK quLtY+n/FF4hHxlD/UlPM2ZwRF945vsbXqFh7B6grW3mwZz/PFen0D9US8jomBL07bnP WWpg== X-Gm-Message-State: APjAAAVhlVoSlX7eA3L0NLy7fGXbTdq6z+V7c2TEwSiZnLxsM+hpzM7w V7d5DQGfxvyNRJJTEmiDpK8= X-Google-Smtp-Source: APXvYqxsb/gmodedoWXlgFVR1KCexWz32V7Er9Sm24bV+aOik0UfwjzX8rdre2iRlz+NslRi/QmLsQ== X-Received: by 2002:a65:64c8:: with SMTP id t8mr84230809pgv.248.1555537521192; Wed, 17 Apr 2019 14:45:21 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id d68sm219314pfg.16.2019.04.17.14.45.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 14:45:20 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Himanshu Madhani , Giridhar Malavali Subject: [PATCH 22/34] qla2xxx: Remove qla_tgt_cmd.released Date: Wed, 17 Apr 2019 14:44:31 -0700 Message-Id: <20190417214443.243152-23-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190417214443.243152-1-bvanassche@acm.org> References: <20190417214443.243152-1-bvanassche@acm.org> MIME-Version: 1.0 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 the previous patch removed the only statement that sets qla_tgt_cmd.released, remove the code that depends on that member variable being set and the member variable itself. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_target.h | 1 - drivers/scsi/qla2xxx/tcm_qla2xxx.c | 15 +-------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h index 8fb197a4d740..262fc33fb473 100644 --- a/drivers/scsi/qla2xxx/qla_target.h +++ b/drivers/scsi/qla2xxx/qla_target.h @@ -889,7 +889,6 @@ struct qla_tgt_cmd { unsigned int term_exchg:1; unsigned int cmd_sent_to_fw:1; unsigned int cmd_in_wq:1; - unsigned int released:1; /* * This variable may be set from outside the LIO and I/O completion diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 4fcae1af2d63..f6797eed320a 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -262,7 +262,6 @@ static void tcm_qla2xxx_free_mcmd(struct qla_tgt_mgmt_cmd *mcmd) static void tcm_qla2xxx_complete_free(struct work_struct *work) { struct qla_tgt_cmd *cmd = container_of(work, struct qla_tgt_cmd, work); - bool released = false; unsigned long flags; cmd->cmd_in_wq = 0; @@ -273,14 +272,9 @@ static void tcm_qla2xxx_complete_free(struct work_struct *work) cmd->qpair->tgt_counters.qla_core_ret_sta_ctio++; cmd->trc_flags |= TRC_CMD_FREE; cmd->cmd_sent_to_fw = 0; - if (cmd->released) - released = true; spin_unlock_irqrestore(&cmd->cmd_lock, flags); - if (released) - qlt_free_cmd(cmd); - else - transport_generic_free_cmd(&cmd->se_cmd, 0); + transport_generic_free_cmd(&cmd->se_cmd, 0); } /* @@ -490,13 +484,6 @@ static void tcm_qla2xxx_handle_data_work(struct work_struct *work) spin_lock_irqsave(&cmd->cmd_lock, flags); cmd->cmd_sent_to_fw = 0; - - if (cmd->released) { - spin_unlock_irqrestore(&cmd->cmd_lock, flags); - qlt_free_cmd(cmd); - return; - } - if (cmd->aborted) { spin_unlock_irqrestore(&cmd->cmd_lock, flags);