Pull misc fixes from Greg KH: "Here are three small fixes for 4.6-rc4. Two fix up some lz4 issues with big endian systems, and the remaining one resolves a minor debugfs issue that was reported. All have been in linux-next with no reported issues" * tag 'driver-core-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: lib: lz4: cleanup unaligned access efficiency detection lib: lz4: fixed zram with lz4 on big endian machines debugfs: Make automount point inodes permanently empty
Unified · Split
| @@ -457,7 +457,7 @@ struct dentry *debugfs_create_automount(const char *name, · 456 unmodified lines | ||
| 457 | 457 | if (unlikely(!inode)) |
| 458 | 458 | return failed_creating(dentry); |
| 459 | 459 | |
| 460 | − inode->i_mode = S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO; | |
| 460 | + make_empty_dir_inode(inode); | |
| 461 | 461 | inode->i_flags |= S_AUTOMOUNT; |
| 462 | 462 | inode->i_private = data; |
| 463 | 463 | dentry->d_fsdata = (void *)f; |
| @@ -11,8 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | /* |
| 12 | 12 | * Detects 64 bits mode |
| 13 | 13 | */ |
| 14 | −#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) \ | |
| 15 | − || defined(__ppc64__) || defined(__LP64__)) | |
| 14 | +#if defined(CONFIG_64BIT) | |
| 16 | 15 | #define LZ4_ARCH64 1 |
| 17 | 16 | #else |
| 18 | 17 | #define LZ4_ARCH64 0 |
| @@ -25,9 +24,7 @@ · 6 unmodified lines | ||
| 25 | 24 | typedef struct _U16_S { u16 v; } U16_S; |
| 26 | 25 | typedef struct _U32_S { u32 v; } U32_S; |
| 27 | 26 | typedef struct _U64_S { u64 v; } U64_S; |
| 28 | −#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) \ | |
| 29 | − || defined(CONFIG_ARM) && __LINUX_ARM_ARCH__ >= 6 \ | |
| 30 | − && defined(ARM_EFFICIENT_UNALIGNED_ACCESS) | |
| 27 | +#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) | |
| 31 | 28 | |
| 32 | 29 | #define A16(x) (((U16_S *)(x))->v) |
| 33 | 30 | #define A32(x) (((U32_S *)(x))->v) |
| @@ -35,6 +32,10 @@ typedef struct _U64_S { u64 v; } U64_S; · 1 unmodified line | ||
| 35 | 32 | |
| 36 | 33 | #define PUT4(s, d) (A32(d) = A32(s)) |
| 37 | 34 | #define PUT8(s, d) (A64(d) = A64(s)) |
| 35 | + | |
| 36 | +#define LZ4_READ_LITTLEENDIAN_16(d, s, p) \ | |
| 37 | + (d = s - A16(p)) | |
| 38 | + | |
| 38 | 39 | #define LZ4_WRITE_LITTLEENDIAN_16(p, v) \ |
| 39 | 40 | do { \ |
| 40 | 41 | A16(p) = v; \ |
| @@ -51,10 +52,13 @@ typedef struct _U64_S { u64 v; } U64_S; · 10 unmodified lines | ||
| 51 | 52 | #define PUT8(s, d) \ |
| 52 | 53 | put_unaligned(get_unaligned((const u64 *) s), (u64 *) d) |
| 53 | 54 | |
| 54 | −#define LZ4_WRITE_LITTLEENDIAN_16(p, v) \ | |
| 55 | − do { \ | |
| 56 | − put_unaligned(v, (u16 *)(p)); \ | |
| 57 | − p += 2; \ | |
| 55 | +#define LZ4_READ_LITTLEENDIAN_16(d, s, p) \ | |
| 56 | + (d = s - get_unaligned_le16(p)) | |
| 57 | + | |
| 58 | +#define LZ4_WRITE_LITTLEENDIAN_16(p, v) \ | |
| 59 | + do { \ | |
| 60 | + put_unaligned_le16(v, (u16 *)(p)); \ | |
| 61 | + p += 2; \ | |
| 58 | 62 | } while (0) |
| 59 | 63 | #endif |
| 60 | 64 | |
| @@ -140,9 +144,6 @@ typedef struct _U64_S { u64 v; } U64_S; · 79 unmodified lines | ||
| 140 | 144 | |
| 141 | 145 | #endif |
| 142 | 146 | |
| 143 | −#define LZ4_READ_LITTLEENDIAN_16(d, s, p) \ | |
| 144 | − (d = s - get_unaligned_le16(p)) | |
| 145 | − | |
| 146 | 147 | #define LZ4_WILDCOPY(s, d, e) \ |
| 147 | 148 | do { \ |
| 148 | 149 | LZ4_COPYPACKET(s, d); \ |