]> Pileus Git - ~andy/linux/commitdiff
drivers/staging/iio: Remove unnecessary semicolon
authorPeter Senna Tschudin <peter.senna@gmail.com>
Fri, 28 Sep 2012 09:57:00 +0000 (10:57 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 19 Oct 2012 15:18:51 +0000 (16:18 +0100)
A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r1@
statement S;
position p,p1;
@@
S@p1;@p

@script:python r2@
p << r1.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
        cocci.include_match(False)
@@
position r1.p;
@@
-;@p
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/accel/adis16201_core.c
drivers/staging/iio/accel/adis16204_core.c
drivers/staging/iio/accel/adis16209_core.c
drivers/staging/iio/accel/kxsd9.c
drivers/staging/iio/adc/mxs-lradc.c
drivers/staging/iio/cdc/ad7150.c
drivers/staging/iio/cdc/ad7152.c
drivers/staging/iio/cdc/ad7746.c
drivers/staging/iio/gyro/adis16260_core.c
drivers/staging/iio/magnetometer/hmc5843.c

index 8e37d6e04277663d7b7d135a5dd653f050a16785..5d2ae5dc380a92a36e3382f6588e499c74afb379 100644 (file)
@@ -345,7 +345,7 @@ static int adis16201_read_raw(struct iio_dev *indio_dev,
                        break;
                default:
                        return -EINVAL;
-               };
+               }
                mutex_lock(&indio_dev->mlock);
                addr = adis16201_addresses[chan->address][1];
                ret = adis16201_spi_read_reg_16(indio_dev, addr, &val16);
@@ -382,7 +382,7 @@ static int adis16201_write_raw(struct iio_dev *indio_dev,
                        break;
                default:
                        return -EINVAL;
-               };
+               }
                val16 = val & ((1 << bits) - 1);
                addr = adis16201_addresses[chan->address][1];
                return adis16201_spi_write_reg_16(indio_dev, addr, val16);
index 05bdb7c2c8e3f100953c8b0fde872ae367f26c45..c6bf6419743efddf40cb671fc451fdfb5c494796 100644 (file)
@@ -389,7 +389,7 @@ static int adis16204_write_raw(struct iio_dev *indio_dev,
                        break;
                default:
                        return -EINVAL;
-               };
+               }
                val16 = val & ((1 << bits) - 1);
                addr = adis16204_addresses[chan->address][1];
                return adis16204_spi_write_reg_16(indio_dev, addr, val16);
index b7333bfe0b2f1312a51548a731e73f2f41bd36ba..4f70efd4ed9983635ee69e87cf2eaf7ad0a2d90a 100644 (file)
@@ -295,7 +295,7 @@ static int adis16209_write_raw(struct iio_dev *indio_dev,
                        break;
                default:
                        return -EINVAL;
-               };
+               }
                val16 = val & ((1 << bits) - 1);
                addr = adis16209_addresses[chan->address][1];
                return adis16209_spi_write_reg_16(indio_dev, addr, val16);
@@ -373,7 +373,7 @@ static int adis16209_read_raw(struct iio_dev *indio_dev,
                        break;
                default:
                        return -EINVAL;
-               };
+               }
                mutex_lock(&indio_dev->mlock);
                addr = adis16209_addresses[chan->address][1];
                ret = adis16209_spi_read_reg_16(indio_dev, addr, &val16);
index fdd5fbded660ead0d4b9990774c7f840ef32eafd..e8e6e3fbcec0cb392ea4b882c34a43bbd6031619 100644 (file)
@@ -171,7 +171,7 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,
                *val2 = kxsd9_micro_scales[ret & KXSD9_FS_MASK];
                ret = IIO_VAL_INT_PLUS_MICRO;
                break;
-       };
+       }
 
 error_ret:
        return ret;
index ca7c1fa88e717b4c809a5fa50d00ed9246e8cef2..df5bba284b73055d3b821e7d86eade25749db86b 100644 (file)
@@ -351,7 +351,7 @@ static int mxs_lradc_buffer_preenable(struct iio_dev *iio)
                writel(chan_value, lradc->base + LRADC_CH(ofs));
                enable |= 1 << ofs;
                ofs++;
-       };
+       }
 
        writel(LRADC_DELAY_TRIGGER_LRADCS_MASK | LRADC_DELAY_KICK,
                lradc->base + LRADC_DELAY(0) + STMP_OFFSET_REG_CLR);
index 6a4041417d4e26e89aa30f7cd26c0d70c4beac88..c72a6c074b466de8a23232f9aeca8ea930efb35f 100644 (file)
@@ -156,7 +156,7 @@ static int ad7150_read_event_config(struct iio_dev *indio_dev, u64 event_code)
                        return !adaptive && (threshtype == 0x1);
                else
                        return !adaptive && (threshtype == 0x0);
-       };
+       }
        return -EINVAL;
 }
 
@@ -194,7 +194,7 @@ static int ad7150_write_event_params(struct iio_dev *indio_dev, u64 event_code)
                break;
        default:
                return -EINVAL;
-       };
+       }
        ret = i2c_smbus_write_byte_data(chip->client,
                                        ad7150_addresses[chan][4],
                                        sens);
@@ -257,7 +257,7 @@ static int ad7150_write_event_config(struct iio_dev *indio_dev,
        default:
                ret = -EINVAL;
                goto error_ret;
-       };
+       }
 
        cfg |= (!adaptive << 7) | (thresh_type << 5);
 
@@ -327,7 +327,7 @@ static int ad7150_write_event_value(struct iio_dev *indio_dev,
        default:
                ret = -EINVAL;
                goto error_ret;
-       };
+       }
 
        /* write back if active */
        ret = ad7150_write_event_params(indio_dev, event_code);
@@ -360,7 +360,7 @@ static ssize_t ad7150_show_timeout(struct device *dev,
                break;
        default:
                return -EINVAL;
-       };
+       }
 
        return sprintf(buf, "%d\n", value);
 }
@@ -394,7 +394,7 @@ static ssize_t ad7150_store_timeout(struct device *dev,
        default:
                ret = -EINVAL;
                goto error_ret;
-       };
+       }
 
        ret = ad7150_write_event_params(indio_dev, this_attr->address);
 error_ret:
index 98c3015116aa3d7801460804d1708866991f7bd5..288b33e8dadde7db5a11f062ade8ebe7407d994b 100644 (file)
@@ -405,7 +405,7 @@ static int ad7152_read_raw(struct iio_dev *indio_dev,
                break;
        default:
                ret = -EINVAL;
-       };
+       }
 out:
        mutex_unlock(&indio_dev->mlock);
        return ret;
index 754e11e871931e2481bf5e9cc40ec4894b9fe031..e6c11d934adac194f102a4701adb439a2cba7a62 100644 (file)
@@ -677,7 +677,7 @@ static int ad7746_read_raw(struct iio_dev *indio_dev,
                break;
        default:
                ret = -EINVAL;
-       };
+       }
 out:
        mutex_unlock(&indio_dev->mlock);
        return ret;
index 9571c03aa4cc976346d17bcb27f41d4dc4319060..ff16430a0d2e7b748098e46e3a5e9aeffd2a83f8 100644 (file)
@@ -528,7 +528,7 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
                        break;
                default:
                        return -EINVAL;
-               };
+               }
                mutex_lock(&indio_dev->mlock);
                addr = adis16260_addresses[chan->address][1];
                ret = adis16260_spi_read_reg_16(indio_dev, addr, &val16);
@@ -548,7 +548,7 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
                        break;
                default:
                        return -EINVAL;
-               };
+               }
                mutex_lock(&indio_dev->mlock);
                addr = adis16260_addresses[chan->address][2];
                ret = adis16260_spi_read_reg_16(indio_dev, addr, &val16);
index 10e095486e549af7b637535d86ab79228a1322b9..f7edf69a3bc4af28d8fb7dfb27119b924585061a 100644 (file)
@@ -555,7 +555,7 @@ static int hmc5843_read_raw(struct iio_dev *indio_dev,
                *val = 0;
                *val2 = data->variant->regval_to_nanoscale[data->range];
                return IIO_VAL_INT_PLUS_NANO;
-       };
+       }
        return -EINVAL;
 }