* [PATCH -next] spi: Return true/false (not 1/0) from bool function
@ 2022-06-09 6:03 ` Yang Li
0 siblings, 0 replies; 6+ messages in thread
From: Yang Li @ 2022-06-09 6:03 UTC (permalink / raw)
To: krzysztof.kozlowski
Cc: andi, broonie, alim.akhtar, linux-spi, linux-samsung-soc,
linux-arm-kernel, linux-kernel, Yang Li, Abaci Robot
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
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/spi/spi-s3c64xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 82558e37c735..28e7b7cb68a7 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -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;
}
}
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH -next] spi: Return true/false (not 1/0) from bool function
@ 2022-06-09 6:03 ` Yang Li
0 siblings, 0 replies; 6+ messages in thread
From: Yang Li @ 2022-06-09 6:03 UTC (permalink / raw)
To: krzysztof.kozlowski
Cc: andi, broonie, alim.akhtar, linux-spi, linux-samsung-soc,
linux-arm-kernel, linux-kernel, Yang Li, Abaci Robot
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
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/spi/spi-s3c64xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 82558e37c735..28e7b7cb68a7 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -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;
}
}
--
2.20.1.7.g153144c
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH -next] spi: Return true/false (not 1/0) from bool function
2022-06-09 6:03 ` Yang Li
@ 2022-06-09 6:36 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-09 6:36 UTC (permalink / raw)
To: Yang Li
Cc: andi, broonie, alim.akhtar, linux-spi, linux-samsung-soc,
linux-arm-kernel, linux-kernel, Abaci Robot
On 09/06/2022 08:03, Yang Li wrote:
> 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
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
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.
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> drivers/spi/spi-s3c64xx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index 82558e37c735..28e7b7cb68a7 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -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 <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] spi: Return true/false (not 1/0) from bool function
@ 2022-06-09 6:36 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-09 6:36 UTC (permalink / raw)
To: Yang Li
Cc: andi, broonie, alim.akhtar, linux-spi, linux-samsung-soc,
linux-arm-kernel, linux-kernel, Abaci Robot
On 09/06/2022 08:03, Yang Li wrote:
> 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
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
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.
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> drivers/spi/spi-s3c64xx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index 82558e37c735..28e7b7cb68a7 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -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 <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] spi: Return true/false (not 1/0) from bool function
2022-06-09 6:36 ` Krzysztof Kozlowski
@ 2022-06-09 15:28 ` Conor.Dooley
-1 siblings, 0 replies; 6+ messages in thread
From: Conor.Dooley @ 2022-06-09 15:28 UTC (permalink / raw)
To: krzysztof.kozlowski, yang.lee
Cc: andi, broonie, alim.akhtar, linux-spi, linux-samsung-soc,
linux-arm-kernel, linux-kernel, abaci
On 09/06/2022 07:36, Krzysztof Kozlowski wrote:
> On 09/06/2022 08:03, Yang Li wrote:
>> 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
>>
>> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
>
> 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.
> 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.
>
>
>
>> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
>> ---
>> drivers/spi/spi-s3c64xx.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
>> index 82558e37c735..28e7b7cb68a7 100644
>> --- a/drivers/spi/spi-s3c64xx.c
>> +++ b/drivers/spi/spi-s3c64xx.c
>> @@ -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 <krzysztof.kozlowski@linaro.org>
>
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] spi: Return true/false (not 1/0) from bool function
@ 2022-06-09 15:28 ` Conor.Dooley
0 siblings, 0 replies; 6+ messages in thread
From: Conor.Dooley @ 2022-06-09 15:28 UTC (permalink / raw)
To: krzysztof.kozlowski, yang.lee
Cc: andi, broonie, alim.akhtar, linux-spi, linux-samsung-soc,
linux-arm-kernel, linux-kernel, abaci
On 09/06/2022 07:36, Krzysztof Kozlowski wrote:
> On 09/06/2022 08:03, Yang Li wrote:
>> 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
>>
>> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
>
> 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.
> 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.
>
>
>
>> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
>> ---
>> drivers/spi/spi-s3c64xx.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
>> index 82558e37c735..28e7b7cb68a7 100644
>> --- a/drivers/spi/spi-s3c64xx.c
>> +++ b/drivers/spi/spi-s3c64xx.c
>> @@ -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 <krzysztof.kozlowski@linaro.org>
>
>
> Best regards,
> Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-09 15:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 6:03 [PATCH -next] spi: Return true/false (not 1/0) from bool function Yang Li
2022-06-09 6:03 ` Yang Li
2022-06-09 6:36 ` Krzysztof Kozlowski
2022-06-09 6:36 ` Krzysztof Kozlowski
2022-06-09 15:28 ` Conor.Dooley
2022-06-09 15:28 ` Conor.Dooley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.