spi: Return true/false (not 1/0) from bool function
Subsystems (3)
PATCH 1/1 spi: Return true/false (not 1/0) from bool function
Return boolean values ("true" or "false") instead of 1 or 0 from bool function. This fixes the following warnings from coccicheck:
./drivers/spi/spi-s3c64xx.c:385:9-10: WARNING: return of 0/1 in function 's3c64xx_spi_can_dma' with return type bool
--- drivers/spi/spi-s3c64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-s3c64xx.c +1 -1
@@ -382,7 +382,7 @@ static bool s3c64xx_spi_can_dma(struct spi_master *master,if (sdd->rx_dma.ch && sdd->tx_dma.ch) {return xfer->len > (FIFO_LVL_MASK (sdd) >>1 ) +1 ; }else { -return 0 ; +return false; } }
Signature · 1 line
2.20.1.7.g153144c
Quoted 7 lines · Yang Li
Return boolean values ("true" or "false") instead of 1 or 0 from bool function. This fixes the following warnings from coccicheck:
./drivers/spi/spi-s3c64xx.c:385:9-10: WARNING: return of 0/1 in function '
s3c64xx_spi_can_dma' with return type boolReported-by Abaci Robot <[email protected]>
It was reported by coccinelle, not robot, wasn't it?
I cannot find this report. This is an open source work and public collaboration. The "Reported-by" usually means that the issue was reported. Usually in public. Can we see the report? Otherwise adding non-public reports is useless and clutters our report-credit-system.
Quoted 10 lines
Signed-off-by Yang Li <[email protected]>--- drivers/spi/spi-s3c64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/spi/spi-s3c64xx.c +0
-0
drivers/spi/spi-s3c64xx.c static bool s3c64xx_spi_can_dma(struct spi_master *master, · line 388
Quoted 8 lines
drivers/spi/spi-s3c64xx.c +1
-1@@ -382,7 +382,7 @@ static bool s3c64xx_spi_can_dma(struct spi_master *master,if (sdd->rx_dma.ch && sdd->tx_dma.ch) {return xfer->len > (FIFO_LVL_MASK (sdd) >>1 ) +1 ; }else { -return 0 ; +return false; } }
Best regards,
Krzysztof
Quoted 4 lines · Krzysztof Kozlowski
Quoted 3 lines · Yang Li
Return boolean values ("true" or "false") instead of 1 or 0 from bool function. This fixes the following warnings from coccicheck:
Quoted 8 lines
Quoted 4 lines
./drivers/spi/spi-s3c64xx.c:385:9-10: WARNING: return of 0/1 in function '
s3c64xx_spi_can_dma' with return type boolReported-by Abaci Robot <[email protected]>It was reported by coccinelle, not robot, wasn't it?
I cannot find this report.
Yeah, I was similarly confused by the patches on my driver. Spent some time digging through quarantine systems etc to try and find the report & couldn't.
I hope I didn't miss something.
Quoted 33 lines
This is an open source work and public
collaboration. The "Reported-by" usually means that the issue was reported. Usually in public. Can we see the report? Otherwise adding non-public reports is useless and clutters our report-credit-system.Quoted 10 lines
Signed-off-by Yang Li <[email protected]>--- drivers/spi/spi-s3c64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/spi/spi-s3c64xx.c +0
-0drivers/spi/spi-s3c64xx.c static bool s3c64xx_spi_can_dma(struct spi_master *master, · line 388
Quoted 8 lines
drivers/spi/spi-s3c64xx.c +1
-1@@ -382,7 +382,7 @@ static bool s3c64xx_spi_can_dma(struct spi_master *master,if (sdd->rx_dma.ch && sdd->tx_dma.ch) {return xfer->len > (FIFO_LVL_MASK (sdd) >>1 ) +1 ; }else { -return 0 ; +return false; } }Reviewed-by Krzysztof Kozlowski <[email protected]>Best regards,
Krzysztof