Skip to content

Commit

Permalink
iio: temperature: ltc2983: remove redundant comparison to bool
Browse files Browse the repository at this point in the history
Remove redundant comparison to a boolean variable.

Fixes coccinelle warning:
drivers/iio/temperature//ltc2983.c:393:20-32: WARNING: Comparison to bool
drivers/iio/temperature//ltc2983.c:394:20-32: WARNING: Comparison to bool

Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Rohit Sarkar authored and Jonathan Cameron committed Apr 19, 2020
1 parent 4b7ef60 commit 5a464c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iio/temperature/ltc2983.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ static struct ltc2983_custom_sensor *__ltc2983_custom_sensor_new(
* For custom steinhart, the full u32 is taken. For all the others
* the MSB is discarded.
*/
const u8 n_size = (is_steinhart == true) ? 4 : 3;
const u8 e_size = (is_steinhart == true) ? sizeof(u32) : sizeof(u64);
const u8 n_size = is_steinhart ? 4 : 3;
const u8 e_size = is_steinhart ? sizeof(u32) : sizeof(u64);

n_entries = of_property_count_elems_of_size(np, propname, e_size);
/* n_entries must be an even number */
Expand Down

0 comments on commit 5a464c6

Please sign in to comment.