From patchwork Mon May 18 11:25:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 6428241 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0CA04C0432 for ; Mon, 18 May 2015 11:26:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 383F5205DC for ; Mon, 18 May 2015 11:26:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D117E2060B for ; Mon, 18 May 2015 11:26:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753556AbbERL0F (ORCPT ); Mon, 18 May 2015 07:26:05 -0400 Received: from mail-bl2on0095.outbound.protection.outlook.com ([65.55.169.95]:51660 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752155AbbERL0D (ORCPT ); Mon, 18 May 2015 07:26:03 -0400 Received: from BY2PR02CA0098.namprd02.prod.outlook.com (25.163.44.152) by BY1PR0201MB1031.namprd02.prod.outlook.com (25.161.203.149) with Microsoft SMTP Server (TLS) id 15.1.166.22; Mon, 18 May 2015 11:25:58 +0000 Received: from BY2FFO11FD012.protection.gbl (2a01:111:f400:7c0c::107) by BY2PR02CA0098.outlook.office365.com (2a01:111:e400:5261::24) with Microsoft SMTP Server (TLS) id 15.1.166.22 via Frontend Transport; Mon, 18 May 2015 11:25:58 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.172) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.172 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.172; helo=milsmgep11.sandisk.com; Received: from milsmgep11.sandisk.com (63.163.107.172) by BY2FFO11FD012.mail.protection.outlook.com (10.1.14.130) with Microsoft SMTP Server id 15.1.172.14 via Frontend Transport; Mon, 18 May 2015 11:25:56 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep11.sandisk.com (Symantec Messaging Gateway) with SMTP id 34.C3.04667.44CC9555; Mon, 18 May 2015 04:25:56 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.224.2; Mon, 18 May 2015 04:25:56 -0700 X-AuditID: ac160a68-f790b6d00000123b-91-5559cc4467c8 Received: from [10.50.231.56] ( [10.177.8.100]) by milsmgip11.sandisk.com (Symantec Messaging Gateway) with SMTP id EA.E7.03643.34CC9555; Mon, 18 May 2015 04:25:56 -0700 (PDT) Message-ID: <5559CC42.3000906@sandisk.com> Date: Mon, 18 May 2015 13:25:54 +0200 From: Bart Van Assche User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Doug Ledford CC: James Bottomley , Sagi Grimberg , Sebastian Parschauer , linux-rdma , "linux-scsi@vger.kernel.org" Subject: [PATCH v2 10/12] IB/srp: Remove a superfluous check from srp_free_req_data() References: <5559CB3A.6060102@sandisk.com> In-Reply-To: <5559CB3A.6060102@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeLIzCtJLcpLzFFi42JZI8azSNflTGSowdrPphYvz39gtfi//jaL xbNDvSwW3dd3sFncaHvAZnHyNr8Dm8ez6YeZPA7/+MHs8efPZ2aP9/uusnl83iQXwBrFZZOS mpNZllqkb5fAlTG5/S9zwSG2ilP7/jA3MB5k7WLk5JAQMJE4+GgVE4QtJnHh3nq2LkYuDiGB E4wSZ27sYoFw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63ce7H1Kc10nsY5Y2OLmrzUnTzOlYfqakU 79Z8aY9WzaSTs15+O7D8vuXqw+XR23fYcN+0qH3yofjv1AcRLO2W8w7vr+RnOzPn2LfQZ/ei DE701d95e2W3N/+U+ttpuUuFijWE8n6uqLNat3327IrV4s5HjMTu/Hx9yYnl/yPGNUosxRmJ hlrMRcWJAO9NDnoQAgAA X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD012; 1:QRb3HkqZHqC/IoXFXeY8fBmBrFLpiyKbtravX+QsVikBT/rXSzhFS2If9puNykSuL9KWqHm1soh/EaD2NNLbvixTTma0LEsxPRIIdnjQhMvGfIp+eooT3HBjy33liHTyq6Zvp9ufN74MBBbTjiZpRacoUUCzhYONo+SUgBohAm7gRuYulScXPW87dAqSrG61VaW3Jf3vRmtJyNn28GDnnhL7iDLbt+9tiABdgeJ1tSITOt9YFFyuVmgYkSxC5u6vTVTYmzwa7zzJFz35CTzZihu4flTptNQ+FHf+ejCWa+s= X-Forefront-Antispam-Report: CIP:63.163.107.172; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(438002)(199003)(189002)(87266999)(65956001)(47776003)(65806001)(69596002)(4001540100001)(77096005)(4001350100001)(50986999)(19580405001)(76176999)(5001960100002)(64706001)(65816999)(54356999)(189998001)(110136002)(5001860100001)(5001830100001)(97736004)(2950100001)(77156002)(36756003)(19580395003)(80316001)(50466002)(81156007)(62966003)(86362001)(68736005)(92566002)(229853001)(83506001)(46102003)(87936001)(33656002)(59896002)(23676002)(64126003)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0201MB1031; H:milsmgep11.sandisk.com; FPR:; SPF:Pass; PTR:ErrorRetry; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0201MB1031; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BY1PR0201MB1031; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0201MB1031; X-Forefront-PRVS: 058043A388 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2015 11:25:56.9707 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.172]; Helo=[milsmgep11.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0201MB1031 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function srp_free_req_data() does not use ch->target. Hence remove the ch->target != NULL check. Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer --- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 24b9d22..dd6f928 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -852,7 +852,7 @@ static void srp_free_req_data(struct srp_target_port *target, struct srp_request *req; int i; - if (!ch->target || !ch->req_ring) + if (!ch->req_ring) return; for (i = 0; i < target->req_ring_size; ++i) {