]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: media: Remove unneeded parentheses
authorJanani Ravichandran <janani.rvchndrn@gmail.com>
Thu, 11 Feb 2016 22:52:30 +0000 (17:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Feb 2016 04:05:35 +0000 (20:05 -0800)
Remove unneeded parentheses in assignment statements.
Semantic patch:

@@
expression a, b, c;
@@

(
  a = (b == c)
|
  a =
- (
  b
- )
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/davinci_vpfe/dm365_isif.c
drivers/staging/media/davinci_vpfe/dm365_resizer.c
drivers/staging/media/mn88472/mn88472.c
drivers/staging/media/mn88473/mn88473.c

index 99057892d88d39c7722c0f1ecc210daec6168d71..65f6ce342a00f9075738c9947c6f20be950b9884 100644 (file)
@@ -1570,7 +1570,7 @@ isif_pad_set_selection(struct v4l2_subdev *sd,
                sel->r.height = format->height;
        }
        /* adjust the width to 16 pixel boundary */
-       sel->r.width = ((sel->r.width + 15) & ~0xf);
+       sel->r.width = (sel->r.width + 15) & ~0xf;
        vpfe_isif->crop = sel->r;
        if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
                isif_set_image_window(vpfe_isif);
index a91395ce91e1d846b17c68f0e5bc00321d1e7b01..42de95e31f6f9b6cf58b414a412b92eb414f68c0 100644 (file)
@@ -404,7 +404,7 @@ resizer_calculate_down_scale_f_div_param(struct device *dev,
        param->f_div.pass[0].src_hsz = upper_h1 + o;
        param->f_div.pass[1].o_hsz = h2 - 1;
        param->f_div.pass[1].i_hps = 10 + (val1 * two_power);
-       param->f_div.pass[1].h_phs = (val - (val1 << 8));
+       param->f_div.pass[1].h_phs = val - (val1 << 8);
        param->f_div.pass[1].src_hps = upper_h1 - o;
        param->f_div.pass[1].src_hsz = upper_h2 + o;
 
@@ -425,8 +425,8 @@ resizer_configure_common_in_params(struct vpfe_resizer_device *resizer)
        param->rsz_common.hps = param->user_config.hst;
 
        if (vpfe_ipipeif_decimation_enabled(vpfe_dev))
-               param->rsz_common.hsz = (((informat->width - 1) *
-                       IPIPEIF_RSZ_CONST) / vpfe_ipipeif_get_rsz(vpfe_dev));
+               param->rsz_common.hsz = ((informat->width - 1) *
+                       IPIPEIF_RSZ_CONST) / vpfe_ipipeif_get_rsz(vpfe_dev);
        else
                param->rsz_common.hsz = informat->width - 1;
 
@@ -650,7 +650,7 @@ resizer_calculate_normal_f_div_param(struct device *dev, int input_width,
        param->f_div.pass[0].src_hsz = (input_width >> 2) + o;
        param->f_div.pass[1].o_hsz = h2 - 1;
        param->f_div.pass[1].i_hps = val1;
-       param->f_div.pass[1].h_phs = (val - (val1 << 8));
+       param->f_div.pass[1].h_phs = val - (val1 << 8);
        param->f_div.pass[1].src_hps = (input_width >> 2) - o;
        param->f_div.pass[1].src_hsz = (input_width >> 2) + o;
 
index cf2e96bcf39518e5e0fba87383b15b4fc61375bc..c2f2a63ef3ce14f1e62e1564de1a7c95e9c7b2ca 100644 (file)
@@ -96,9 +96,9 @@ static int mn88472_set_frontend(struct dvb_frontend *fe)
        /* Calculate IF registers ( (1<<24)*IF / Xtal ) */
        tmp =  div_u64(if_frequency * (u64)(1<<24) + (dev->xtal / 2),
                                   dev->xtal);
-       if_val[0] = ((tmp >> 16) & 0xff);
-       if_val[1] = ((tmp >>  8) & 0xff);
-       if_val[2] = ((tmp >>  0) & 0xff);
+       if_val[0] = (tmp >> 16) & 0xff;
+       if_val[1] = (tmp >>  8) & 0xff;
+       if_val[2] = (tmp >>  0) & 0xff;
 
        ret = regmap_write(dev->regmap[2], 0xfb, 0x13);
        ret = regmap_write(dev->regmap[2], 0xef, 0x13);
index a222e99935d2f9fb5c445ee62c9ef3df3d3a1359..68a614b3e3f0b6435f4df2b5a04826f80c717034 100644 (file)
@@ -94,9 +94,9 @@ static int mn88473_set_frontend(struct dvb_frontend *fe)
        /* Calculate IF registers ( (1<<24)*IF / Xtal ) */
        tmp =  div_u64(if_frequency * (u64)(1<<24) + (dev->xtal / 2),
                                   dev->xtal);
-       if_val[0] = ((tmp >> 16) & 0xff);
-       if_val[1] = ((tmp >>  8) & 0xff);
-       if_val[2] = ((tmp >>  0) & 0xff);
+       if_val[0] = (tmp >> 16) & 0xff;
+       if_val[1] = (tmp >>  8) & 0xff;
+       if_val[2] = (tmp >>  0) & 0xff;
 
        ret = regmap_write(dev->regmap[2], 0x05, 0x00);
        ret = regmap_write(dev->regmap[2], 0xfb, 0x13);