3f5ae570bf
- Drop downstream zynqmp generic patches since zynqmp virt config superseed it: Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2020.04 * Patches dropped: 0005-zynqmp-Add-generic-target.patch 0006-tools-zynqmpbif-Add-support-for-loa.patch 0007-boo-1123170-Remove-ubifs-support-fr.patch 0008-zynqmp-generic-fix-compilation.patch 0009-boo-1144161-Remove-nand-mtd-spi-dfu.patch 0010-Kconfig-add-btrfs-to-distro-boot.patch 0011-configs-Re-sync-with-CONFIG_DISTRO_.patch 0012-configs-am335x_evm-disable-BTRFS.patch 0013-net-bcmgenet-Don-t-set-ID_MODE_DIS-.patch 0014-uboot-fs-btrfs-Use-LZO_LEN-to-repla.patch 0015-uboot-fs-btrfs-Fix-LZO-false-decomp.patch * Patches added: 0005-tools-zynqmpbif-Add-support-for-loa.patch 0006-boo-1123170-Remove-ubifs-support-fr.patch 0007-boo-1144161-Remove-nand-mtd-spi-dfu.patch 0008-Kconfig-add-btrfs-to-distro-boot.patch 0009-configs-Re-sync-with-CONFIG_DISTRO_.patch 0010-configs-am335x_evm-disable-BTRFS.patch 0011-net-bcmgenet-Don-t-set-ID_MODE_DIS-.patch 0012-uboot-fs-btrfs-Use-LZO_LEN-to-repla.patch 0013-uboot-fs-btrfs-Fix-LZO-false-decomp.patch - Follow upstream commits f7c6ee7f and be1b6c32 to unify zynq/zynqmp configs: * Update zynq configs to use generic config + device tree for u-boot-avnetultra96rev1 and u-boot-xilinxzynqmpzcu102rev10 * Use upstream u-boot-xilinxzynqmpvirt instead of downstream u-boot-xilinxzynqmpgeneric - Switch to http URLs, ftp is obsolete - Update to v2020.04: * Platfrom fixes: Amlogic, Atmel, fsl, iMX, Marvell, Mediatek, rockchip, RPi, samsung, socfpga, sunxi, Tegra, TI * EFI fixes * I2C fixes * GPIO fixes * MMC fixes * SPI fixes * USB fixes * Filesystem fixes Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2020.04 * Patches dropped: 0010-ARM-tegra-Add-NVIDIA-Jetson-Nano-De.patch 0011-net-Add-support-for-Broadcom-GENETv.patch 0012-rpi4-Update-memory-map-to-accommoda.patch 0013-rpi4-Enable-GENET-Ethernet-controll.patch 0014-Kconfig-add-btrfs-to-distro-boot.patch 0015-configs-Re-sync-with-CONFIG_DISTRO_.patch 0016-configs-am335x_evm-disable-BTRFS.patch 0017-net-phy-Fix-overlong-PHY-timeout.patch 0018-net-bcmgenet-Don-t-set-ID_MODE_DIS-.patch 0019-uboot-fs-btrfs-Use-LZO_LEN-to-repla.patch 0020-uboot-fs-btrfs-Fix-LZO-false-decomp.patch * Patches added: 0010-Kconfig-add-btrfs-to-distro-boot.patch 0011-configs-Re-sync-with-CONFIG_DISTRO_.patch 0012-configs-am335x_evm-disable-BTRFS.patch 0013-net-bcmgenet-Don-t-set-ID_MODE_DIS-.patch 0014-uboot-fs-btrfs-Use-LZO_LEN-to-repla.patch 0015-uboot-fs-btrfs-Fix-LZO-false-decomp.patch OBS-URL: https://build.opensuse.org/request/show/795564 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=96
67 lines
1.6 KiB
Diff
67 lines
1.6 KiB
Diff
From 35fec3c2ae56857f07d5f68a48da84d010a62429 Mon Sep 17 00:00:00 2001
|
|
From: Qu Wenruo <wqu@suse.com>
|
|
Date: Thu, 19 Mar 2020 20:30:05 +0800
|
|
Subject: [PATCH] uboot: fs/btrfs: Use LZO_LEN to replace immediate number
|
|
|
|
Just a cleanup. The immediate number makes my eye hurt.
|
|
|
|
Signed-off-by: Qu Wenruo <wqu@suse.com>
|
|
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
|
|
---
|
|
fs/btrfs/compression.c | 22 ++++++++++++----------
|
|
1 file changed, 12 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
|
|
index 346875d45a..4ef44ce114 100644
|
|
--- a/fs/btrfs/compression.c
|
|
+++ b/fs/btrfs/compression.c
|
|
@@ -12,36 +12,38 @@
|
|
#include <u-boot/zlib.h>
|
|
#include <asm/unaligned.h>
|
|
|
|
+/* Header for each segment, LE32, recording the compressed size */
|
|
+#define LZO_LEN 4
|
|
static u32 decompress_lzo(const u8 *cbuf, u32 clen, u8 *dbuf, u32 dlen)
|
|
{
|
|
u32 tot_len, in_len, res;
|
|
size_t out_len;
|
|
int ret;
|
|
|
|
- if (clen < 4)
|
|
+ if (clen < LZO_LEN)
|
|
return -1;
|
|
|
|
tot_len = le32_to_cpu(get_unaligned((u32 *)cbuf));
|
|
- cbuf += 4;
|
|
- clen -= 4;
|
|
- tot_len -= 4;
|
|
+ cbuf += LZO_LEN;
|
|
+ clen -= LZO_LEN;
|
|
+ tot_len -= LZO_LEN;
|
|
|
|
if (tot_len == 0 && dlen)
|
|
return -1;
|
|
- if (tot_len < 4)
|
|
+ if (tot_len < LZO_LEN)
|
|
return -1;
|
|
|
|
res = 0;
|
|
|
|
- while (tot_len > 4) {
|
|
+ while (tot_len > LZO_LEN) {
|
|
in_len = le32_to_cpu(get_unaligned((u32 *)cbuf));
|
|
- cbuf += 4;
|
|
- clen -= 4;
|
|
+ cbuf += LZO_LEN;
|
|
+ clen -= LZO_LEN;
|
|
|
|
- if (in_len > clen || tot_len < 4 + in_len)
|
|
+ if (in_len > clen || tot_len < LZO_LEN + in_len)
|
|
return -1;
|
|
|
|
- tot_len -= 4 + in_len;
|
|
+ tot_len -= (LZO_LEN + in_len);
|
|
|
|
out_len = dlen;
|
|
ret = lzo1x_decompress_safe(cbuf, in_len, dbuf, &out_len);
|