Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423689AbdDUSYJ (ORCPT ); Fri, 21 Apr 2017 14:24:09 -0400 Received: from mout.web.de ([212.227.15.4]:55603 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423672AbdDUSYA (ORCPT ); Fri, 21 Apr 2017 14:24:00 -0400 Subject: [PATCH v2 00/17] IB/mlx: Fine-tuning for several function implementations To: Doug Ledford , Hal Rosenstock , Leon Romanovsky , Majd Dibbiny , Matan Barak , Sean Hefty , Yishai Hadas , linux-rdma@vger.kernel.org Cc: LKML , kernel-janitors@vger.kernel.org References: <1935365a-bd7c-461e-6a84-0c5d3a501fff@users.sourceforge.net> <1492720654.3041.16.camel@redhat.com> From: SF Markus Elfring Message-ID: Date: Fri, 21 Apr 2017 20:17:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <1492720654.3041.16.camel@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:dTYishNGuM2Dk7Lpay9lnogbnjPD83mdT43/PlLoDqnM2/K50vF qTIobLgjCrbo5eHrR9tnQk0au24lbbp2xLjkNcFrF9CC8Rm2+bpKV+GtRUgwmDQa+fNmM4D eCgazM14b94MAfUel/0oUDT3I8cVaCUkW2071JEkUZqveelZvVOHwJV7THfbjg9lsHs22jD pNLlTl60ds+MrhnKASDEA== X-UI-Out-Filterresults: notjunk:1;V01:K0:zjtLnidy+nU=:k357UvgDKDYA6/b3/iTe/A 5Q1NWSjWgZgXYzieLX6yJme6mJ9JwNklBXdaweBfPoX8nhHfUSpCZ9fcwiA1/i9irSEUmMR4L Gy2rZp/4udzWCuOzXEnAMP4xN15HjV3lnYrAAGsCbkUAIFekWGbLvHGqGsgsDUMBvlQsNoNxv vhx6eYq5PWleiRpm56zTEJeVuwMR5+lVMaq6gvOr8moXgRtV6BWhwDHj4i1+JkQCXTY1fHM2/ bNrdqvZrLoKguhvw4QpkUXzYbHUpZLmsdfsDq9uVxXxgeqYZvRJOJoBVJmPpkjb7ra4ScgX4P 29+sPikzM1rUlMprFekAj+3637K/hopR01kjpy4giEUtsgnllpxBJeYAjWumjM4wb2GvTmvwd uXGFSbAkPDuPEucZQWEpkxZLpP7ostEIV3oMFm4OgtBAGJZDmxA407J8/5cSmv+3bLCo8iHa9 0/JXiSkP+ll8dlnQBUNiQ+exSnTr2SrgiIVOAMV1r9JDGs8kg9pbqG5wS8DGOk5UeUrpjZXjW Ejjt1nqmkF0Qpnvt58Gx2dzb6cgSxNaDTmqg3Nj8coBGhuZt0w76LMr3RMWRE9dztAVNMhMPM +iFu2iVU46jBDJ1fSh2xboDXHiOMSuI8k5iChSFLutEwTVTzV/tpe0EkQWBY88jmce+6geGB7 mnTbAXbA1tC4Wk207JE9XBMPMGsIUBiyf26Ahp/M+lFHOo1xNGW0NjWsPkA6rWnidYPYFtY9H Y5/BL6frRbb3gV1gFPVcurkHgbbOGVkrZ5Rm7BofFXzZvsahyc0QL7+8ZHYA+UZd1dMTS85Wm FixrX8F Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1603 Lines: 39 From: Markus Elfring Date: Fri, 21 Apr 2017 19:56:54 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (17): Use kcalloc() in mlx4_ib_alloc_pv_bufs() Use kmalloc_array() in six functions Improve size determinations in six functions Fix a typo in a comment line Delete four unnecessary return statements Delete an unnecessary check before kfree() in free_pv_object() Move an assignment out of a check in forward_trap() Enclose 46 expressions for sizeof by parentheses Split a condition check in six functions Delete an unnecessary variable in __mlx4_ib_query_gid() Delete an unnecessary variable initialisation in mlx4_ib_add() Delete an unnecessary variable assignment in mlx4_ib_add() Delete an error message for a failed memory allocation in mlx4_ib_add() Delete unnecessary braces in mlx4_ib_add() Delete unwanted spaces behind usages of the sizeof operator Add spaces for better code readability Less function calls in create_kernel_qp() after error detection --- v2: Changes were rebased on source files from Linux next-20170421. Some of them were recombined as requested by Doug Ledford. drivers/infiniband/hw/mlx4/mad.c | 72 ++++++++-------- drivers/infiniband/hw/mlx4/main.c | 164 ++++++++++++++++++++---------------- drivers/infiniband/hw/mlx4/qp.c | 173 +++++++++++++++++++------------------- drivers/infiniband/hw/mlx5/qp.c | 66 ++++++++++----- drivers/infiniband/hw/mlx5/srq.c | 5 +- 5 files changed, 261 insertions(+), 219 deletions(-) -- 2.12.2