[PATCH v5 next 4/7] iio: sca3000: make stop_all_interrupts() return void

Harshit Mogalapalli posted 7 patches 4 days, 12 hours ago
[PATCH v5 next 4/7] iio: sca3000: make stop_all_interrupts() return void
Posted by Harshit Mogalapalli 4 days, 12 hours ago
sca3000_stop_all_interrupts() is called only from the driver remove
path and its return value is discarded, so convert the helper to return
void.

No functional change.

Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
---
v4->v5: Keep the label unchanged as its all going away in next patch [
Based on suggestion from Andy, thanks Andy.
---
 drivers/iio/accel/sca3000.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c
index 53628a0ee50a..d3e2a981874d 100644
--- a/drivers/iio/accel/sca3000.c
+++ b/drivers/iio/accel/sca3000.c
@@ -1435,7 +1435,7 @@ static const struct iio_info sca3000_info = {
 	.write_event_config = &sca3000_write_event_config,
 };
 
-static int sca3000_stop_all_interrupts(struct sca3000_state *st)
+static void sca3000_stop_all_interrupts(struct sca3000_state *st)
 {
 	int ret;
 
@@ -1443,14 +1443,13 @@ static int sca3000_stop_all_interrupts(struct sca3000_state *st)
 	ret = sca3000_read_data_short(st, SCA3000_REG_INT_MASK_ADDR, 1);
 	if (ret)
 		goto error_ret;
-	ret = sca3000_write_reg(st, SCA3000_REG_INT_MASK_ADDR,
-				(st->rx[0] &
-				 ~(SCA3000_REG_INT_MASK_RING_THREE_QUARTER |
-				   SCA3000_REG_INT_MASK_RING_HALF |
-				   SCA3000_REG_INT_MASK_ALL_INTS)));
+	sca3000_write_reg(st, SCA3000_REG_INT_MASK_ADDR,
+			  (st->rx[0] &
+			   ~(SCA3000_REG_INT_MASK_RING_THREE_QUARTER |
+			     SCA3000_REG_INT_MASK_RING_HALF |
+			     SCA3000_REG_INT_MASK_ALL_INTS)));
 error_ret:
 	mutex_unlock(&st->lock);
-	return ret;
 }
 
 static int sca3000_probe(struct spi_device *spi)
-- 
2.47.3
Re: [PATCH v5 next 4/7] iio: sca3000: make stop_all_interrupts() return void
Posted by Andy Shevchenko 4 days, 9 hours ago
On Thu, Feb 05, 2026 at 05:12:10AM -0800, Harshit Mogalapalli wrote:
> sca3000_stop_all_interrupts() is called only from the driver remove
> path and its return value is discarded, so convert the helper to return
> void.
> 
> No functional change.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko