[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <424ac093-cbe5-17f8-6e03-5e25d7e04269@users.sourceforge.net>
Date: Thu, 22 Sep 2016 08:22:29 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: dri-devel@...ts.freedesktop.org,
Bhaktipriya Shridhar <bhaktipriya96@...il.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Noralf Trønnes <noralf@...nnes.org>,
Tejun Heo <tj@...nel.org>, Thierry Reding <treding@...dia.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 3/4] GPU-DRM-QXL: Improve a size determination in
qxl_driver_load()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 21 Sep 2016 22:48:34 +0200
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/gpu/drm/qxl/qxl_kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c
index 76780c2..f8f0261 100644
--- a/drivers/gpu/drm/qxl/qxl_kms.c
+++ b/drivers/gpu/drm/qxl/qxl_kms.c
@@ -306,7 +306,7 @@ int qxl_driver_load(struct drm_device *dev, unsigned long flags)
struct qxl_device *qdev;
int r;
- qdev = kzalloc(sizeof(struct qxl_device), GFP_KERNEL);
+ qdev = kzalloc(sizeof(*qdev), GFP_KERNEL);
if (qdev == NULL)
return -ENOMEM;
--
2.10.0
Powered by blists - more mailing lists