Skip to content

Commit 093ebfb

Browse files
Hongbo Liakpm00
authored andcommitted
nfs make use of str_false_true helper
The helper str_false_true() was introduced to return "false/true" string literal. We can simplify this format by str_false_true. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Hongbo Li <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Anna Schumaker <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Kees Cook <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 01b58b1 commit 093ebfb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

fs/nfs/nfs4xdr.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3447,7 +3447,7 @@ static int decode_attr_link_support(struct xdr_stream *xdr, uint32_t *bitmap, ui
34473447
*res = be32_to_cpup(p);
34483448
bitmap[0] &= ~FATTR4_WORD0_LINK_SUPPORT;
34493449
}
3450-
dprintk("%s: link support=%s\n", __func__, *res == 0 ? "false" : "true");
3450+
dprintk("%s: link support=%s\n", __func__, str_false_true(*res == 0));
34513451
return 0;
34523452
}
34533453

@@ -3465,7 +3465,7 @@ static int decode_attr_symlink_support(struct xdr_stream *xdr, uint32_t *bitmap,
34653465
*res = be32_to_cpup(p);
34663466
bitmap[0] &= ~FATTR4_WORD0_SYMLINK_SUPPORT;
34673467
}
3468-
dprintk("%s: symlink support=%s\n", __func__, *res == 0 ? "false" : "true");
3468+
dprintk("%s: symlink support=%s\n", __func__, str_false_true(*res == 0));
34693469
return 0;
34703470
}
34713471

@@ -3607,7 +3607,7 @@ static int decode_attr_case_insensitive(struct xdr_stream *xdr, uint32_t *bitmap
36073607
*res = be32_to_cpup(p);
36083608
bitmap[0] &= ~FATTR4_WORD0_CASE_INSENSITIVE;
36093609
}
3610-
dprintk("%s: case_insensitive=%s\n", __func__, *res == 0 ? "false" : "true");
3610+
dprintk("%s: case_insensitive=%s\n", __func__, str_false_true(*res == 0));
36113611
return 0;
36123612
}
36133613

@@ -3625,7 +3625,7 @@ static int decode_attr_case_preserving(struct xdr_stream *xdr, uint32_t *bitmap,
36253625
*res = be32_to_cpup(p);
36263626
bitmap[0] &= ~FATTR4_WORD0_CASE_PRESERVING;
36273627
}
3628-
dprintk("%s: case_preserving=%s\n", __func__, *res == 0 ? "false" : "true");
3628+
dprintk("%s: case_preserving=%s\n", __func__, str_false_true(*res == 0));
36293629
return 0;
36303630
}
36313631

@@ -4333,8 +4333,7 @@ static int decode_attr_xattrsupport(struct xdr_stream *xdr, uint32_t *bitmap,
43334333
*res = be32_to_cpup(p);
43344334
bitmap[2] &= ~FATTR4_WORD2_XATTR_SUPPORT;
43354335
}
4336-
dprintk("%s: XATTR support=%s\n", __func__,
4337-
*res == 0 ? "false" : "true");
4336+
dprintk("%s: XATTR support=%s\n", __func__, str_false_true(*res == 0));
43384337
return 0;
43394338
}
43404339

0 commit comments

Comments
 (0)