~ubuntu-branches/ubuntu/utopic/btrfs-tools/utopic-proposed

« back to all changes in this revision

Viewing changes to .pc/09-unaligned-memaccess.patch/ctree.h

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-02-11 13:27:15 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20130211132715-h04yfy61mf7scqfr
Tags: 0.19+20130117-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1086
1086
                                   type *s)                             \
1087
1087
{                                                                       \
1088
1088
        unsigned long offset = (unsigned long)s;                        \
 
1089
        u##bits m;                                                      \
1089
1090
        type *p = (type *) (eb->data + offset);                         \
1090
 
        return le##bits##_to_cpu(p->member);                            \
 
1091
        memcpy(&m, &p->member, sizeof(m));                              \
 
1092
        return le##bits##_to_cpu(m);                                    \
1091
1093
}                                                                       \
1092
1094
static inline void btrfs_set_##name(struct extent_buffer *eb,           \
1093
1095
                                    type *s, u##bits val)               \
1094
1096
{                                                                       \
1095
1097
        unsigned long offset = (unsigned long)s;                        \
 
1098
        u##bits m;                                                      \
1096
1099
        type *p = (type *) (eb->data + offset);                         \
1097
 
        p->member = cpu_to_le##bits(val);                               \
 
1100
        m = cpu_to_le##bits(val);                                       \
 
1101
        memcpy(&p->member, &m, sizeof(m));                              \
1098
1102
}
1099
1103
 
1100
1104
#define BTRFS_SETGET_STACK_FUNCS(name, type, member, bits)              \