[<prev] [next>] [day] [month] [year] [list]
Message-ID: <00537ca7-1c89-b1a0-8faf-eb1c65a114ec@users.sourceforge.net>
Date: Wed, 8 Mar 2017 13:53:17 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-rdma@...r.kernel.org,
Devesh Sharma <devesh.sharma@...gotech.com>,
Doug Ledford <dledford@...hat.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
Sean Hefty <sean.hefty@...el.com>,
Selvin Xavier <selvin.xavier@...gotech.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 06/26] IB/ocrdma: Improve another size determination in
ocrdma_alloc_pd_pool()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 7 Mar 2017 19:54:38 +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 <elfring@...rs.sourceforge.net>
---
drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index 8122a1c7d2ae..56f29e06dfe4 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -1595,8 +1595,7 @@ void ocrdma_alloc_pd_pool(struct ocrdma_dev *dev)
{
int status;
- dev->pd_mgr = kzalloc(sizeof(struct ocrdma_pd_resource_mgr),
- GFP_KERNEL);
+ dev->pd_mgr = kzalloc(sizeof(*dev->pd_mgr), GFP_KERNEL);
if (!dev->pd_mgr)
return;
--
2.12.0
Powered by blists - more mailing lists