]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Sep 2022 05:39:56 +0000 (07:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Sep 2022 05:39:56 +0000 (07:39 +0200)
added patches:
asoc-mchp-spdiftx-fix-clang-wbitfield-constant-conversion.patch
asoc-mchp-spdiftx-remove-references-to-mchp_i2s_caps.patch

queue-5.10/asoc-mchp-spdiftx-fix-clang-wbitfield-constant-conversion.patch [new file with mode: 0644]
queue-5.10/asoc-mchp-spdiftx-remove-references-to-mchp_i2s_caps.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/asoc-mchp-spdiftx-fix-clang-wbitfield-constant-conversion.patch b/queue-5.10/asoc-mchp-spdiftx-fix-clang-wbitfield-constant-conversion.patch
new file mode 100644 (file)
index 0000000..3ad0e78
--- /dev/null
@@ -0,0 +1,51 @@
+From 5c5c2baad2b55cc0a4b190266889959642298f79 Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <nathan@kernel.org>
+Date: Tue, 9 Aug 2022 18:08:09 -0700
+Subject: ASoC: mchp-spdiftx: Fix clang -Wbitfield-constant-conversion
+
+From: Nathan Chancellor <nathan@kernel.org>
+
+commit 5c5c2baad2b55cc0a4b190266889959642298f79 upstream.
+
+A recent change in clang strengthened its -Wbitfield-constant-conversion
+to warn when 1 is assigned to a 1-bit signed integer bitfield, as it can
+only be 0 or -1, not 1:
+
+  sound/soc/atmel/mchp-spdiftx.c:505:20: error: implicit truncation from 'int' to bit-field changes value from 1 to -1 [-Werror,-Wbitfield-constant-conversion]
+          dev->gclk_enabled = 1;
+                            ^ ~
+  1 error generated.
+
+The actual value of the field is never checked, just that it is not
+zero, so there is not a real bug here. However, it is simple enough to
+silence the warning by making the bitfield unsigned, which matches the
+mchp-spdifrx driver.
+
+Fixes: 06ca24e98e6b ("ASoC: mchp-spdiftx: add driver for S/PDIF TX Controller")
+Link: https://github.com/ClangBuiltLinux/linux/issues/1686
+Link: https://github.com/llvm/llvm-project/commit/82afc9b169a67e8b8a1862fb9c41a2cd974d6691
+Signed-off-by: Nathan Chancellor <nathan@kernel.org>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Link: https://lore.kernel.org/r/20220810010809.2024482-1-nathan@kernel.org
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/atmel/mchp-spdiftx.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c
+index 4850a177803d..ab2d7a791f39 100644
+--- a/sound/soc/atmel/mchp-spdiftx.c
++++ b/sound/soc/atmel/mchp-spdiftx.c
+@@ -196,7 +196,7 @@ struct mchp_spdiftx_dev {
+       struct clk                              *pclk;
+       struct clk                              *gclk;
+       unsigned int                            fmt;
+-      int                                     gclk_enabled:1;
++      unsigned int                            gclk_enabled:1;
+ };
+ static inline int mchp_spdiftx_is_running(struct mchp_spdiftx_dev *dev)
+-- 
+2.37.3
+
diff --git a/queue-5.10/asoc-mchp-spdiftx-remove-references-to-mchp_i2s_caps.patch b/queue-5.10/asoc-mchp-spdiftx-remove-references-to-mchp_i2s_caps.patch
new file mode 100644 (file)
index 0000000..d1a2977
--- /dev/null
@@ -0,0 +1,51 @@
+From 403fcb5118a0f4091001a537e76923031fb45eaf Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea@microchip.com>
+Date: Wed, 27 Jul 2022 12:08:14 +0300
+Subject: ASoC: mchp-spdiftx: remove references to mchp_i2s_caps
+
+From: Claudiu Beznea <claudiu.beznea@microchip.com>
+
+commit 403fcb5118a0f4091001a537e76923031fb45eaf upstream.
+
+Remove references to struct mchp_i2s_caps as they are not used.
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
+Link: https://lore.kernel.org/r/20220727090814.2446111-3-claudiu.beznea@microchip.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Cc: Nathan Chancellor <nathan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/atmel/mchp-spdiftx.c |    8 --------
+ 1 file changed, 8 deletions(-)
+
+--- a/sound/soc/atmel/mchp-spdiftx.c
++++ b/sound/soc/atmel/mchp-spdiftx.c
+@@ -196,7 +196,6 @@ struct mchp_spdiftx_dev {
+       struct clk                              *pclk;
+       struct clk                              *gclk;
+       unsigned int                            fmt;
+-      const struct mchp_i2s_caps              *caps;
+       int                                     gclk_enabled:1;
+ };
+@@ -766,8 +765,6 @@ static const struct of_device_id mchp_sp
+ MODULE_DEVICE_TABLE(of, mchp_spdiftx_dt_ids);
+ static int mchp_spdiftx_probe(struct platform_device *pdev)
+ {
+-      struct device_node *np = pdev->dev.of_node;
+-      const struct of_device_id *match;
+       struct mchp_spdiftx_dev *dev;
+       struct resource *mem;
+       struct regmap *regmap;
+@@ -781,11 +778,6 @@ static int mchp_spdiftx_probe(struct pla
+       if (!dev)
+               return -ENOMEM;
+-      /* Get hardware capabilities. */
+-      match = of_match_node(mchp_spdiftx_dt_ids, np);
+-      if (match)
+-              dev->caps = match->data;
+-
+       /* Map I/O registers. */
+       base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem);
+       if (IS_ERR(base))
index de5011d973637e17644d81ec40b1fb1c375f4486..50a6ab1e063dbb5f46e2d7231f2c57312705d5f2 100644 (file)
@@ -66,3 +66,5 @@ nvme-tcp-fix-uaf-when-detecting-digest-errors.patch
 nvme-tcp-fix-regression-that-causes-sporadic-request.patch
 tcp-fix-early-etimedout-after-spurious-non-sack-rto.patch
 sch_sfb-also-store-skb-len-before-calling-child-enqu.patch
+asoc-mchp-spdiftx-remove-references-to-mchp_i2s_caps.patch
+asoc-mchp-spdiftx-fix-clang-wbitfield-constant-conversion.patch