Skip to content

Commit

Permalink
cifs: cleanup a few le16 vs. le32 uses in cifsacl.c
Browse files Browse the repository at this point in the history
Cleanup some minor sparse warnings in cifsacl.c

Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Steve French committed Feb 23, 2021
1 parent bc3e9dd commit 23bda5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/cifs/cifsacl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ static int set_chmod_dacl(struct cifs_acl *pdacl, struct cifs_acl *pndacl,
num_aces++;

next_ace:
size += le32_to_cpu(pntace->size);
size += le16_to_cpu(pntace->size);
}

/* If inherited ACEs are not present, place the new ones at the tail */
Expand Down Expand Up @@ -1291,7 +1291,7 @@ static int build_sec_desc(struct cifs_ntsd *pntsd, struct cifs_ntsd *pnntsd,
ndacl_ptr->revision =
dacloffset ? dacl_ptr->revision : cpu_to_le16(ACL_REVISION);

ndacl_ptr->size = cpu_to_le32(0);
ndacl_ptr->size = cpu_to_le16(0);
ndacl_ptr->num_aces = cpu_to_le32(0);

rc = set_chmod_dacl(dacl_ptr, ndacl_ptr, owner_sid_ptr, group_sid_ptr,
Expand Down Expand Up @@ -1639,7 +1639,7 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 *pnmode,
dacl_ptr = (struct cifs_acl *)((char *)pntsd + dacloffset);
if (mode_from_sid)
nsecdesclen +=
le16_to_cpu(dacl_ptr->num_aces) * sizeof(struct cifs_ace);
le32_to_cpu(dacl_ptr->num_aces) * sizeof(struct cifs_ace);
else /* cifsacl */
nsecdesclen += le16_to_cpu(dacl_ptr->size);
}
Expand Down

0 comments on commit 23bda5e

Please sign in to comment.