From patchwork Tue Nov 27 23:04:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10701581 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 9E89914D6 for ; Tue, 27 Nov 2018 23:05:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8557B2C1EF for ; Tue, 27 Nov 2018 23:05:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7921D2CA56; Tue, 27 Nov 2018 23:05:24 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 BFE942C1EF for ; Tue, 27 Nov 2018 23:05:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726414AbeK1KEt (ORCPT ); Wed, 28 Nov 2018 05:04:49 -0500 Received: from out002.mailprotect.be ([83.217.72.86]:35943 "EHLO out002.mailprotect.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726291AbeK1KEt (ORCPT ); Wed, 28 Nov 2018 05:04:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mailprotect.be; s=mail; h=Content-Transfer-Encoding:MIME-Version:References :In-Reply-To:Message-Id:Date:Subject:Cc:To:From:reply-to:sender:bcc: content-type; bh=tkaVkl0uX2pumqlq6x0QA85P6rOEYeaeu6uqiP/T97g=; b=mP2uKXtp52B7 5Ef+d/7DwuUHAx3b+MExbmYLjGLc59bIHCM/Gjsi6tIUsK7PAfK7qawnK/0petS/noXOlmlCxsiKA RWQEY2D8FA45RhMJUgySZ1BtDJFZYPBesYVV8eOE8VHZ5lTfYSJfAGyvnbpjW6w7rx+XwMvhvROl7 0WEOte+SpIMlpgXv+mNPHUNQlNFPxe/ez4SXpRxWOXW0LzgfpcEX6/PDg/BZANqN75/7ftzR3jm+4 YPNeW3Db3synjI7BcsJssFDwShhETjPZlMUlYZRNRGSG23ULRlxb802Pg5wLKIiBw2Q1+9d+Sy4o6 HO2FS9q9Y+cjV7eSND03kA==; Received: from smtp-auth.mailprotect.be ([178.208.39.159]) by com-mpt-out002.mailprotect.be with esmtp (Exim 4.89) (envelope-from ) id 1gRmPq-000AL0-Ds; Wed, 28 Nov 2018 00:05:14 +0100 Received: from desktop-bart.svl.corp.google.com (unknown [104.133.8.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mailprotect.be (Postfix) with ESMTPSA id 2CC7EC050D; Wed, 28 Nov 2018 00:05:08 +0100 (CET) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Himanshu Madhani Subject: [PATCH 1/2] qla2xxx: Introduce a switch/case statement in qlt_xmit_tm_rsp() Date: Tue, 27 Nov 2018 15:04:54 -0800 Message-Id: <20181127230455.259829-2-bvanassche@acm.org> X-Mailer: git-send-email 2.20.0.rc0.387.gc7a69e6b6c-goog In-Reply-To: <20181127230455.259829-1-bvanassche@acm.org> References: <20181127230455.259829-1-bvanassche@acm.org> MIME-Version: 1.0 X-Originating-IP: 178.208.39.159 X-SpamExperts-Domain: mailprotect.be X-SpamExperts-Username: 178.208.39.128/27 Authentication-Results: mailprotect.be; auth=pass smtp.auth=178.208.39.128/27@mailprotect.be X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.22) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5pxDuTVGSj4tsWBcPPcUVmt602E9L7XzfQH6nu9C/Fh9KJzpNe6xgvOx q3u0UDjvO1tLifGj39bI0bcPyaJsYTarjontMPw7f3NqDIrNV7pphXnBH4p08Ft9j1x3N/nLO18D Od3nQsC62ajtEOV/fohsGOPFT2pee2Xw2nnaC+uuZzUV2SSE877X6ek5VphlU4lE4xwlSMNZQReC h1BkhSvwYJg8Zt8D44lX+/mPOqzZYqVFg3z5lbRdfQAf/u3PyUGlz8CJSOMrvzx9TVg3RkVv69ki u9fnRM4V1xr3a72A+yiBn1++U1P6gFCnKfjMMqxWoq/FM2XXTzjR7Qr2fwNFyFWesvfWEQ3buhdR df3sTqn1gyiGMs00+yjdEjhJY611qc5TTtnihBuF8qtjLQ/YOACnRq3hbWW5upKABHmcPEg+PVRT iaxPY52n0Pp/8yWZ4SOzQFmgsMTstbIfeOKPPhkxeOWI8nHYm5pmBDqF+55c8zrSmk/soiXY2/fQ 5x9a3CrsA/tn9dp59VE0LfDdgRj6yrQAuxbFOPSpYqPfmLF0wqTcEF+RrgN98ekFapM+X2fvWkTN Ck2gofSHg/s1d/TEuR+B72bMzWq28zMasfxDp5icgsxZIhdVp7l79qa5zn3o6MtK8pf0hPbAkeCZ ME8HeiOTBXPmeRcbGamAcxw3qqhc+N6cuEg4XWh5Fos1uU38r1dSTIHlWhlpRNodsCC6nAa578KW 6nXEp/zT5bJqgbY1YeRc4JEWOmfW860Azxg3YaKd1VkEETUR8cEzN9VLYXnPHpe/XBgPmmCASkpK mWMXMp0oGc7StEekwtM+m4WpRRDP6YzwkAPgQJbSWCBit6HLj4sk0KgEJq1mb5boiIOii8qS/cv3 /I88AZu1b5AlmeNmGTYh1q/TezGs5b9wxI8bwjEizYGgpfOiXPWlFdaGOH191uXjgjQN/QUwKDrf q3v5/q7pQUfnocaiuYnh9c+mZpu2meXeARjc7poMdKebspwo4rT4U0yHnsFEFmAKKS84AwX/iljz 3ffA09zWNv+KijMnEXNmm8NfjLcQpkmn967DSqJU//PeK5A5Fxib54hor19Rav1EA3VvRSeyeah7 LB+FgVuMLpaBl5pWcs7QDDX5FrGcNuOikev71tJhco6bnXR0nWNBphk= X-Report-Abuse-To: spam@com-mpt-mgt001.mailprotect.be 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 This patch improves code readability but does not change any functionality. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index c4504740f0e2..802007a7b21c 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -2379,20 +2379,20 @@ void qlt_xmit_tm_rsp(struct qla_tgt_mgmt_cmd *mcmd) } if (mcmd->flags == QLA24XX_MGMT_SEND_NACK) { - if (mcmd->orig_iocb.imm_ntfy.u.isp24.status_subcode == - ELS_LOGO || - mcmd->orig_iocb.imm_ntfy.u.isp24.status_subcode == - ELS_PRLO || - mcmd->orig_iocb.imm_ntfy.u.isp24.status_subcode == - ELS_TPRLO) { + switch (mcmd->orig_iocb.imm_ntfy.u.isp24.status_subcode) { + case ELS_LOGO: + case ELS_PRLO: + case ELS_TPRLO: ql_dbg(ql_dbg_disc, vha, 0x2106, "TM response logo %phC status %#x state %#x", mcmd->sess->port_name, mcmd->fc_tm_rsp, mcmd->flags); qlt_schedule_sess_for_deletion(mcmd->sess); - } else { + break; + default: qlt_send_notify_ack(vha->hw->base_qpair, &mcmd->orig_iocb.imm_ntfy, 0, 0, 0, 0, 0, 0); + break; } } else { if (mcmd->orig_iocb.atio.u.raw.entry_type == ABTS_RECV_24XX) {