pmaports/device/linux-htc-protou/fix-boot-gcc5.patch
Ingo Feinerer 28f0e5d4e1
htc-protou: new device (HTC Desire X) (!588)
Changes in the kernel defconfig:
- disable ANDROID_PARANOID_NETWORK (removes network restrictions)
- enable CONFIG_USB_G_ANDROID and CONFIG_DIAG_CHAR (for USB networking)
- enable DEVTMPFS (needed for udev -> touch support in weston)
- enable FB_MSM_DEFAULT_DEPTH_RGB565 (for 16-bit support to avoid red
  screen)
- enable SYSVIPC (so busybox' syslogd can log to a ringbuffer in the
  kernel)
- enable VT (for virtual terminal over USB)

[ci:skip-build]: already built successfully in CI
2019-08-31 21:19:16 +02:00

25 lines
724 B
Diff

diff --git a/include/linux/unaligned/le_byteshift.h b/include/linux/unaligned/le_byteshift.h
index be376fb79..ab14cb194 100644
--- a/include/linux/unaligned/le_byteshift.h
+++ b/include/linux/unaligned/le_byteshift.h
@@ -5,17 +5,17 @@
static inline u16 __get_unaligned_le16(const u8 *p)
{
- return p[0] | p[1] << 8;
+ return p[0] + (p[1] << 8);
}
static inline u32 __get_unaligned_le32(const u8 *p)
{
- return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
+ return p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24);
}
static inline u64 __get_unaligned_le64(const u8 *p)
{
- return (u64)__get_unaligned_le32(p + 4) << 32 |
+ return ((u64)__get_unaligned_le32(p + 4) << 32) +
__get_unaligned_le32(p);
}