drivers/gpu/drm/i915/dma: style fixes
Subsystems (2)
PATCH 1/1 drivers/gpu/drm/i915/dma: style fixes
Fixed several double space pointer notations, and added one newline
--- drivers/gpu/drm/i915/i915_dma.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +16 -14
@@ -136,7 +136,7 @@ static void i915_free_hws(struct drm_device *dev)I915_WRITE (HWS_PGA ,0x1ffff000 ); } -void i915_kernel_lost_context (struct drm_device * dev) +void i915_kernel_lost_context (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_master_private *master_priv;
@@ -164,7 +164,7 @@ void i915_kernel_lost_context(struct drm_device * dev) master_priv->sarea_priv->perf_boxes |=I915_BOX_RING_EMPTY ; } -static int i915_dma_cleanup (struct drm_device * dev) +static int i915_dma_cleanup (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;int i;
@@ -188,7 +188,7 @@ static int i915_dma_cleanup(struct drm_device * dev)return 0 ; } -static int i915_initialize (struct drm_device * dev,drm_i915_init_t * init) +static int i915_initialize (struct drm_device *dev,drm_i915_init_t *init) {struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv;
@@ -233,7 +233,7 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)return 0 ; } -static int i915_dma_resume (struct drm_device * dev) +static int i915_dma_resume (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;struct intel_engine_cs *ring =LP_RING (dev_priv);
@@ -357,7 +357,7 @@ static int validate_cmd(int cmd)return 0 ; } -static int i915_emit_cmds (struct drm_device * dev,int *buffer,int dwords) +static int i915_emit_cmds (struct drm_device *dev,int *buffer,int dwords) {struct drm_i915_private *dev_priv = dev->dev_private;int i, ret;
@@ -367,6 +367,7 @@ static int i915_emit_cmds(struct drm_device * dev, int *buffer, int dwords)for (i =0 ; i < dwords;) {int sz =validate_cmd (buffer[i]); +if (sz ==0 || i + sz > dwords)return -EINVAL ; i += sz;
@@ -451,7 +452,7 @@ static void i915_emit_breadcrumb(struct drm_device *dev) } } -static int i915_dispatch_cmdbuffer (struct drm_device * dev, +static int i915_dispatch_cmdbuffer (struct drm_device *dev,drm_i915_cmdbuffer_t *cmd,struct drm_clip_rect *cliprects,void *cmdbuf)
@@ -485,8 +486,8 @@ static int i915_dispatch_cmdbuffer(struct drm_device * dev,return 0 ; } -static int i915_dispatch_batchbuffer (struct drm_device * dev, -drm_i915_batchbuffer_t * batch, +static int i915_dispatch_batchbuffer (struct drm_device *dev, +drm_i915_batchbuffer_t *batch,struct drm_clip_rect *cliprects) {struct drm_i915_private *dev_priv = dev->dev_private;
@@ -547,7 +548,7 @@ static int i915_dispatch_batchbuffer(struct drm_device * dev,return 0 ; } -static int i915_dispatch_flip (struct drm_device * dev) +static int i915_dispatch_flip (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_master_private *master_priv =
@@ -753,7 +754,7 @@ fail_batch_free:return ret; } -static int i915_emit_irq (struct drm_device * dev) +static int i915_emit_irq (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv;
@@ -779,7 +780,7 @@ static int i915_emit_irq(struct drm_device * dev)return dev_priv->dri1.counter; } -static int i915_wait_irq (struct drm_device * dev,int irq_nr) +static int i915_wait_irq (struct drm_device *dev,int irq_nr) {struct drm_i915_private *dev_priv = dev->dev_private;struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv;
@@ -1264,6 +1265,7 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev, enum vga_switcheroo_ {struct drm_device *dev =pci_get_drvdata (pdev);pm_message_t pmm = { .event =PM_EVENT_SUSPEND }; +if (state ==VGA_SWITCHEROO_ON ) {pr_info ("switched on\n" ); dev->switch_power_state =DRM_SWITCH_POWER_CHANGING ;
@@ -1895,7 +1897,7 @@ int i915_driver_open(struct drm_device *dev, struct drm_file *file)* and DMA structures, since the kernel won't be using them, and clea * up any GEM state. */ -void i915_driver_lastclose (struct drm_device * dev) +void i915_driver_lastclose (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private;
@@ -1916,7 +1918,7 @@ void i915_driver_lastclose(struct drm_device * dev)i915_dma_cleanup (dev); } -void i915_driver_preclose (struct drm_device * dev,struct drm_file *file_priv) +void i915_driver_preclose (struct drm_device *dev,struct drm_file *file_priv) {mutex_lock (&dev->struct_mutex);i915_gem_context_close (dev, file_priv);
@@ -1993,7 +1995,7 @@ int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls);* manage the gtt, we need to claim that all intel devices are agp. For * otherwise the drm core refuses to initialize the agp support code. */ -int i915_driver_device_is_agp (struct drm_device * dev) +int i915_driver_device_is_agp (struct drm_device *dev) {return 1 ; }
Signature · 6 lines
1.9.3 -- Robin Schroer
Quoted 3 lines · Robin Schroer
Fixed several double space pointer notations, and added one newline
Signed-off-by Robin Schroer <[email protected]>
Signature · 1 line
Damien
Daniel Vetter
AppliedQuoted 6 lines · Damien Lespiau
Quoted 3 lines · Robin Schroer
Fixed several double space pointer notations, and added one newline
Signed-off-by Robin Schroer <[email protected]>Reviewed-by Damien Lespiau <[email protected]>
Queued for -next, thanks for the patch. Aside: If you want to do some janitorial tasks in drm/i915, here's a list:
http://www.x.org/wiki/DRMJanitors/
Imo pure coding-style fixes are fairly pointless, at least if their free-standing.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 8 lines · Daniel Vetter
Quoted 6 lines · Damien Lespiau
Quoted 3 lines · Robin Schroer
Fixed several double space pointer notations, and added one newline
Signed-off-by Robin Schroer <[email protected]>Reviewed-by Damien Lespiau <[email protected]>
Quoted 12 lines
Queued for -next, thanks for the patch. Aside: If you want to do some janitorial tasks in drm/i915, here's a list:
http://www.x.org/wiki/DRMJanitors/
Imo pure coding-style fixes are fairly pointless, at least if their free-standing.
-DanielSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Thanks, I'll look into it.
Signature · 1 line
Robin Schroer