[LU-4817] more leXX_to_cpu() size and usage mismatches Created: 25/Mar/14  Updated: 06/May/14  Resolved: 06/May/14

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.6.0
Fix Version/s: Lustre 2.6.0

Type: Bug Priority: Major
Reporter: John Hammond Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: endianness, lmv, osd

Severity: 3
Rank (Obsolete): 13250

 Description   
/root/lustre-release/lustre/lmv/lmv_obd.c:2870:18: warning: argument to le32_to_cpu is of type 'int'
        for (i = 0; i < le32_to_cpu(stripe_count); i++) {
                        ^
--
/root/lustre-release/lustre/mgs/mgs_nids.c:310:14: warning: argument to le64_to_cpu is of type 'u64'
                *version = le64_to_cpu(tmpver);
                           ^
--
/root/lustre-release/lustre/obdclass/acl.c:731:29: warning: argument to le16_to_cpu is of type '__u32'
                        if (le16_to_cpu(ext_header->a_entries[i].e_stat) !=
                            ^
--
/root/lustre-release/lustre/osd-ldiskfs/osd_iam_lfix.c:178:31: warning: argument to le16_to_cpu is of type 'int'
        if (ill->ill_magic == le16_to_cpu(IAM_LEAF_HEADER_MAGIC) &&
                              ^
/root/lustre-release/lustre/osd-ldiskfs/osd_iam_lfix.c:189:40: warning: argument to le16_to_cpu is of type 'int'
                       ill->ill_magic, le16_to_cpu(IAM_LEAF_HEADER_MAGIC),
                                       ^
--
/root/lustre-release/lustre/osd-ldiskfs/osd_iam_lvar.c:402:32: warning: argument to le16_to_cpu is of type 'int'
        if (head->vlh_magic == le16_to_cpu(IAM_LVAR_LEAF_MAGIC) &&
                               ^
/root/lustre-release/lustre/osd-ldiskfs/osd_iam_lvar.c:413:41: warning: argument to le16_to_cpu is of type 'int'
                       head->vlh_magic, le16_to_cpu(IAM_LVAR_LEAF_MAGIC),
                                        ^
--
/root/lustre-release/lustre/osd-ldiskfs/osd_iam_lvar.c:865:21: warning: argument to le64_to_cpu is of type '__le32'
                if (le64_to_cpu(root->vr_magic) != IAM_LVAR_ROOT_MAGIC)
                    ^
--
/root/lustre-release/lustre/osd-ldiskfs/osd_iam_lvar.c:1062:21: warning: argument to le64_to_cpu is of type 'const __le32'
                if (le64_to_cpu(root->vr_magic) == IAM_LVAR_ROOT_MAGIC) {
                    ^
--
/root/lustre-release/lustre/osd-ldiskfs/osd_quota_fmt.c:247:7: warning: argument to le32_to_cpu is of type '__u16'
        if (!le32_to_cpu(dqhead->dqdh_entries))
             ^


 Comments   
Comment by Oleg Drokin [ 26/Mar/14 ]

what tool was used here? New gcc?

Comment by John Hammond [ 26/Mar/14 ]

Clang plugin written by me.

Comment by John Hammond [ 27/Mar/14 ]

See http://review.whamcloud.com/#/c/9825/ for osd.

Generated at Sat Feb 10 01:46:06 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.