Re: [PATCH] btrfs: turn btrfs_destroy_all_ordered_extents() into void functions

2021-03-02 Thread David Sterba
On Tue, Mar 02, 2021 at 04:57:56PM +0800, Yang Li wrote: > These functions always return '0' and no callers use the return > value. So make it a void function. The reasoning needs to go the other way around: you can make a function return void iff all callees also return void and don't do BUG_ON i

[PATCH] btrfs: turn btrfs_destroy_all_ordered_extents() into void functions

2021-03-02 Thread Yang Li
These functions always return '0' and no callers use the return value. So make it a void function. It fixes the following warning detected by coccinelle: ./fs/btrfs/disk-io.c:4522:5-8: Unneeded variable: "ret". Return "0" on line 4530 Reported-by: Abaci Robot Signed-off-by: Yang Li --- fs/btrfs