Skip to content

Commit dbe37dc

Browse files
rodrigosiqueirakraxel
authored andcommitted
drm/virtio: Add spaces around operators
This patch fixes the checkpatch.pl check: virtgpu_ioctl.c:535: CHECK: spaces preferred around that '|' (ctx:VxV) virtgpu_vq.c:277: CHECK: spaces preferred around that '+' (ctx:VxV) ... Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/8402b55696b44483ba2e1f6aaeb53bf709ffbfe7.1519343668.git.rodrigosiqueiramelo@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
1 parent 601030e commit dbe37dc

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎drivers/gpu/drm/virtio/virtgpu_ioctl.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -534,34 +534,34 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev,
534534

535535
struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS] = {
536536
DRM_IOCTL_DEF_DRV(VIRTGPU_MAP, virtio_gpu_map_ioctl,
537-
DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
537+
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
538538

539539
DRM_IOCTL_DEF_DRV(VIRTGPU_EXECBUFFER, virtio_gpu_execbuffer_ioctl,
540-
DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
540+
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
541541

542542
DRM_IOCTL_DEF_DRV(VIRTGPU_GETPARAM, virtio_gpu_getparam_ioctl,
543-
DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
543+
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
544544

545545
DRM_IOCTL_DEF_DRV(VIRTGPU_RESOURCE_CREATE,
546546
virtio_gpu_resource_create_ioctl,
547-
DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
547+
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
548548

549549
DRM_IOCTL_DEF_DRV(VIRTGPU_RESOURCE_INFO, virtio_gpu_resource_info_ioctl,
550-
DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
550+
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
551551

552552
/* make transfer async to the main ring? - no sure, can we
553553
* thread these in the underlying GL
554554
*/
555555
DRM_IOCTL_DEF_DRV(VIRTGPU_TRANSFER_FROM_HOST,
556556
virtio_gpu_transfer_from_host_ioctl,
557-
DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
557+
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
558558
DRM_IOCTL_DEF_DRV(VIRTGPU_TRANSFER_TO_HOST,
559559
virtio_gpu_transfer_to_host_ioctl,
560-
DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
560+
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
561561

562562
DRM_IOCTL_DEF_DRV(VIRTGPU_WAIT, virtio_gpu_wait_ioctl,
563-
DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
563+
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
564564

565565
DRM_IOCTL_DEF_DRV(VIRTGPU_GET_CAPS, virtio_gpu_get_caps_ioctl,
566-
DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
566+
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
567567
};

‎drivers/gpu/drm/virtio/virtgpu_vq.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
274274
return -ENODEV;
275275

276276
sg_init_one(&vcmd, vbuf->buf, vbuf->size);
277-
sgs[outcnt+incnt] = &vcmd;
277+
sgs[outcnt + incnt] = &vcmd;
278278
outcnt++;
279279

280280
if (vbuf->data_size) {
@@ -709,8 +709,8 @@ void virtio_gpu_cmd_context_create(struct virtio_gpu_device *vgdev, uint32_t id,
709709
cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_CTX_CREATE);
710710
cmd_p->hdr.ctx_id = cpu_to_le32(id);
711711
cmd_p->nlen = cpu_to_le32(nlen);
712-
strncpy(cmd_p->debug_name, name, sizeof(cmd_p->debug_name)-1);
713-
cmd_p->debug_name[sizeof(cmd_p->debug_name)-1] = 0;
712+
strncpy(cmd_p->debug_name, name, sizeof(cmd_p->debug_name) - 1);
713+
cmd_p->debug_name[sizeof(cmd_p->debug_name) - 1] = 0;
714714
virtio_gpu_queue_ctrl_buffer(vgdev, vbuf);
715715
}
716716

0 commit comments

Comments
 (0)