]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Dec 2017 10:30:45 +0000 (11:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Dec 2017 10:30:45 +0000 (11:30 +0100)
added patches:
bcache-fix-building-error-on-mips.patch

queue-4.4/bcache-fix-building-error-on-mips.patch [new file with mode: 0644]
queue-4.4/eeprom-at24-check-at24_read-write-arguments.patch
queue-4.4/series

diff --git a/queue-4.4/bcache-fix-building-error-on-mips.patch b/queue-4.4/bcache-fix-building-error-on-mips.patch
new file mode 100644 (file)
index 0000000..eabedfd
--- /dev/null
@@ -0,0 +1,72 @@
+From cf33c1ee5254c6a430bc1538232b49c3ea13e613 Mon Sep 17 00:00:00 2001
+From: Huacai Chen <chenhc@lemote.com>
+Date: Fri, 24 Nov 2017 15:14:25 -0800
+Subject: bcache: Fix building error on MIPS
+
+From: Huacai Chen <chenhc@lemote.com>
+
+commit cf33c1ee5254c6a430bc1538232b49c3ea13e613 upstream.
+
+This patch try to fix the building error on MIPS. The reason is MIPS
+has already defined the PTR macro, which conflicts with the PTR macro
+in include/uapi/linux/bcache.h.
+
+[fixed by mlyle: corrected a line-length issue]
+
+Signed-off-by: Huacai Chen <chenhc@lemote.com>
+Reviewed-by: Michael Lyle <mlyle@lyle.org>
+Signed-off-by: Michael Lyle <mlyle@lyle.org>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/bcache/alloc.c   |    2 +-
+ drivers/md/bcache/extents.c |    2 +-
+ drivers/md/bcache/journal.c |    2 +-
+ include/uapi/linux/bcache.h |    2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/md/bcache/alloc.c
++++ b/drivers/md/bcache/alloc.c
+@@ -479,7 +479,7 @@ int __bch_bucket_alloc_set(struct cache_
+               if (b == -1)
+                       goto err;
+-              k->ptr[i] = PTR(ca->buckets[b].gen,
++              k->ptr[i] = MAKE_PTR(ca->buckets[b].gen,
+                               bucket_to_sector(c, b),
+                               ca->sb.nr_this_dev);
+--- a/drivers/md/bcache/extents.c
++++ b/drivers/md/bcache/extents.c
+@@ -584,7 +584,7 @@ static bool bch_extent_merge(struct btre
+               return false;
+       for (i = 0; i < KEY_PTRS(l); i++)
+-              if (l->ptr[i] + PTR(0, KEY_SIZE(l), 0) != r->ptr[i] ||
++              if (l->ptr[i] + MAKE_PTR(0, KEY_SIZE(l), 0) != r->ptr[i] ||
+                   PTR_BUCKET_NR(b->c, l, i) != PTR_BUCKET_NR(b->c, r, i))
+                       return false;
+--- a/drivers/md/bcache/journal.c
++++ b/drivers/md/bcache/journal.c
+@@ -508,7 +508,7 @@ static void journal_reclaim(struct cache
+                       continue;
+               ja->cur_idx = next;
+-              k->ptr[n++] = PTR(0,
++              k->ptr[n++] = MAKE_PTR(0,
+                                 bucket_to_sector(c, ca->sb.d[ja->cur_idx]),
+                                 ca->sb.nr_this_dev);
+       }
+--- a/include/uapi/linux/bcache.h
++++ b/include/uapi/linux/bcache.h
+@@ -90,7 +90,7 @@ PTR_FIELD(PTR_GEN,                   0,  8)
+ #define PTR_CHECK_DEV                 ((1 << PTR_DEV_BITS) - 1)
+-#define PTR(gen, offset, dev)                                         \
++#define MAKE_PTR(gen, offset, dev)                                    \
+       ((((__u64) dev) << 51) | ((__u64) offset) << 8 | gen)
+ /* Bkey utility code */
index 87683c6a00c3a3e425fcb61e09660340c48fafe2..753eb6339787b4125d51c6d6947c3bb7e46c9740 100644 (file)
@@ -34,7 +34,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        unsigned long timeout, write_time;
        unsigned next_page;
  
-+      if (off + count > at24->chip.byte_len)
++      if (offset + count > at24->chip.byte_len)
 +              return -EINVAL;
 +
        /* Get corresponding I2C address and adjust offset */
index e0287719a1abd4c1d8edb5f5d052c8e5b77d4978..8d4dd58b3c139b524cfbd22e92b1955dfb1abdcb 100644 (file)
@@ -14,3 +14,4 @@ kvm-x86-exit-to-user-mode-on-ud-intercept-when-emulator-requires.patch
 kvm-x86-inject-exceptions-produced-by-x86_decode_insn.patch
 mmc-core-do-not-leave-the-block-driver-in-a-suspended-state.patch
 eeprom-at24-check-at24_read-write-arguments.patch
+bcache-fix-building-error-on-mips.patch