Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1488570
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] GPU-DRM-QXL: Improve a size determination in qxl_driver_load() |
| Date | 2016-09-22 08:30 +0200 |
| Message-ID | <sk5G9-2NH-7@gated-at.bofh.it> (permalink) |
| References | <sk5G9-2NH-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.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@users.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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] GPU-DRM-QXL: Fine-tuning for three function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-22 08:30 +0200
[PATCH 2/4] GPU-DRM-QXL: Move three assignments in qxl_device_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-22 08:30 +0200
Re: [PATCH 2/4] GPU-DRM-QXL: Move three assignments in qxl_device_init() Dan Carpenter <dan.carpenter@oracle.com> - 2016-09-22 12:20 +0200
Re: GPU-DRM-QXL: Move three assignments in qxl_device_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-22 15:20 +0200
Re: GPU-DRM-QXL: Move three assignments in qxl_device_init() Gerd Hoffmann <kraxel@redhat.com> - 2016-09-22 17:50 +0200
Re: GPU-DRM-QXL: Move three assignments in qxl_device_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-22 19:20 +0200
Re: GPU-DRM-QXL: Move three assignments in qxl_device_init() Gerd Hoffmann <kraxel@redhat.com> - 2016-09-22 22:30 +0200
Re: GPU-DRM-QXL: Move three assignments in qxl_device_init() Dan Carpenter <dan.carpenter@oracle.com> - 2016-09-22 22:30 +0200
Re: GPU-DRM-QXL: Move three assignments in qxl_device_init() Sean Paul <seanpaul@chromium.org> - 2016-09-23 09:30 +0200
Re: GPU-DRM-QXL: Move three assignments in qxl_device_init() Dave Airlie <airlied@gmail.com> - 2016-09-23 10:00 +0200
Re: GPU-DRM-QXL: Move three assignments in qxl_device_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-23 11:00 +0200
Re: GPU-DRM-QXL: Move three assignments in qxl_device_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-23 10:50 +0200
Re: GPU-DRM-QXL: Move three assignments in qxl_device_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-23 10:40 +0200
[PATCH 3/4] GPU-DRM-QXL: Improve a size determination in qxl_driver_load() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-22 08:30 +0200
[PATCH 4/4] GPU-DRM-QXL: Adjust checks for null pointers in three functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-22 08:30 +0200
csiph-web