staging: media: atomisp: Removed unnecessary parentheses.
authorVarsha Rao <rvarsha016@gmail.com>
Sat, 4 Mar 2017 17:04:02 +0000 (22:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 10:17:41 +0000 (11:17 +0100)
Removed parentheses on the right hand side of assignment, as they are
not required. The following coccinelle script is used to fix this issue:

@@
binary operator op = {<<,>>,+,/};
local idexpression id;
expression e1, e2;
@@

id =
-(
e1 op e2
-)

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/atomisp/i2c/gc0310.c
drivers/staging/media/atomisp/i2c/gc2235.c
drivers/staging/media/atomisp/i2c/ov2680.c
drivers/staging/media/atomisp/i2c/ov2722.c
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c
drivers/staging/media/atomisp/i2c/ov8858.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c

index 654727eda07ecc38c7d0bc8aef251c26ad8ad756..0644c6c85d10c667946095628e67d6f49b97a253 100644 (file)
@@ -904,13 +904,13 @@ static int gc0310_s_power(struct v4l2_subdev *sd, int on)
 #define LARGEST_ALLOWED_RATIO_MISMATCH 800
 static int distance(struct gc0310_resolution *res, u32 w, u32 h)
 {
-       unsigned int w_ratio = ((res->width << 13)/w);
+       unsigned int w_ratio = (res->width << 13)/w;
        unsigned int h_ratio;
        int match;
 
        if (h == 0)
                return -1;
-       h_ratio = ((res->height << 13) / h);
+       h_ratio = (res->height << 13) / h;
        if (h_ratio == 0)
                return -1;
        match   = abs(((w_ratio << 13) / h_ratio) - ((int)8192));
index 806570535a6d59df09681a71b122dccfe9015ed5..6e01d00c52b30b2528af586791410272196cef94 100644 (file)
@@ -697,13 +697,13 @@ static int gc2235_s_power(struct v4l2_subdev *sd, int on)
 #define LARGEST_ALLOWED_RATIO_MISMATCH 800
 static int distance(struct gc2235_resolution *res, u32 w, u32 h)
 {
-       unsigned int w_ratio = ((res->width << 13)/w);
+       unsigned int w_ratio = (res->width << 13)/w;
        unsigned int h_ratio;
        int match;
 
        if (h == 0)
                return -1;
-       h_ratio = ((res->height << 13) / h);
+       h_ratio = (res->height << 13) / h;
        if (h_ratio == 0)
                return -1;
        match   = abs(((w_ratio << 13) / h_ratio) - ((int)8192));
index 3f1495e31070685a867bf14449fc7bce5ec21229..434b6f868c448b7f9eff04abb92927e62a1a8a89 100644 (file)
@@ -1005,13 +1005,13 @@ static int ov2680_s_power(struct v4l2_subdev *sd, int on)
 #define LARGEST_ALLOWED_RATIO_MISMATCH 600
 static int distance(struct ov2680_resolution *res, u32 w, u32 h)
 {
-       unsigned int w_ratio = ((res->width << 13)/w);
+       unsigned int w_ratio = (res->width << 13)/w;
        unsigned int h_ratio;
        int match;
 
        if (h == 0)
                return -1;
-       h_ratio = ((res->height << 13) / h);
+       h_ratio = (res->height << 13) / h;
        if (h_ratio == 0)
                return -1;
        match   = abs(((w_ratio << 13) / h_ratio) - ((int)8192));
index 9e0d82bb8b501f80d6d73a045994d197d3504edb..a75c6bec054f6c1f84fb68844dc23b7f76b013ca 100644 (file)
@@ -801,13 +801,13 @@ static int ov2722_s_power(struct v4l2_subdev *sd, int on)
 #define LARGEST_ALLOWED_RATIO_MISMATCH 800
 static int distance(struct ov2722_resolution *res, u32 w, u32 h)
 {
-       unsigned int w_ratio = ((res->width << 13)/w);
+       unsigned int w_ratio = (res->width << 13)/w;
        unsigned int h_ratio;
        int match;
 
        if (h == 0)
                return -1;
-       h_ratio = ((res->height << 13) / h);
+       h_ratio = (res->height << 13) / h;
        if (h_ratio == 0)
                return -1;
        match   = abs(((w_ratio << 13) / h_ratio) - ((int)8192));
index f596ca1582fb492fbd1ab0a6086596ee39257644..51605ac402720c829272e91b002c4304c08529d1 100644 (file)
@@ -1506,7 +1506,7 @@ static int distance(struct ov5693_resolution *res, u32 w, u32 h)
            res->width < w || res->height < h)
                return -1;
 
-       ratio = (res->width << 13);
+       ratio = res->width << 13;
        ratio /= w;
        ratio *= h;
        ratio /= res->height;
index 8409f0d5f7bf63ccf917aec3a4d4b9acc7429e15..f2184946f8926a9996f3aefc86b8b664861a6042 100644 (file)
@@ -1250,7 +1250,7 @@ static int distance(struct ov8858_resolution const *res, const u32 w,
                res->width < w || res->height < h)
                return -1;
 
-       ratio = (res->width << 13);
+       ratio = res->width << 13;
        ratio /= w;
        ratio *= h;
        ratio /= res->height;
index 3af107d46e37f2c53bb29010f535c13ddd7d2df3..5ff25299d23139e451815590de6c65506e08bb45 100644 (file)
@@ -45,7 +45,7 @@ bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lut
 {
        uint32_t blk, i;
        const uint32_t block_size = 16;
-       const uint32_t total_blocks = (ISP_VEC_NELEMS / block_size);
+       const uint32_t total_blocks = ISP_VEC_NELEMS / block_size;
 
        /* Create VMEM LUTs from the threshold and value arrays.
         *
index 836a3b93c4274952287b1d4b8017dbb5e7f88ede..96c81ad888c45a0849ba01fe74611aecd541bbb5 100644 (file)
@@ -50,7 +50,7 @@ ia_css_macc1_5_vmem_encode(
 
        for (k = 0; k < 4; k++)
                for (i = 0; i < IA_CSS_MACC_NUM_AXES; i++) {
-                       idx = (idx_map[i] + (k*IA_CSS_MACC_NUM_AXES));
+                       idx = idx_map[i] + (k*IA_CSS_MACC_NUM_AXES);
                        j   = 4*i;
 
                        params->data[0][(idx)] = from->data[j];
index 39de3697555d6a0096588930ac75695de51991e9..8ef6c54ee8139b5def3113461fe607950198991e 100644 (file)
@@ -350,7 +350,7 @@ ia_css_s3a_vmem_decode(
        hi = isp_stats_hi;
        lo = isp_stats_lo;
 
-       chunk = (ISP_VEC_NELEMS >> host_stats->grid.deci_factor_log2);
+       chunk = ISP_VEC_NELEMS >> host_stats->grid.deci_factor_log2;
        chunk = max(chunk, 1);
 
        for (y = 0; y < out_height; y++) {
index 1210c21d8caefd69d9ca07aa217a6ac676190ab0..ee91f837a9fe94fc97a67cd435f82ffed6fd84de 100644 (file)
@@ -210,18 +210,18 @@ ia_css_mipi_frame_calculate_size(const unsigned int width,
        */
 
 
-       words_per_odd_line       = ((odd_line_bytes   + 3) >> 2);       /* ceil(odd_line_bytes/4); word = 4 bytes */
-       words_per_even_line  = ((even_line_bytes  + 3) >> 2);
+       words_per_odd_line       = (odd_line_bytes   + 3) >> 2; /* ceil(odd_line_bytes/4); word = 4 bytes */
+       words_per_even_line  = (even_line_bytes  + 3) >> 2;
        words_for_first_line = words_per_odd_line + 2 + (hasSOLandEOL ? 1 : 0);
                /* + SOF +packet header + optionally (SOL), but (EOL) is not in the first line */
        words_per_odd_line      += (1 + (hasSOLandEOL ? 2 : 0));
                /* each non-first line has format header, and optionally (SOL) and (EOL). */
        words_per_even_line += (1 + (hasSOLandEOL ? 2 : 0));
 
-       mem_words_per_odd_line   = ((words_per_odd_line + 7) >> 3);
+       mem_words_per_odd_line   = (words_per_odd_line + 7) >> 3;
                /* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
-       mem_words_for_first_line = ((words_for_first_line + 7) >> 3);
-       mem_words_per_even_line  = ((words_per_even_line + 7) >> 3);
+       mem_words_for_first_line = (words_for_first_line + 7) >> 3;
+       mem_words_per_even_line  = (words_per_even_line + 7) >> 3;
        mem_words_for_EOF        = 1; /* last line consisit of the optional (EOL) and EOF */
 
        mem_words = ((embedded_data_size_words + 7) >> 3) +
@@ -364,13 +364,13 @@ calculate_mipi_buff_size(
                even_line_bytes = odd_line_bytes;
        }
 
-       words_per_odd_line       = ((odd_line_bytes   + 3) >> 2);
+       words_per_odd_line       = (odd_line_bytes   + 3) >> 2;
                /* ceil(odd_line_bytes/4); word = 4 bytes */
-       words_per_even_line  = ((even_line_bytes  + 3) >> 2);
+       words_per_even_line  = (even_line_bytes  + 3) >> 2;
 
-       mem_words_per_odd_line   = ((words_per_odd_line + 7) >> 3);
+       mem_words_per_odd_line   = (words_per_odd_line + 7) >> 3;
                /* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
-       mem_words_per_even_line  = ((words_per_even_line + 7) >> 3);
+       mem_words_per_even_line  = (words_per_even_line + 7) >> 3;
 
        mem_words_per_buff_line =
                (mem_words_per_odd_line > mem_words_per_even_line) ? mem_words_per_odd_line : mem_words_per_even_line;