Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753530AbdCHODU (ORCPT ); Wed, 8 Mar 2017 09:03:20 -0500 Received: from mout.web.de ([212.227.15.4]:61467 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752861AbdCHODR (ORCPT ); Wed, 8 Mar 2017 09:03:17 -0500 Subject: [PATCH 21/26] IB/ocrdma: Improve another size determination in ocrdma_create_srq() 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: <53b2ab35-8b0c-5cdd-dbc9-d38c7cf9e580@users.sourceforge.net> Date: Wed, 8 Mar 2017 14:24:00 +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:uQRCwTVbLnAmQMAfgzNnF+0haIT9jUOBdBBFO/qq6IQAW25wzr3 1lMHWEOscubbMoMxTvBLqmQx/cSruSvnE/PMrnZJeYoejHf+bLU76Owol/rizxod34N6wLA 7jiotNTm+wD/N6v+9/sxr30MGTwaXi+qUe1fW4dsKvdL/uACzLqTzI/LmO6+U4A/ZCsmQVx yJxtdtixVlnHZF57YVDzw== X-UI-Out-Filterresults: notjunk:1;V01:K0:WXcbSUVpStQ=:MfVbokfqyl2OFVqjb5o3xp EYTxsm8jabUK9fDmKbEb29KoXY6MSzvcfSdxqt5SqDWqOo1S6ARn3WNtxbC2Bh3EzAF4Jfq2Q hSTrswjBviegdXU1zqNX54gYgwkrQqNJjvErXPkwp+58dylWJbgBrfY683w/FoEU2tQ2DDsGq GDfQC8O1/uL+bnYaGfNtc9BrzEZhEdxXiamXypWAaa7iNU1Wv8iPK/PnioiLsvPqEeTseNG2y Nh+PIHGYnubUtKUhgtR2oZhbOK87Oz2nXbEHvJG6VzptQsjxUSK9BD8iV8VqrtXNzWXD45Udz eNcNxnV+akgOcQFYauJaVTM2C9hde9qEJz1ynzy906WPc1QtI+STwDWP5eb0ZPWXDpkr2A4xy gX3AZBw9ucQK4dh1NOsXIoCmzckJakUfrE0Z424PY4ABM2eAO0qr4SgmYwRqkuK6rVuKMO5U0 08nW32v3B3QxbVq5jh2w88qqHbRKUnsZvTfqsHs+OWhIAc9nQDZlV8UINDKoGNjA3Zd5xtVX/ ZCyB9ANeAi8fkpMCQBjiDY26DuCW5E7SmFEg/jGXto7VdDmDRSm7SWt5NbgL8/J1fHIIQFlIG nliloRSkeUNVnqxyJfjfN8yMRDn53SZaUz0JIf2pMeb7kloDoyNvTtXBfJeY7Y4Uldr8mfwRD cUrV9Yxgho5cH/4HhoTeBld4KQDy67FQrWaBksBd33Qx1yH0kf0YxEZh0+mNp77SoxEKp4i0Z XT+Rn9p9IA+z39/6KHqvm3R/hLjCQP0Y7YmaKMVhb0UoEDKmrqzV0yzZVV0jYkRc/kiu+o+tL pTLPgLM Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1042 Lines: 27 From: Markus Elfring Date: Wed, 8 Mar 2017 10:10:50 +0100 Replace the specification of a data type 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_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index af8798fd35b1..bedc229be89d 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -1915,7 +1915,7 @@ struct ib_srq *ocrdma_create_srq(struct ib_pd *ibpd, if (srq->idx_bit_fields == NULL) goto arm_err; memset(srq->idx_bit_fields, 0xff, - srq->bit_fields_len * sizeof(u32)); + srq->bit_fields_len * sizeof(*srq->idx_bit_fields)); } if (init_attr->attr.srq_limit) { -- 2.12.0