From: <Conor.Dooley@microchip.com>
To: <krzysztof.kozlowski@linaro.org>, <yang.lee@linux.alibaba.com>
Cc: <andi@etezian.org>, <broonie@kernel.org>,
<alim.akhtar@samsung.com>, <linux-spi@vger.kernel.org>,
<linux-samsung-soc@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <abaci@linux.alibaba.com>
Subject: Re: [PATCH -next] spi: Return true/false (not 1/0) from bool function
Date: Thu, 9 Jun 2022 15:28:10 +0000 [thread overview]
Message-ID: <e28c0a30-9d49-f366-9562-f5a254bb4b09@microchip.com> (raw)
In-Reply-To: <c0062aad-50f2-a9ea-ad04-8af9e70f8bba@linaro.org>
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
prev parent reply other threads:[~2022-06-09 15:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 6:03 Yang Li
2022-06-09 6:36 ` Krzysztof Kozlowski
2022-06-09 15:28 ` Conor.Dooley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e28c0a30-9d49-f366-9562-f5a254bb4b09@microchip.com \
--to=conor.dooley@microchip.com \
--cc=abaci@linux.alibaba.com \
--cc=alim.akhtar@samsung.com \
--cc=andi@etezian.org \
--cc=broonie@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=yang.lee@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®