From patchwork Thu Apr 30 09:01:03 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: 6300911 Return-Path: X-Original-To: patchwork-linux-rdma@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 A359EBEEE1 for ; Thu, 30 Apr 2015 09:16:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2EBA201EC for ; Thu, 30 Apr 2015 09:16:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBA80201E4 for ; Thu, 30 Apr 2015 09:16:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750891AbbD3JQw (ORCPT ); Thu, 30 Apr 2015 05:16:52 -0400 Received: from mail-bl2on0085.outbound.protection.outlook.com ([65.55.169.85]:33995 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751333AbbD3JQV (ORCPT ); Thu, 30 Apr 2015 05:16:21 -0400 Received: from BY2PR02CA0034.namprd02.prod.outlook.com (10.141.216.24) by CY1PR0201MB1035.namprd02.prod.outlook.com (25.161.211.153) with Microsoft SMTP Server (TLS) id 15.1.154.19; Thu, 30 Apr 2015 09:01:08 +0000 Received: from BL2FFO11OLC014.protection.gbl (2a01:111:f400:7c09::139) by BY2PR02CA0034.outlook.office365.com (2a01:111:e400:2c40::24) with Microsoft SMTP Server (TLS) id 15.1.154.19 via Frontend Transport; Thu, 30 Apr 2015 09:01:08 +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 BL2FFO11OLC014.mail.protection.outlook.com (10.173.160.144) with Microsoft SMTP Server id 15.1.160.8 via Frontend Transport; Thu, 30 Apr 2015 09:01:05 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep11.sandisk.com (Symantec Messaging Gateway) with SMTP id 6A.90.08453.15FE1455; Thu, 30 Apr 2015 02:01:05 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.224.2; Thu, 30 Apr 2015 02:01:05 -0700 X-AuditID: ac160a68-f79df6d000002105-d5-5541ef51032e Received: from [10.50.231.61] ( [10.177.8.100]) by milsmgip12.sandisk.com (Symantec Messaging Gateway) with SMTP id C6.9A.04406.F4FE1455; Thu, 30 Apr 2015 02:01:05 -0700 (PDT) Message-ID: <5541EF4F.6050200@sandisk.com> Date: Thu, 30 Apr 2015 11:01:03 +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 09/12] IB/srp: Remove a superfluous check from srp_free_req_data() References: <5541EE21.3050809@sandisk.com> In-Reply-To: <5541EE21.3050809@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeLIzCtJLcpLzFFi42JZI8azSDfwvWOowaJX+hYvz39gtfi//jaL xbNDvSwW3dd3sFncaHvAZnHyNr8Dm8ez6YeZPA7/+MHs8efPZ2aP9/uusnl83iQXwBrFZZOS mpNZllqkb5fAldF1eClzwW22ir8bJrA1MN5k7WLk5JAQMJFYOvEplC0mce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oHYzXJ5ofYmTi4JRqYGRMikg4uJszz+QH2+E3NkqMq07LxcxZJ/y5xMS+99ai xbX7n0ie9pdSZoxSCkt5IG7XviNh17Nz7qVdtuZ/0xymaMy+375luRFv6qdZZX1PWnXjKy+0 v3QSU+7emD1N38zSMmq/057FFW8vXNxq+Jj/qOJTRgWOtokTXA5+55NtTr9YntRlocRSnJFo qMVcVJwIAEN82EUQAgAA X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:63.163.107.172; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(438002)(189002)(199003)(87266999)(65816999)(23676002)(36756003)(50466002)(2950100001)(19580405001)(46102003)(4001350100001)(77096005)(86362001)(76176999)(54356999)(92566002)(33656002)(65956001)(47776003)(65806001)(77156002)(62966003)(83506001)(229853001)(106466001)(59896002)(87936001)(19580395003)(80316001)(50986999)(64126003)(5001960100002)(110136002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0201MB1035; H:milsmgep11.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0201MB1035; 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:CY1PR0201MB1035; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0201MB1035; X-Forefront-PRVS: 056297E276 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2015 09:01:05.9848 (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: CY1PR0201MB1035 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@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 All srp_free_req_data() callers guarantee that ch->target != NULL hence remove the ch->target test from srp_free_req_data(). 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 3727b90..a73eb1e5 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -853,7 +853,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) {