kernel: Update to version 5.15.182
authorAntony Kolitsos <zeusomighty@hotmail.com>
Sat, 17 May 2025 18:18:55 +0000 (11:18 -0700)
committerDavid Bauer <mail@david-bauer.net>
Sat, 24 May 2025 14:50:43 +0000 (16:50 +0200)
Manually adapted the following patches:
   generic/backport-5.15/828-v6.4-0002-of-Update-of_device_get_modalias.patch
   generic/backport-5.15/828-v6.4-0004-of-Move-of_modalias-to-module.c.patch

changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.182

Signed-off-by: Antony Kolitsos <zeusomighty@hotmail.com>
include/kernel-5.15
target/linux/bcm27xx/patches-5.15/950-0112-net-lan78xx-Support-auto-downshift-to-100Mb-s.patch
target/linux/generic/backport-5.15/827-v6.3-0004-of-device-Ignore-modalias-of-reused-nodes.patch
target/linux/generic/backport-5.15/827-v6.3-0005-of-device-Do-not-ignore-error-code-in-of_device_ueve.patch
target/linux/generic/backport-5.15/828-v6.4-0002-of-Update-of_device_get_modalias.patch
target/linux/generic/backport-5.15/828-v6.4-0004-of-Move-of_modalias-to-module.c.patch
target/linux/generic/backport-5.15/828-v6.4-0005-of-Move-the-request-module-helper-logic-to-module.c.patch

index 09e76b7f10ad25a59b5214b673c2498fe42c7e3c..421678da5956c4a64175cdf0cf84df0acb073681 100644 (file)
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.15 = .181
-LINUX_KERNEL_HASH-5.15.181 = 3346436d9efae810195b40922c6b73001d1a4dd7e5eeb5a7e8ed85e63960da38
+LINUX_VERSION-5.15 = .182
+LINUX_KERNEL_HASH-5.15.182 = b6abfa53315a04e459070b927c58beb41f085433117d58756504d68b67f6a31e
index 94c92d27ad7b1fcbe3a72d950882122c84241b84..8727a59dc43ec27dc0ccf255e09351acbc3e4cb4 100644 (file)
@@ -31,7 +31,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
  
 --- a/drivers/net/phy/microchip.c
 +++ b/drivers/net/phy/microchip.c
-@@ -233,6 +233,7 @@ static int lan88xx_probe(struct phy_devi
+@@ -192,6 +192,7 @@ static int lan88xx_probe(struct phy_devi
        struct device *dev = &phydev->mdio.dev;
        struct lan88xx_priv *priv;
        u32 led_modes[4];
@@ -39,7 +39,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
        int len;
  
        priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-@@ -262,6 +263,32 @@ static int lan88xx_probe(struct phy_devi
+@@ -221,6 +222,32 @@ static int lan88xx_probe(struct phy_devi
                return -EINVAL;
        }
  
index 37eefc4570f9cc3c02a2135705ccbd3bc98804a0..57779dbfe8b7e8b86e2d89aa76548531a6b323e6 100644 (file)
@@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
                return -ENODEV;
  
        /* Name & Type */
-@@ -372,7 +372,7 @@ int of_device_uevent_modalias(struct dev
+@@ -373,7 +373,7 @@ int of_device_uevent_modalias(struct dev
  {
        int sl;
  
index dd5820e94a50670de079796bee5a518566ba518e..172b1d4936f33083e99b36241e0e776524997ebd 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- a/drivers/of/device.c
 +++ b/drivers/of/device.c
-@@ -381,6 +381,8 @@ int of_device_uevent_modalias(struct dev
+@@ -382,6 +382,8 @@ int of_device_uevent_modalias(struct dev
  
        sl = of_device_get_modalias(dev, &env->buf[env->buflen-1],
                                    sizeof(env->buf) - env->buflen);
index 4713cc71b1291ce6968a8f2dbcfda6aa1158e8fe..3e79b0a9f48de62854cd9e023c1a4ce52c3dc3da 100644 (file)
@@ -32,7 +32,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  {
        const char *compat;
        char *c;
-@@ -249,19 +249,16 @@ static ssize_t of_device_get_modalias(st
+@@ -249,20 +249,17 @@ static ssize_t of_device_get_modalias(st
        ssize_t csize;
        ssize_t tsize;
  
@@ -46,16 +46,17 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +      csize = snprintf(str, len, "of:N%pOFn%c%s", np, 'T',
 +                       of_node_get_device_type(np));
        tsize = csize;
+       if (csize >= len)
+               csize = len > 0 ? len - 1 : 0;
        len -= csize;
-       if (str)
-               str += csize;
+       str += csize;
  
 -      of_property_for_each_string(dev->of_node, "compatible", p, compat) {
 +      of_property_for_each_string(np, "compatible", p, compat) {
                csize = strlen(compat) + 1;
                tsize += csize;
-               if (csize > len)
-@@ -286,7 +283,10 @@ int of_device_request_module(struct devi
+               if (csize >= len)
+@@ -287,7 +284,10 @@ int of_device_request_module(struct devi
        ssize_t size;
        int ret;
  
@@ -67,7 +68,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        if (size < 0)
                return size;
  
-@@ -297,7 +297,7 @@ int of_device_request_module(struct devi
+@@ -298,7 +298,7 @@ int of_device_request_module(struct devi
        if (!str)
                return -ENOMEM;
  
@@ -76,7 +77,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        str[size - 1] = '\0';
        ret = request_module(str);
        kfree(str);
-@@ -314,7 +314,12 @@ EXPORT_SYMBOL_GPL(of_device_request_modu
+@@ -315,7 +315,12 @@ EXPORT_SYMBOL_GPL(of_device_request_modu
   */
  ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len)
  {
@@ -90,7 +91,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        if (sl < 0)
                return sl;
        if (sl > len - 2)
-@@ -379,8 +384,8 @@ int of_device_uevent_modalias(struct dev
+@@ -380,8 +385,8 @@ int of_device_uevent_modalias(struct dev
        if (add_uevent_var(env, "MODALIAS="))
                return -ENOMEM;
  
index b4554b2ecad28c7d5d27965417b65219228e9b2a..fb364d9303d6ddf8711da385a03560b9dbde5114 100644 (file)
@@ -43,7 +43,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  #include <linux/kernel.h>
  #include <linux/of.h>
  #include <linux/of_device.h>
-@@ -241,42 +240,6 @@ const void *of_device_get_match_data(con
+@@ -241,43 +240,6 @@ const void *of_device_get_match_data(con
  }
  EXPORT_SYMBOL(of_device_get_match_data);
  
@@ -60,14 +60,15 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -      csize = snprintf(str, len, "of:N%pOFn%c%s", np, 'T',
 -                       of_node_get_device_type(np));
 -      tsize = csize;
+-      if (csize >= len)
+-              csize = len > 0 ? len - 1 : 0;
 -      len -= csize;
--      if (str)
--              str += csize;
+-      str += csize;
 -
 -      of_property_for_each_string(np, "compatible", p, compat) {
 -              csize = strlen(compat) + 1;
 -              tsize += csize;
--              if (csize > len)
+-              if (csize >= len)
 -                      continue;
 -
 -              csize = snprintf(str, len, "C%s", compat);
@@ -88,7 +89,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        char *str;
 --- /dev/null
 +++ b/drivers/of/module.c
-@@ -0,0 +1,44 @@
+@@ -0,0 +1,45 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Linux kernel module helpers.
@@ -111,14 +112,15 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +      csize = snprintf(str, len, "of:N%pOFn%c%s", np, 'T',
 +                       of_node_get_device_type(np));
 +      tsize = csize;
++      if (csize >= len)
++              csize = len > 0 ? len - 1 : 0;
 +      len -= csize;
-+      if (str)
-+              str += csize;
++      str += csize;
 +
 +      of_property_for_each_string(np, "compatible", p, compat) {
 +              csize = strlen(compat) + 1;
 +              tsize += csize;
-+              if (csize > len)
++              if (csize >= len)
 +                      continue;
 +
 +              csize = snprintf(str, len, "C%s", compat);
index ad42039e112aee9f0d3e226cc8300150682373a1..5b6dceb7cb388720043bfea7a8d94d59200dc626 100644 (file)
@@ -74,7 +74,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  #include <linux/slab.h>
  #include <linux/string.h>
  
-@@ -42,3 +43,32 @@ ssize_t of_modalias(const struct device_
+@@ -43,3 +44,32 @@ ssize_t of_modalias(const struct device_
  
        return tsize;
  }