]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: Code cleanup patch to fix checkpatch errors
authorShobhit Kumar <shobhit.kumar@intel.com>
Tue, 15 Apr 2014 08:24:07 +0000 (13:54 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 15 Apr 2014 19:46:09 +0000 (21:46 +0200)
This cleans up the checkpatch errors for the merged commit -

commit d3b542fcfc72d7724585e3fd2c5e75351bc3df47
Author: Shobhit Kumar <shobhit.kumar@intel.com>
Date:   Mon Apr 14 11:00:34 2014 +0530

    drm/i915: Add parsing support for new MIPI blocks in VBT

Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_bios.c

index f491e363e84da06d92dac17ba7d33bfb5a3f14dc..054dbe7fdf9b7d1fcbd7b73520aab8ebc43fb8f5 100644 (file)
@@ -643,13 +643,15 @@ static u8 *goto_next_sequence(u8 *data, int *size)
                         * skip by this element payload size
                         * skip elem id, command flag and data type
                         */
-                       if ((tmp = tmp - 5) < 0)
+                       tmp -= 5;
+                       if (tmp < 0)
                                return NULL;
 
                        data += 3;
                        len = *((u16 *)data);
 
-                       if ((tmp = tmp - len) < 0)
+                       tmp -= len;
+                       if (tmp < 0)
                                return NULL;
 
                        /* skip by len */
@@ -657,13 +659,15 @@ static u8 *goto_next_sequence(u8 *data, int *size)
                        break;
                case MIPI_SEQ_ELEM_DELAY:
                        /* skip by elem id, and delay is 4 bytes */
-                       if ((tmp = tmp - 5) < 0)
+                       tmp -= 5;
+                       if (tmp < 0)
                                return NULL;
 
                        data += 5;
                        break;
                case MIPI_SEQ_ELEM_GPIO:
-                       if ((tmp = tmp - 3) < 0)
+                       tmp -= 3;
+                       if (tmp < 0)
                                return NULL;
 
                        data += 3;