Skip to content

Commit fe6e147

Browse files
Jiapeng Zhongstorulf
Jiapeng Zhong
authored andcommitted
mmc: atmel-mci: Assign boolean values to a bool variable
Fix the following coccicheck warnings: ./drivers/mmc/host/atmel-mci.c:2436:2-34: WARNING: Assignment of 0/1 to bool variable. ./drivers/mmc/host/atmel-mci.c:2425:2-20: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot <[email protected]> Signed-off-by: Jiapeng Zhong <[email protected]> Acked-by: Ludovic Desroches <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 4f9833d commit fe6e147

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

drivers/mmc/host/atmel-mci.c

+23-23
Original file line numberDiff line numberDiff line change
@@ -2401,45 +2401,45 @@ static void atmci_get_cap(struct atmel_mci *host)
24012401
dev_info(&host->pdev->dev,
24022402
"version: 0x%x\n", version);
24032403

2404-
host->caps.has_dma_conf_reg = 0;
2405-
host->caps.has_pdc = 1;
2406-
host->caps.has_cfg_reg = 0;
2407-
host->caps.has_cstor_reg = 0;
2408-
host->caps.has_highspeed = 0;
2409-
host->caps.has_rwproof = 0;
2410-
host->caps.has_odd_clk_div = 0;
2411-
host->caps.has_bad_data_ordering = 1;
2412-
host->caps.need_reset_after_xfer = 1;
2413-
host->caps.need_blksz_mul_4 = 1;
2414-
host->caps.need_notbusy_for_read_ops = 0;
2404+
host->caps.has_dma_conf_reg = false;
2405+
host->caps.has_pdc = true;
2406+
host->caps.has_cfg_reg = false;
2407+
host->caps.has_cstor_reg = false;
2408+
host->caps.has_highspeed = false;
2409+
host->caps.has_rwproof = false;
2410+
host->caps.has_odd_clk_div = false;
2411+
host->caps.has_bad_data_ordering = true;
2412+
host->caps.need_reset_after_xfer = true;
2413+
host->caps.need_blksz_mul_4 = true;
2414+
host->caps.need_notbusy_for_read_ops = false;
24152415

24162416
/* keep only major version number */
24172417
switch (version & 0xf00) {
24182418
case 0x600:
24192419
case 0x500:
2420-
host->caps.has_odd_clk_div = 1;
2420+
host->caps.has_odd_clk_div = true;
24212421
fallthrough;
24222422
case 0x400:
24232423
case 0x300:
2424-
host->caps.has_dma_conf_reg = 1;
2425-
host->caps.has_pdc = 0;
2426-
host->caps.has_cfg_reg = 1;
2427-
host->caps.has_cstor_reg = 1;
2428-
host->caps.has_highspeed = 1;
2424+
host->caps.has_dma_conf_reg = true;
2425+
host->caps.has_pdc = false;
2426+
host->caps.has_cfg_reg = true;
2427+
host->caps.has_cstor_reg = true;
2428+
host->caps.has_highspeed = true;
24292429
fallthrough;
24302430
case 0x200:
2431-
host->caps.has_rwproof = 1;
2432-
host->caps.need_blksz_mul_4 = 0;
2433-
host->caps.need_notbusy_for_read_ops = 1;
2431+
host->caps.has_rwproof = true;
2432+
host->caps.need_blksz_mul_4 = false;
2433+
host->caps.need_notbusy_for_read_ops = true;
24342434
fallthrough;
24352435
case 0x100:
2436-
host->caps.has_bad_data_ordering = 0;
2437-
host->caps.need_reset_after_xfer = 0;
2436+
host->caps.has_bad_data_ordering = false;
2437+
host->caps.need_reset_after_xfer = false;
24382438
fallthrough;
24392439
case 0x0:
24402440
break;
24412441
default:
2442-
host->caps.has_pdc = 0;
2442+
host->caps.has_pdc = false;
24432443
dev_warn(&host->pdev->dev,
24442444
"Unmanaged mci version, set minimum capabilities\n");
24452445
break;

0 commit comments

Comments
 (0)