Skip to contentSkip to conversation

iio: cros_ec: Remove unused variable

PATCH In review Paolo Cretaro 2 participants 2 messages Sep 14, 2017 – Sep 16, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: cros_ec: Remove unused variable

Fix gcc warning:
cros_ec_baro.c:130:25: warning: variable ‘ec_device’ set but not used

---
 drivers/iio/pressure/cros_ec_baro.c | 2 --
 1 file changed, 2 deletions(-)
drivers/iio/pressure/cros_ec_baro.c +0 -2
index 48b2a30f57ae..5fd32ad6c64d 100644
@@ -127,7 +127,6 @@ static int cros_ec_baro_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
-	struct cros_ec_device *ec_device;
 	struct iio_dev *indio_dev;
 	struct cros_ec_baro_state *state;
 	struct iio_chan_spec *channel;
@@ -137,7 +136,6 @@ static int cros_ec_baro_probe(struct platform_device *pdev)
 		dev_warn(dev, "No CROS EC device found.\n");
 		return -EINVAL;
 	}
-	ec_device = ec_dev->ec_dev;
 
 	indio_dev = devm_iio_device_alloc(dev, sizeof(*state));
 	if (!indio_dev)
Signature · 1 line
2.14.1
maintainer
#1 lore raw
Quoted 4 lines · On Thu, 14 Sep 2017 23:19:22 +0200 Paolo Cretaro <[email protected]> wrote:

Fix gcc warning:
cros_ec_baro.c:130:25: warning: variable ‘ec_device’ set but not used

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 24 lines
---
 drivers/iio/pressure/cros_ec_baro.c | 2 --
 1 file changed, 2 deletions(-)
drivers/iio/pressure/cros_ec_baro.c +0 -2
index 48b2a30f57ae..5fd32ad6c64d 100644
@@ -127,7 +127,6 @@ static int cros_ec_baro_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
-	struct cros_ec_device *ec_device;
 	struct iio_dev *indio_dev;
 	struct cros_ec_baro_state *state;
 	struct iio_chan_spec *channel;
@@ -137,7 +136,6 @@ static int cros_ec_baro_probe(struct platform_device *pdev)
 		dev_warn(dev, "No CROS EC device found.\n");
 		return -EINVAL;
 	}
-	ec_device = ec_dev->ec_dev;
 
 	indio_dev = devm_iio_device_alloc(dev, sizeof(*state));
 	if (!indio_dev)