From patchwork Fri Jan 29 23:12:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 8168531 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B68FE9FE6C for ; Fri, 29 Jan 2016 23:13:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C27F0203A0 for ; Fri, 29 Jan 2016 23:13:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE7D22039C for ; Fri, 29 Jan 2016 23:13:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753397AbcA2XNO (ORCPT ); Fri, 29 Jan 2016 18:13:14 -0500 Received: from mail-bl2on0090.outbound.protection.outlook.com ([65.55.169.90]:63214 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753469AbcA2XNL (ORCPT ); Fri, 29 Jan 2016 18:13:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=L9iREJj37t+F9Bv2xo6EnEfK2ZeK3aaNHZioWfv7obU=; b=IbP6FU5DAYqV2suHL0YtWEXHZRC4JBxkKUcf2Xf1jnJqNEGqi3gPzTGiqt4ejqdLBSXKgNGizbUCOBPqcDqOaU42vZ2KjQE6PHZdoG/nVpqB5HNuy07OUk2a4noFy1HvW8HKsfUsnOoeXXetfUMcq1mUPLvYFZGQw3EKLnOTNZs= Received: from BY2PR02CA0094.namprd02.prod.outlook.com (10.242.32.52) by DM2PR0201MB0832.namprd02.prod.outlook.com (10.160.95.153) with Microsoft SMTP Server (TLS) id 15.1.390.13; Fri, 29 Jan 2016 23:13:07 +0000 Received: from BY2FFO11FD055.protection.gbl (2a01:111:f400:7c0c::171) by BY2PR02CA0094.outlook.office365.com (2a01:111:e400:2c2a::52) with Microsoft SMTP Server (TLS) id 15.1.390.13 via Frontend Transport; Fri, 29 Jan 2016 23:13:06 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.174) smtp.mailfrom=sandisk.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.174 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.174; helo=milsmgep12.sandisk.com; Received: from milsmgep12.sandisk.com (63.163.107.174) by BY2FFO11FD055.mail.protection.outlook.com (10.1.15.192) with Microsoft SMTP Server id 15.1.355.15 via Frontend Transport; Fri, 29 Jan 2016 23:13:06 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by (Symantec Messaging Gateway) with SMTP id E4.A8.25823.102FBA65; Fri, 29 Jan 2016 15:13:05 -0800 (PST) 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.248.2; Fri, 29 Jan 2016 15:12:04 -0800 X-AuditID: ac160a69-a17cc980000064df-5c-56abf201a354 Received: from [10.60.52.49] ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id DA.47.02700.4C1FBA65; Fri, 29 Jan 2016 15:12:04 -0800 (PST) Subject: [PATCH v2 03/22] IB/srpt: Inline srpt_sdev_name() To: Doug Ledford References: <56ABF16E.7070006@sandisk.com> CC: Christoph Hellwig , Sagi Grimberg , "Alex Estrin" , "linux-rdma@vger.kernel.org" From: Bart Van Assche Message-ID: <56ABF1C4.3090106@sandisk.com> Date: Fri, 29 Jan 2016 15:12:04 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56ABF16E.7070006@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBLMWRmVeSWpSXmKPExsWyRoxnkS7jp9VhBgvvM1pcePqdyeLl+Q+s FitXH2WyeHaol8XiRtsDNgdWj8V7XjJ57L7ZwObxbPphJo/3+66yeXzeJBfAGsVlk5Kak1mW WqRvl8CVcfvnLuaCqzwVjfvPsjUw7uDqYuTkkBAwkXhx/AR7FyMXh5DAJkaJbas2sEE4Oxgl Hl4+xAxTdWr+YkaIxBxGibsH5jCBJIQFrCQeXu9lBLFFBNQkNr1axA5iCwloSZy78AVsLLPA GkaJiTO2soEk2ASMJL69n8kCYvMCFV16vhasgUVAVeJVx2GwQaICERKHO7vYIWoEJU7OfAJW zymgLbFk9gUgmwNoqKbE+l36IGFmAXmJ7W/nMIPskhDYyyrxZcsOVogj1CVOLpnPNIFReBaS UbMQ2mchaV/AyLyKUSw3M6c4Nz21wNBIrzgxLyWzOFsvOT93EyM4PrgydzCumGR+iFGAg1GJ h3fBitVhQqyJZcWVuYcYJTiYlUR4614AhXhTEiurUovy44tKc1KLDzFKc7AoifNat6iFCQmk J5akZqemFqQWwWSZODilGhhjvl7+e9WVPyHg54YgAZalTnrsfn9ZqyYwvQ6qCrF/dHmC8uRu Bfn6Im0Hxa07TJ8oi/5ni2S5tX6ejFhHWb12OftHW035X+u4ubZVGYf0zz3o3ZH3/HLstmMF voZHk+QbRD7ZJWp/teH/e03Idbb8Hs9aJzYvnRO63zhfuv7j51wlskqSX4mlOCPRUIu5qDgR ANxixQaLAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPJMWRmVeSWpSXmKPExsXCtZEjRffIx9VhBoeXG1tcePqdyeLl+Q+s FitXH2WyeHaol8XiRtsDNgdWj8V7XjJ57L7ZwObxbPphJo/3+66yeXzeJBfAGsVlk5Kak1mW WqRvl8CVcfvnLuaCqzwVjfvPsjUw7uDqYuTkkBAwkTg1fzFjFyMXh5DALEaJ1v+/2EASwgJW Eg+v9zKC2CICahKbXi1iB7GFBLQkzl34wg7SwCywilHi98oPYA1sAkYS397PZAGxeYGKLj1f C9bAIqAq8arjMNggUYEIicOdXewQNYISJ2c+AavnFNCWWDL7ApjNLKAu8WfeJWYIW15i+9s5 zBMY+WYhaZmFpGwWkrIFjMyrGMVyM3OKc9MzCwwN9YoT81Iyi7P1kvNzNzGCg5Qzcgfj04nm hxiZODilGhjFPX6s0lOrYpH/5npaZdtRnjbzfVPW2xuLbgjOcJz70MOeZ/X8Qxnx3VcyyiXc V3t1XW0LVanbmnny25aY7Z9sJXZUb/c6/XdiuuLM9O5SkWtJi/aV2i4LvFOiqN0ktdikd8ma 44dVS9VMokz8d87xbpJ+7r98u+uKKbEqL2z/fZSSC/EJZFViKc5INNRiLipOBABa66kPAgIA AA== X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD055; 1:MKfoBoiVNc+SzVoAI205Jfk1lndVqoaIpoK4WrxzyApEY4AKVmHKN4oHxlTKDkL3NYBO/0SVSAsh6G9AqpAc2480/JrohguJr5u10NXkRlZx3QQdzSgMcE1TKVRuwUu8iFLx9DwUInXxg1MiI6jR2jfuIGTWDHTUUzU3a+7vEt+65npMFbVluZsZ03bhToMpYP1e9C85k+Yygnfck5VdDO1ALUc6cygcsfJgzPaQzxC98i1DxivOkHS4EKSRSyjSrh/pNI0omMXMSrDlEffCHpa8o2kqQKP+S+3ajFm7y6jX1Bzz2W/o2Qg2QmSYaWVoLx3wePcL3CAr7iWk32C6CVwCCAkdxdAb9l4oSsq+tfd2st1y4Pi8YQPdw4U0wUdinPrcYnGjextiwH98R0dPvia+R7W0SEKPqFuSgcp2vsiefYY+KasddYATcdQKslqr X-Forefront-Antispam-Report: CIP:63.163.107.174; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(64126003)(11100500001)(33656002)(5008740100001)(36756003)(1220700001)(586003)(1096002)(23676002)(4326007)(92566002)(2906002)(230700001)(47776003)(50986999)(19580395003)(83506001)(80316001)(76176999)(19580405001)(110136002)(87936001)(4001350100001)(87266999)(50466002)(65816999)(65956001)(65806001)(77096005)(189998001)(86362001)(229853001)(2950100001)(5001960100002)(106466001)(54356999); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0201MB0832; H:milsmgep12.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0201MB0832; 2:Rr9fE+rpmohCL8AlV1admcY0BnLnnIrI523eVMwN3c3rvxoLb0v3hr26C91S1yDisM2Akh/5RynMF1N/liWjC9EPScHTPdkSTo7Gq7cqW9Q3a5Qk99gzLUsJPEidKQL0DfXDJPdrOAp2FxWtR3bDqQ==; 3:G18ZJm3wcGaUKMc118edCGMJxY/lvd6wZZJTG+0o1q5yVCOaRemomvPBbtG3SKXGfHc3e/nWqHgem4fjsgP3+C18ZuSrH0YLM9gAIGiAk6pztPVNgIulC3ivgKjaz3F32mlZ14pAqoKLeSTnWqY9Oe5sLY15dH74iTL8HLu5gHOL6Grzi1WOspDLZZVmb4W4tOgyr+tHbrIoyTDRYdcBhm3In6cxEHj6uvOOkL17jI/QTa/7nTkeCmpbqpx1DKP1p+yS6oJnirfwHmLut2ealg==; 25:YiH8gDcDDgj/EBRoqpSeRSKwfsyTwVXyWXGE78EgD0BVnRZMYJNQctUwfSIfA+qDrk/7vO2ro5ZRArnrbEursPs1mt4603vClo6TFf2EknmoPcaE7YSpcEm5tXuhoYEkiN/U9CH+8faeJeG9m9w0VW/AlMkSCcAvru09VHkOewPfHWHNDKJslSxBKwcYjIFbDgFM1x0C/5UD2zLRLi2ERqRsLZXThNgFR8IJA/+X8eNCEs6EGvkSSXBu6NtBqTn5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:DM2PR0201MB0832; X-MS-Office365-Filtering-Correlation-Id: 7e39d93b-39ce-4645-279f-08d32901bf18 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0201MB0832; 20:z9GF9f3LHl9DJ2GpGSVJWceflV9SKF2//uIf5oPHwQ2SsnAOkPWskRJDDNago6NPqgZEyPF0ytn8ijEIPAIyVqh4PLMWbs3mluGuhZeDS1Ylt0POR6fM3mejGmm9sDxh/pBgUJ/MD95d+jnyhZOL++mx9fYXtak5fiukGmVqchBq2099dLnpY7buPic5E8csC0crLwgIsO+hOC5gB131vOLB4uZX23+hHwfoCIkTiBUyXdof4UjzAnkAj+TqK5Kw/vZUCazenSrLggfoYDpXiH29H71vEeJwki8tcZAGyEaC4cqbVJ1h3BuXN+fJutp2Fvrv3Wd4I3H07p4Z8aZl2w+cGHrbiBMOahocgqHkZpSq5F7WaCTIXi6MQiei/N3KccB7KOmiHv/R7W8brB23R8kfPRYiLYia/xZV/fg9lsxBhc6QWu57H0v1l3gAIGnkARSAnhP2+qqh91nbMgyMctSa/QQVEDoTlsLS8aLTJg7SfR9GalZULgj1VWACSqVP X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(34787635062028)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(13017025)(5005006)(13024025)(13018025)(13015025)(13023025)(10201501046)(3002001); SRVR:DM2PR0201MB0832; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0201MB0832; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0201MB0832; 4:f6Iy3ilx4ddlmzwBDXgtQIXxqceSDiWNuo+P4vZLv30ILSuerLue/9eH28jSn+MmY/tR5iLW7S+k3RW8yz9fMVjFMYrHA3QQ2Z6RnScNrweAkZCTuJELqf2tEqvCxUCbBNhnVd5TR67KPWsS2v71A3GStaC+mfOs63MQwjNDgUmukREkjuuDdp3ERSb2usq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?BL4cJL07TUySVFNL8Smc+QAfz0hVe?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0201MB0832; 5:01vNs4ElLKpWavJlfOvT33WzLjDKy0NDuQ7ip3iRDN1Y1N6thHhYXRzefYLIhBcIV/eRixOm0KRt89900kjbE3q3WtBVQL1MOAxUxBdR5iOhR4NCz1s84BUk8Bj4WLSozX+oB7TFryZR1yMcoSBelg==; 24:hsEoUJTcF+k3WBScFi2vVUKAO4HWQEfWhvezjv2NJ5oT8D/L/oMofLZ1VFaLtjmrWZ3p43acFMWKlxw7p8CTJwGrry3QyH4itbR93jAMlpU=; 20:ijZ8+ViEovF3FKl+9NzWVdsNQ1jEEZxzZlXS+w7jt7jynAfTfJ1CdDcHMl1FUdmMMA5/2rXWTN3z62BTypYhHx2IGBx74aJnvPmbYVgljw8OmRhxAbBR+Mxd87pULH7f5wAhtm3ESZhrELmkGOEnU0W3TCvXWRYg00y9ZVlL9mZG/Zv3oNNZD3KjXKPhcpZSkIVivNaK+RXtC/3zolIK+I/fTo5qwFkWf9q9g94o5sZ3+blH4PMtP56+llfQQJ86 SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2016 23:13:06.6797 (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.174]; Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0201MB0832 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 srpt_sdev_name() is too trivial to keep it as a separate function. Hence inline this function. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg --- drivers/infiniband/ulp/srpt/ib_srpt.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index fde32ed..0194624 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -109,16 +109,6 @@ enum dma_data_direction opposite_dma_dir(enum dma_data_direction dir) } } -/** - * srpt_sdev_name() - Return the name associated with the HCA. - * - * Examples are ib0, ib1, ... - */ -static inline const char *srpt_sdev_name(struct srpt_device *sdev) -{ - return sdev->device->name; -} - static enum rdma_ch_state srpt_get_ch_state(struct srpt_rdma_ch *ch) { unsigned long flags; @@ -182,7 +172,7 @@ static void srpt_event_handler(struct ib_event_handler *handler, return; pr_debug("ASYNC event= %d on device= %s\n", event->event, - srpt_sdev_name(sdev)); + sdev->device->name); switch (event->event) { case IB_EVENT_PORT_ERR: @@ -3082,7 +3072,7 @@ static void srpt_add_one(struct ib_device *device) if (srpt_refresh_port(sport)) { pr_err("MAD registration failed for %s-%d.\n", - srpt_sdev_name(sdev), i); + sdev->device->name, i); goto err_ring; } snprintf(sport->port_guid, sizeof(sport->port_guid),