diff options
author | Jason Yan <yanaijie@huawei.com> | 2020-04-20 12:28:16 +0800 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2020-04-26 10:15:37 +0200 |
commit | 1b9e68533299253f5c7d87ccc4cd39ed0dccb37d (patch) | |
tree | abb72ac05ee6590a169d3acd72b242e672497439 /drivers/i2c/busses/i2c-qup.c | |
parent | aef6f2e7cec184fac0ef50958b759e9605ed8128 (diff) | |
download | lwn-1b9e68533299253f5c7d87ccc4cd39ed0dccb37d.tar.gz lwn-1b9e68533299253f5c7d87ccc4cd39ed0dccb37d.zip |
i2c: qup: remove unneeded conversion to bool
The '>' expression itself is bool, no need to convert it to bool again.
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-qup.c')
-rw-r--r-- | drivers/i2c/busses/i2c-qup.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c index 0e3525fe613f..fbc04b60cfd1 100644 --- a/drivers/i2c/busses/i2c-qup.c +++ b/drivers/i2c/busses/i2c-qup.c @@ -956,10 +956,8 @@ static void qup_i2c_conf_v1(struct qup_i2c_dev *qup) u32 qup_config = I2C_MINI_CORE | I2C_N_VAL; u32 io_mode = QUP_REPACK_EN; - blk->is_tx_blk_mode = - blk->total_tx_len > qup->out_fifo_sz ? true : false; - blk->is_rx_blk_mode = - blk->total_rx_len > qup->in_fifo_sz ? true : false; + blk->is_tx_blk_mode = blk->total_tx_len > qup->out_fifo_sz; + blk->is_rx_blk_mode = blk->total_rx_len > qup->in_fifo_sz; if (blk->is_tx_blk_mode) { io_mode |= QUP_OUTPUT_BLK_MODE; @@ -1528,9 +1526,9 @@ qup_i2c_determine_mode_v2(struct qup_i2c_dev *qup, qup->use_dma = true; } else { qup->blk.is_tx_blk_mode = max_tx_len > qup->out_fifo_sz - - QUP_MAX_TAGS_LEN ? true : false; + QUP_MAX_TAGS_LEN; qup->blk.is_rx_blk_mode = max_rx_len > qup->in_fifo_sz - - READ_RX_TAGS_LEN ? true : false; + READ_RX_TAGS_LEN; } return 0; |