From: Varsha Rao Date: Sun, 19 Mar 2017 12:27:21 +0000 (+0530) Subject: staging: media: atomisp: Added spaces around arithmetic operators. X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=217fa187ea58aad4f649d00600e6945eaa8e8a18;p=openwrt%2Fstaging%2Fblogic.git staging: media: atomisp: Added spaces around arithmetic operators. Add spaces around arithmetic operators (/, +, -), to fix the checkpatch issue. Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2.host.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2.host.c index 1890d59e867c..992b31ee476a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2.host.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2.host.c @@ -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; } } diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c index 1a8b8522dffa..fa97224e6ed6 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c @@ -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]); } diff --git a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c index add00932f6c9..81651549a52d 100644 --- a/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c +++ b/drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c @@ -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));