From patchwork Sat Jan 27 20:16:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10187635 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 46BAD60388 for ; Sat, 27 Jan 2018 20:16:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AED928BDD for ; Sat, 27 Jan 2018 20:16:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C7BC28BE0; Sat, 27 Jan 2018 20:16:45 +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=-6.9 required=2.0 tests=BAYES_00,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 D201228BDD for ; Sat, 27 Jan 2018 20:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752511AbeA0UQn (ORCPT ); Sat, 27 Jan 2018 15:16:43 -0500 Received: from mout.web.de ([212.227.17.11]:62613 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751596AbeA0UQl (ORCPT ); Sat, 27 Jan 2018 15:16:41 -0500 Received: from [192.168.1.2] ([78.49.117.84]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lj2I6-1fBpFa0kFq-00dDDr; Sat, 27 Jan 2018 21:16:36 +0100 Subject: [PATCH 1/2] RDMA/bnxt_re: Delete two error messages for a failed memory allocation in bnxt_qplib_alloc_dpi_tbl() From: SF Markus Elfring To: linux-rdma@vger.kernel.org, Devesh Sharma , Doug Ledford , Jason Gunthorpe , Selvin Xavier , Somnath Kotur , Sriharsha Basavapatna Cc: LKML , kernel-janitors@vger.kernel.org, Himanshu Jha References: <19c755a6-8c52-bbd5-a425-48fc08cecd4f@users.sourceforge.net> Message-ID: <1d57e7ae-b04a-3875-d89a-c4e3c57b96bc@users.sourceforge.net> Date: Sat, 27 Jan 2018 21:16:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <19c755a6-8c52-bbd5-a425-48fc08cecd4f@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:a7iosqqFWFupJMXkoYsn7afXKbw7araw7I8QLnUkLLDbAp/riH4 nQQmSPb8ZxJ1xUxqqx64A5J70W7WCnrNn5NxIy8I79+OvVQfeFsSomoxqHVEBczXaYMbYJP sd9UF2aWXWajEgjKkiIy417/HDLwOL17WydjYBXBhc5uxmtyqV2UvL9wvvG0Zz6xj/Mv7Ui Ly68Jw44QHMR3deX8DbLg== X-UI-Out-Filterresults: notjunk:1; V01:K0:YkQy1MGNz+g=:Q+ZJtz+csxb1rj7JsAIXGr PeV/hF/W2w62ESQivbnReDXasBtXeT1k0XmBb6GbaN088P9yMqNxWzQmEuGVwN2M33nlyfriD aCpJe1OKph7CX/SRtTCtfxBQbpMna29evJdqv29EmYdcTCQDIR5IztkRqD3nWHQbGXnani+iM G3zL/s/i3EFigvt8cBGpSjEHQm0MYlk13h0rHEpT7LuEXtCBZnpetWbCpCjn7Nr8mvht+mZgX pk/HffxWmmUq26YONWBbZyy0V9re1YmDFyVh+09ACeZOjbithxCvSaNWXJE3EIsdHqyKaQaWs z5JfhS+O3lGA3NDEvHz8I4r89nlEIwkcjYD1enLdsfI981oU0gY+bkh7jgKQwRVxY5tgXe/bv aFN4FsDtn8PiAbZz4/hxh9nZpuuDLt9EhnO7Cj2tMTjE4Gr1qqmza0Z9krWk9VuYRa6KCriLr hw8D1/u7JZmQEGHj0wZ15/xwclcELG1zpnnhPZSuZSLRGO+I9n0oH2+UiRVU13tpLwCegF5b7 ylwYElMhrbaG3AM6S0/WTqmgXaj2ec33iuihutMqzajxZFAtXNLc1xpDIleH+E033gFTPX93Q ebUsNzfGGgRRtdNjfZcagF71ZSRxuZ8t/TP5eQaLGxb7hNSBwPSEyztPz5/v0Wky+F+9Ju+9u 28EW7HEIK9DaShoPc2evVrYrZEARDGvs1OsEY6hJVzB99osxr1/zoj+atk4B5j9UndJRN/RD+ DgEvQqwLABGZnPv4WHt2LyI2whvpb9pLi645zii6S3w7FjWTjzpoS4B1SS5AvyAFI6Rpx6v7p GbDwAwCmOBk7ICPNSusJJGaqREjrWq+DqSq+tIjBCR1f5mwXPg= Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 27 Jan 2018 20:40:11 +0100 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/infiniband/hw/bnxt_re/qplib_res.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.c b/drivers/infiniband/hw/bnxt_re/qplib_res.c index ad37d54affcc..9dacfd24869b 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_res.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_res.c @@ -707,8 +707,6 @@ static int bnxt_qplib_alloc_dpi_tbl(struct bnxt_qplib_res *res, dpit->app_tbl = kcalloc(dpit->max, sizeof(void *), GFP_KERNEL); if (!dpit->app_tbl) { pci_iounmap(res->pdev, dpit->dbr_bar_reg_iomem); - dev_err(&res->pdev->dev, - "QPLIB: DPI app tbl allocation failed"); return -ENOMEM; } @@ -721,9 +719,6 @@ static int bnxt_qplib_alloc_dpi_tbl(struct bnxt_qplib_res *res, pci_iounmap(res->pdev, dpit->dbr_bar_reg_iomem); kfree(dpit->app_tbl); dpit->app_tbl = NULL; - dev_err(&res->pdev->dev, - "QPLIB: DPI tbl allocation failed for size = %d", - bytes); return -ENOMEM; }