media: i2c: tda1997x.c: Fix assignment of 0/1 to bool variable
authorDaniel W. S. Almeida <dwlsalmeida@gmail.com>
Fri, 7 Aug 2020 08:35:44 +0000 (10:35 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 29 Aug 2020 06:03:39 +0000 (08:03 +0200)
Fix the following coccinelle reports:

drivers/media/i2c/tda1997x.c:911:6-21:
WARNING: Assignment of 0/1 to bool variable

drivers/media/i2c/tda1997x.c:939:2-17:
WARNING: Assignment of 0/1 to bool variable

drivers/media/i2c/tda1997x.c:947:4-19:
WARNING: Assignment of 0/1 to bool variable

Replace assignment to 1 with true and assignment to 0 with false.

Found using - Coccinelle (http://coccinelle.lip6.fr)

Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/tda1997x.c

index 5e68182..483cc19 100644 (file)
@@ -908,7 +908,7 @@ tda1997x_configure_audout(struct v4l2_subdev *sd, u8 channel_assignment)
 {
        struct tda1997x_state *state = to_state(sd);
        struct tda1997x_platform_data *pdata = &state->pdata;
-       bool sp_used_by_fifo = 1;
+       bool sp_used_by_fifo = true;
        u8 reg;
 
        if (!pdata->audout_format)
@@ -936,7 +936,7 @@ tda1997x_configure_audout(struct v4l2_subdev *sd, u8 channel_assignment)
                break;
        case AUDCFG_TYPE_DST:
                reg |= AUDCFG_TYPE_DST << AUDCFG_TYPE_SHIFT;
-               sp_used_by_fifo = 0;
+               sp_used_by_fifo = false;
                break;
        case AUDCFG_TYPE_HBR:
                reg |= AUDCFG_TYPE_HBR << AUDCFG_TYPE_SHIFT;
@@ -944,7 +944,7 @@ tda1997x_configure_audout(struct v4l2_subdev *sd, u8 channel_assignment)
                        /* demuxed via AP0:AP3 */
                        reg |= AUDCFG_HBR_DEMUX << AUDCFG_HBR_SHIFT;
                        if (pdata->audout_format == AUDFMT_TYPE_SPDIF)
-                               sp_used_by_fifo = 0;
+                               sp_used_by_fifo = false;
                } else {
                        /* straight via AP0 */
                        reg |= AUDCFG_HBR_STRAIGHT << AUDCFG_HBR_SHIFT;