diff mbox series

[23/29] fuse: Avoid comma separated statements

Message ID 1ccd477e845fe5a114960c6088612945e1a22f23.1598331149.git.joe@perches.com (mailing list archive)
State New, archived
Headers show
Series treewide: Convert comma separated statements | expand

Commit Message

Joe Perches Aug. 25, 2020, 4:56 a.m. UTC
Use semicolons and braces.

Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/fuse/dir.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

Comments

Joe Perches Jan. 30, 2021, 7:04 p.m. UTC | #1
On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote:
> Use semicolons and braces.

ping?
 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  fs/fuse/dir.c | 24 ++++++++++++++++--------
>  1 file changed, 16 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
> index 26f028bc760b..ecb6eed832a0 100644
> --- a/fs/fuse/dir.c
> +++ b/fs/fuse/dir.c
> @@ -1362,14 +1362,22 @@ static void iattr_to_fattr(struct fuse_conn *fc, struct iattr *iattr,
>  {
>  	unsigned ivalid = iattr->ia_valid;
>  
> 
> -	if (ivalid & ATTR_MODE)
> -		arg->valid |= FATTR_MODE,   arg->mode = iattr->ia_mode;
> -	if (ivalid & ATTR_UID)
> -		arg->valid |= FATTR_UID,    arg->uid = from_kuid(fc->user_ns, iattr->ia_uid);
> -	if (ivalid & ATTR_GID)
> -		arg->valid |= FATTR_GID,    arg->gid = from_kgid(fc->user_ns, iattr->ia_gid);
> -	if (ivalid & ATTR_SIZE)
> -		arg->valid |= FATTR_SIZE,   arg->size = iattr->ia_size;
> +	if (ivalid & ATTR_MODE) {
> +		arg->valid |= FATTR_MODE;
> +		arg->mode = iattr->ia_mode;
> +	}
> +	if (ivalid & ATTR_UID) {
> +		arg->valid |= FATTR_UID;
> +		arg->uid = from_kuid(fc->user_ns, iattr->ia_uid);
> +	}
> +	if (ivalid & ATTR_GID) {
> +		arg->valid |= FATTR_GID;
> +		arg->gid = from_kgid(fc->user_ns, iattr->ia_gid);
> +	}
> +	if (ivalid & ATTR_SIZE) {
> +		arg->valid |= FATTR_SIZE;
> +		arg->size = iattr->ia_size;
> +	}
>  	if (ivalid & ATTR_ATIME) {
>  		arg->valid |= FATTR_ATIME;
>  		arg->atime = iattr->ia_atime.tv_sec;
Miklos Szeredi Feb. 1, 2021, 8:12 a.m. UTC | #2
On Tue, Aug 25, 2020 at 6:57 AM Joe Perches <joe@perches.com> wrote:
>
> Use semicolons and braces.

Reference to coding style doc?  Or other important reason?  Or just
personal preference?

Thanks,
Miklos
diff mbox series

Patch

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 26f028bc760b..ecb6eed832a0 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1362,14 +1362,22 @@  static void iattr_to_fattr(struct fuse_conn *fc, struct iattr *iattr,
 {
 	unsigned ivalid = iattr->ia_valid;
 
-	if (ivalid & ATTR_MODE)
-		arg->valid |= FATTR_MODE,   arg->mode = iattr->ia_mode;
-	if (ivalid & ATTR_UID)
-		arg->valid |= FATTR_UID,    arg->uid = from_kuid(fc->user_ns, iattr->ia_uid);
-	if (ivalid & ATTR_GID)
-		arg->valid |= FATTR_GID,    arg->gid = from_kgid(fc->user_ns, iattr->ia_gid);
-	if (ivalid & ATTR_SIZE)
-		arg->valid |= FATTR_SIZE,   arg->size = iattr->ia_size;
+	if (ivalid & ATTR_MODE) {
+		arg->valid |= FATTR_MODE;
+		arg->mode = iattr->ia_mode;
+	}
+	if (ivalid & ATTR_UID) {
+		arg->valid |= FATTR_UID;
+		arg->uid = from_kuid(fc->user_ns, iattr->ia_uid);
+	}
+	if (ivalid & ATTR_GID) {
+		arg->valid |= FATTR_GID;
+		arg->gid = from_kgid(fc->user_ns, iattr->ia_gid);
+	}
+	if (ivalid & ATTR_SIZE) {
+		arg->valid |= FATTR_SIZE;
+		arg->size = iattr->ia_size;
+	}
 	if (ivalid & ATTR_ATIME) {
 		arg->valid |= FATTR_ATIME;
 		arg->atime = iattr->ia_atime.tv_sec;