staging: sm750fb: space around operator
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Fri, 7 Aug 2015 12:04:03 +0000 (17:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Aug 2015 22:12:54 +0000 (15:12 -0700)
Kernel coding style says to have a space around the operators.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/sm750.c

index 8990ff4..c16b293 100644 (file)
@@ -144,12 +144,12 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
                /* get the 16bit color of kernel means */
                u16 fg, bg;
 
-               fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800))|
-                     ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5)|
+               fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) |
+                     ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5) |
                      ((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11);
 
-               bg = ((info->cmap.red[fbcursor->image.bg_color] & 0xf800))|
-                     ((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5)|
+               bg = ((info->cmap.red[fbcursor->image.bg_color] & 0xf800)) |
+                     ((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5) |
                      ((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >> 11);
 
                cursor->setColor(cursor, fg, bg);
@@ -188,8 +188,9 @@ static void lynxfb_ops_fillrect(struct fb_info *info,
        pitch = info->fix.line_length;
        Bpp = info->var.bits_per_pixel >> 3;
 
-       color = (Bpp == 1)?region->color:((u32 *)info->pseudo_palette)[region->color];
-       rop = (region->rop != ROP_COPY) ? HW_ROP2_XOR:HW_ROP2_COPY;
+       color = (Bpp == 1) ? region->color :
+               ((u32 *)info->pseudo_palette)[region->color];
+       rop = (region->rop != ROP_COPY) ? HW_ROP2_XOR : HW_ROP2_COPY;
 
        /*
         * If not use spin_lock,system will die if user load driver
@@ -278,7 +279,7 @@ _do_work:
                spin_lock(&share->slock);
 
        share->accel.de_imageblit(&share->accel,
-                                 image->data, image->width>>3, 0,
+                                 image->data, image->width >> 3, 0,
                                  base, pitch, Bpp,
                                  image->dx, image->dy,
                                  image->width, image->height,
@@ -684,7 +685,8 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
        output = &par->output;
        crtc = &par->crtc;
 
-       crtc->vidmem_size = (share->dual)?share->vidmem_size>>1:share->vidmem_size;
+       crtc->vidmem_size = (share->dual) ? share->vidmem_size >> 1 :
+                            share->vidmem_size;
        /* setup crtc and output member */
        spec_share->hwCursor = g_hwcursor;
 
@@ -701,10 +703,12 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
        output->proc_setMode = hw_sm750_output_setMode;
        output->proc_checkMode = hw_sm750_output_checkMode;
 
-       output->proc_setBLANK = (share->revid == SM750LE_REVISION_ID)?hw_sm750le_setBLANK:hw_sm750_setBLANK;
+       output->proc_setBLANK = (share->revid == SM750LE_REVISION_ID) ?
+                                hw_sm750le_setBLANK : hw_sm750_setBLANK;
        output->clear = hw_sm750_output_clear;
        /* chip specific phase */
-       share->accel.de_wait = (share->revid == SM750LE_REVISION_ID)?hw_sm750le_deWait : hw_sm750_deWait;
+       share->accel.de_wait = (share->revid == SM750LE_REVISION_ID) ?
+                               hw_sm750le_deWait : hw_sm750_deWait;
        switch (spec_share->state.dataflow) {
        case sm750_simul_pri:
                output->paths = sm750_pnc;
@@ -814,7 +818,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
 
        pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio);
        crtc->cursor.maxH = crtc->cursor.maxW = 64;
-       crtc->cursor.size = crtc->cursor.maxH*crtc->cursor.maxW*2/8;
+       crtc->cursor.size = crtc->cursor.maxH * crtc->cursor.maxW * 2 / 8;
        crtc->cursor.disable = hw_cursor_disable;
        crtc->cursor.enable = hw_cursor_enable;
        crtc->cursor.setColor = hw_cursor_setColor;
@@ -896,13 +900,13 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
 
        /* set info */
        line_length = PADDING(crtc->line_pad,
-                             (var->xres_virtual * var->bits_per_pixel/8));
+                             (var->xres_virtual * var->bits_per_pixel / 8));
 
        info->pseudo_palette = &par->pseudo_palette[0];
        info->screen_base = crtc->vScreen;
        pr_debug("screen_base vaddr = %p\n", info->screen_base);
        info->screen_size = line_length * var->yres_virtual;
-       info->flags = FBINFO_FLAG_DEFAULT|0;
+       info->flags = FBINFO_FLAG_DEFAULT | 0;
 
        /* set info->fix */
        fix->type = FB_TYPE_PACKED_PIXELS;