[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1490790791-5694-4-git-send-email-singhalsimran0@gmail.com>
Date: Wed, 29 Mar 2017 18:03:10 +0530
From: simran singhal <singhalsimran0@...il.com>
To: jic23@...nel.org
Cc: knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
outreachy-kernel@...glegroups.com
Subject: [PATCH 3/4] iio: imu: st_lsm6dsx: Replace ternary operator with min macro
Use macro min() to get the minimum of two values for brevity and
readability.
Signed-off-by: simran singhal <singhalsimran0@...il.com>
---
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
index e959825..e11653d 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
@@ -203,7 +203,7 @@ int st_lsm6dsx_update_watermark(struct st_lsm6dsx_sensor *sensor, u16 watermark)
out:
mutex_unlock(&hw->lock);
- return err < 0 ? err : 0;
+ return min(err, 0);
}
/**
--
2.7.4
Powered by blists - more mailing lists