cifs: Return true/false (not 1/0) from bool functions
Subsystems (2)
PATCH 1/1 cifs: Return true/false (not 1/0) from bool functions
Return boolean values ("true" or "false") instead of 1 or 0 from bool functions. This fixes the following warnings from coccicheck:
./fs/cifs/file.c:4764:9-10: WARNING: return of 0/1 in function cifs_release_folio() with return type bool
Reported-by Abaci Robot <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- fs/cifs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/file.c +1 -1
@@ -4761,7 +4761,7 @@ static int cifs_write_begin(struct file *file, struct address_space *mapping,static bool cifs_release_folio (struct folio *folio,gfp_t gfp) {if (folio_test_private (folio)) -return 0 ; +return false;if (folio_test_fscache (folio)) {if (current_is_kswapd () || !(gfp & __GFP_FS))return false;
Signature · 1 line
2.20.1.7.g153144c
Do you remember which patch caused this? Perhaps one of Dave Howell's iov_iter cifs patches that was temporarily in for-next? I don't see it anymore
Quoted 25 lines · Yang Li
Return boolean values ("true" or "false") instead of 1 or 0 from bool functions. This fixes the following warnings from coccicheck:
./fs/cifs/file.c:4764:9-10: WARNING: return of 0/1 in function
cifs_release_folio()with return type boolReported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>--- fs/cifs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/cifs/file.c +1
-1@@ -4761,7 +4761,7 @@ static int cifs_write_begin(struct file *file, struct address_space *mapping,static bool cifs_release_folio (struct folio *folio,gfp_t gfp) {if (folio_test_private (folio)) -return 0 ; +return false;if (folio_test_fscache (folio)) {if (current_is_kswapd () || !(gfp & __GFP_FS))return false;