CC: [email protected] BCC: [email protected] CC: "Darrick J. Wong" <[email protected]> CC: [email protected] TO: "Darrick J. Wong" <[email protected]> CC: [email protected] CC: [email protected]
From: kernel test robot <[email protected]> fs/xfs/xfs_xchgrange.c:188:11-12: WARNING opportunity for max() fs/xfs/xfs_xchgrange.c:189:11-12: WARNING opportunity for max() Check for opencoded min(), max() implementations. Generated patches sometimes require adding a cast to fix compile warning. Warnings/patches scope intentionally limited to a function body. Generated by: scripts/coccinelle/misc/minmax.cocci Fixes: dc98c6fbde75 ("xfs: add a ->xchg_file_range handler") Reported-by: kernel test robot <[email protected]> Signed-off-by: kernel test robot <[email protected]> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git vectorized-scrub head: 1fcd9cea011a657d62ee332d161966c1ec92ffd5 commit: dc98c6fbde756f897c44e3dd35ec541b09b86458 [199/401] xfs: add a ->xchg_file_range handler :::::: branch date: 3 days ago :::::: commit date: 3 days ago Please take the patch only if it's a positive warning. Thanks! fs/xfs/xfs_xchgrange.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/xfs/xfs_xchgrange.c +++ b/fs/xfs/xfs_xchgrange.c @@ -185,8 +185,8 @@ xfs_xchg_range_reserve_quota( rdelta = res->ip2_rtbcount - res->ip1_rtbcount; if (ddelta > 0 || rdelta > 0) { error = xfs_trans_reserve_quota_nblks(tp, req->ip1, - ddelta > 0 ? ddelta : 0, - rdelta > 0 ? rdelta : 0, + max(ddelta, 0), + max(rdelta, 0), false); if (error == -EDQUOT || error == -ENOSPC) { /* _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
