staging: media: atomisp: Added spaces around arithmetic operators.
authorVarsha Rao <rvarsha016@gmail.com>
Sun, 19 Mar 2017 12:27:21 +0000 (17:57 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Mar 2017 07:39:10 +0000 (08:39 +0100)
Add spaces around arithmetic operators (/, +, -), to fix the checkpatch
issue.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c

index 1890d59e867c335d52601fc59f565236d1a527e1..992b31ee476a9c2feb5824850d9e81041510c747 100644 (file)
@@ -44,7 +44,7 @@ static int ctc2_slope(int y1, int y0, int x1, int x0)
        const int max_slope = (1 << IA_CSS_CTC_COEF_SHIFT) - 1;
        int dy = y1 - y0;
        int dx = x1 - x0;
-       int rounding = (dx+1) >> 1;
+       int rounding = (dx + 1) >> 1;
        int dy_shift = dy << shift_val;
        int slope, dydx;
 
@@ -126,14 +126,14 @@ void ia_css_ctc2_vmem_encode(struct ia_css_isp_ctc2_vmem_params *to,
                to->y_y[0][(i << shffl_blck) + 4] = from->y_y4;
 
                to->e_y_slope[0][(i << shffl_blck)]    = dydx0;
-               to->e_y_slope[0][(i << shffl_blck) +1] = dydx1;
-               to->e_y_slope[0][(i << shffl_blck) +2] = dydx2;
-               to->e_y_slope[0][(i << shffl_blck) +3] = dydx3;
-               to->e_y_slope[0][(i << shffl_blck) +4] = dydx4;
+               to->e_y_slope[0][(i << shffl_blck) + 1] = dydx1;
+               to->e_y_slope[0][(i << shffl_blck) + 2] = dydx2;
+               to->e_y_slope[0][(i << shffl_blck) + 3] = dydx3;
+               to->e_y_slope[0][(i << shffl_blck) + 4] = dydx4;
 
                for (j = 0; j < lenght_zeros; j++) {
-                       to->y_x[0][(i << shffl_blck)+ 5 + j] = 0;
-                       to->y_y[0][(i << shffl_blck)+ 5 + j] = 0;
+                       to->y_x[0][(i << shffl_blck) + 5 + j] = 0;
+                       to->y_y[0][(i << shffl_blck) + 5 + j] = 0;
                        to->e_y_slope[0][(i << shffl_blck)+ 5 + j] = 0;
                }
        }
index 1a8b8522dffa21df0a850de91833757b17ebc8d8..fa97224e6ed6da8ef4edeaedff74c3503914cb43 100644 (file)
@@ -22,7 +22,7 @@
 #include "ia_css_xnr3.host.h"
 
 /* Maximum value for alpha on ISP interface */
-#define XNR_MAX_ALPHA  ((1 << (ISP_VEC_ELEMBITS-1)) - 1)
+#define XNR_MAX_ALPHA  ((1 << (ISP_VEC_ELEMBITS - 1)) - 1)
 
 /* Minimum value for sigma on host interface. Lower values translate to
  * max_alpha. */
@@ -78,7 +78,7 @@ compute_alpha(int sigma)
 #if defined(XNR_ATE_ROUNDING_BUG)
        int32_t alpha_unscaled;
 #else
-       int offset = sigma/2;
+       int offset = sigma / 2;
 #endif
        if (sigma < XNR_MIN_SIGMA) {
                alpha = XNR_MAX_ALPHA;
@@ -230,7 +230,7 @@ ia_css_xnr3_vmem_encode(
 
        for (j = 1; j < XNR3_LOOK_UP_TABLE_POINTS; j++) {
                assert(x[j] >= 0);
-               assert(x[j] > x[j-1]);
+               assert(x[j] > x[j - 1]);
 
        }
 
index add00932f6c9ac636f55b5b98d9e1565fbe10894..81651549a52da9720de73142134673f6997b515c 100644 (file)
@@ -56,7 +56,7 @@ static enum { PMIC_UNSET = 0, PMIC_REGULATOR, PMIC_AXP, PMIC_TI ,
        PMIC_CRYSTALCOVE } pmic_id;
 
 /* The atomisp uses type==0 for the end-of-list marker, so leave space. */
-static struct intel_v4l2_subdev_table pdata_subdevs[MAX_SUBDEVS+1];
+static struct intel_v4l2_subdev_table pdata_subdevs[MAX_SUBDEVS + 1];
 
 static const struct atomisp_platform_data pdata = {
        .subdevs = pdata_subdevs,
@@ -637,7 +637,7 @@ int gmin_get_config_var(struct device *dev, const char *var, char *out, size_t *
         else
                 ret = snprintf(var8, sizeof(var8), "gmin_%s", var);
 
-       if (ret < 0 || ret >= sizeof(var8)-1)
+       if (ret < 0 || ret >= sizeof(var8) - 1)
                return -EINVAL;
 
        /* First check a hard-coded list of board-specific variables.
@@ -654,7 +654,7 @@ int gmin_get_config_var(struct device *dev, const char *var, char *out, size_t *
 
                                if (strcmp(var8, gv->name))
                                        continue;
-                               if (vl > *out_len-1)
+                               if (vl > *out_len - 1)
                                        return -ENOSPC;
 
                                memcpy(out, gv->val, min(*out_len, vl+1));