2018-08-05 00:52:03

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH] xen/biomerge: Use true and false for boolean values

Return statements in functions returning bool should use true or false
instead of an integer value.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/xen/biomerge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/biomerge.c b/drivers/xen/biomerge.c
index 30d7f52..55ed80c 100644
--- a/drivers/xen/biomerge.c
+++ b/drivers/xen/biomerge.c
@@ -17,7 +17,7 @@ bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
* XXX: Add support for merging bio_vec when using different page
* size in Xen and Linux.
*/
- return 0;
+ return false;
#endif
}
EXPORT_SYMBOL(xen_biovec_phys_mergeable);
--
2.7.4



2018-08-06 11:43:50

by Jürgen Groß

[permalink] [raw]
Subject: Re: [PATCH] xen/biomerge: Use true and false for boolean values

On 05/08/18 02:50, Gustavo A. R. Silva wrote:
> Return statements in functions returning bool should use true or false
> instead of an integer value.
>
> This code was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Reviewed-by: Juergen Gross <[email protected]>


Juergen

2018-08-06 12:30:56

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH] xen/biomerge: Use true and false for boolean values



On 08/06/2018 06:42 AM, Juergen Gross wrote:
> On 05/08/18 02:50, Gustavo A. R. Silva wrote:
>> Return statements in functions returning bool should use true or false
>> instead of an integer value.
>>
>> This code was detected with the help of Coccinelle.
>>
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>
> Reviewed-by: Juergen Gross <[email protected]>
>

Thanks, Juergen.

--
Gustavo

2018-08-06 21:47:38

by Boris Ostrovsky

[permalink] [raw]
Subject: Re: [PATCH] xen/biomerge: Use true and false for boolean values

On 08/06/2018 07:42 AM, Juergen Gross wrote:
> On 05/08/18 02:50, Gustavo A. R. Silva wrote:
>> Return statements in functions returning bool should use true or false
>> instead of an integer value.
>>
>> This code was detected with the help of Coccinelle.
>>
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> Reviewed-by: Juergen Gross <[email protected]>


Thanks.

Applied to for-linus-4.19