Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753077AbdCHMvw (ORCPT ); Wed, 8 Mar 2017 07:51:52 -0500 Received: from mout.web.de ([212.227.15.3]:62164 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752157AbdCHMve (ORCPT ); Wed, 8 Mar 2017 07:51:34 -0500 Subject: [PATCH 05/26] IB/ocrdma: Improve another size determination in ocrdma_mbx_query_qp() To: linux-rdma@vger.kernel.org, Devesh Sharma , Doug Ledford , Hal Rosenstock , Sean Hefty , Selvin Xavier References: Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: Date: Wed, 8 Mar 2017 13:50:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:RDf+NDr6su3YTQtr6JwRgvnRUFkeNQ9vqDIvSupM9luODjzIiCH GT8hPPfdgzsC7IxNgSu6iPiVvZmmFCfPpWyuzH0ZJQsGigJD8TmLNImoZ7suMbvHhq5KdZr mDCHSDrOkNlVqd9GUmjqoD12XyZWa+l4/GL5kAjhLBcMCG1ewtVzA2Kn5z3dRGseuJQ+van Yn5D1fjAtqXc3JfEjBg5w== X-UI-Out-Filterresults: notjunk:1;V01:K0:j3bFwxaUvoo=:RPTb2Z/tEK/+btJRYCGao5 lNj8tnpWChfkrNtpX0jVvplgyAZFRqUIPGR8bKN5jRYU63r+OXqiVx7IY4O5ILqZ/+bQdOlAZ z2GN3WbL1FRapV4TxpRYEtGxxjxEHa7g6zUvAQS/RasgaLqkMZ6VI56/WH3IQWwGGLqopwUyg czo6Z0XYalW+UOPwCPn+m770vUm1ZEuh5tyj4dRwKAdeQ6RRcXouoQsG70fbHWjyufFF03s/Z JjgE4ADWJMYXbNpgro+btztr4+yzsmxtvSSDtFw93MmBkVvmTDrDvGjy1gPOS9/m4lIhdaZmN GIGZwq5qhzWBLfu4BgEjTMeePj7qbhSmh8ID/DCPbBpi8/jPwK8CE91VQo4Lem+/N357rHUY2 E+212nsIYf6hcbqM8+tcNrUhL3+OfttBG+EUdGd/o2/D4vzO0E94MsHwYiN034qtPG74yyM9a 4bgLVfdlyrwzgiSwvsjJb5L1gXN1oPeLAYC68fA3QrvfK1LzuvmBc2QtWXplTt4hJJ/3gJXGW JkIbL1C+JoUZP4YEWqfQqOqlYs7oGpCAAqmL0WuUwdWb1T6XXr19OTYt7tAcqzJ88nrP3aMOG 8P1TTQI8jIlshAK1xuKubNCrqKUOtdMcvRrVSCRYN5qvQ4eJnR9r2U6uFTF9YjprkZX/GSSTT 7nIPL1iy19Ew2YguPbjOejIlPwEV5apGJlQK/mheBr27VhPnk1L10gjrO3qYWJwGiq+WAISTX GtWsAQ2hw8tV46QbnfUMWiDvOEHTOdOvMS9UA0kYgC+PSByYmw6qlU5GfAdmwcOPSZ0o77oYn updBfLT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1034 Lines: 27 From: Markus Elfring Date: Tue, 7 Mar 2017 19:40:31 +0100 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 517a18e9351a..8122a1c7d2ae 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c @@ -2487,7 +2487,7 @@ int ocrdma_mbx_query_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp, if (status) goto mbx_err; rsp = (struct ocrdma_query_qp_rsp *)cmd; - memcpy(param, &rsp->params, sizeof(struct ocrdma_qp_params)); + memcpy(param, &rsp->params, sizeof(*param)); mbx_err: kfree(cmd); return status; -- 2.12.0