[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20b190c9-6ca9-4536-645a-10f7753fb53e@users.sourceforge.net>
Date: Tue, 16 May 2017 17:52:46 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: kvm@...r.kernel.org, linux-s390@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
Cornelia Huck <cornelia.huck@...ibm.com>,
Halil Pasic <pasic@...ux.vnet.ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 2/3] s390: virtio: Improve a size determination in
virtio_ccw_setup_vq()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 16 May 2017 17:05:01 +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/s390/virtio/virtio_ccw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c
index 447fe718c0ab..bfb845d7faa7 100644
--- a/drivers/s390/virtio/virtio_ccw.c
+++ b/drivers/s390/virtio/virtio_ccw.c
@@ -495,5 +495,5 @@ static struct virtqueue *virtio_ccw_setup_vq(struct virtio_device *vdev,
unsigned long flags;
/* Allocate queue. */
- info = kzalloc(sizeof(struct virtio_ccw_vq_info), GFP_KERNEL);
+ info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info) {
--
2.13.0
Powered by blists - more mailing lists