Not sure what the thinking was here, as lost to history, but the variable is clearly not used so get rid of it. Warning seen with clang W=1 tests (may be present with other compilers and build options).
Unified · Split
| @@ -45,7 +45,6 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p) · 44 unmodified lines | ||
| 45 | 45 | { |
| 46 | 46 | struct iio_poll_func *pf = p; |
| 47 | 47 | struct iio_dev *indio_dev = pf->indio_dev; |
| 48 | − int len = 0; | |
| 49 | 48 | u16 *data; |
| 50 | 49 | |
| 51 | 50 | data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL); |
| @@ -79,7 +78,6 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p) · 27 unmodified lines | ||
| 79 | 78 | indio_dev->masklength, j); |
| 80 | 79 | /* random access read from the 'device' */ |
| 81 | 80 | data[i] = fakedata[j]; |
| 82 | − len += 2; | |
| 83 | 81 | } |
| 84 | 82 | } |
| 85 | 83 | |