mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 23:56:59 +07:00
drivers/staging/iio: Remove unnecessary semicolon
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>
This commit is contained in:
parent
ddffeb8c4d
commit
73327b4c80
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user