From 36d18a29299600bc2900faaddf39cbd4646da3cb Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 11 Sep 2022 07:39:56 +0200 Subject: [PATCH] 5.10-stable patches added patches: asoc-mchp-spdiftx-fix-clang-wbitfield-constant-conversion.patch asoc-mchp-spdiftx-remove-references-to-mchp_i2s_caps.patch --- ...-clang-wbitfield-constant-conversion.patch | 51 +++++++++++++++++++ ...x-remove-references-to-mchp_i2s_caps.patch | 51 +++++++++++++++++++ queue-5.10/series | 2 + 3 files changed, 104 insertions(+) create mode 100644 queue-5.10/asoc-mchp-spdiftx-fix-clang-wbitfield-constant-conversion.patch create mode 100644 queue-5.10/asoc-mchp-spdiftx-remove-references-to-mchp_i2s_caps.patch 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 index 00000000000..3ad0e7865d5 --- /dev/null +++ b/queue-5.10/asoc-mchp-spdiftx-fix-clang-wbitfield-constant-conversion.patch @@ -0,0 +1,51 @@ +From 5c5c2baad2b55cc0a4b190266889959642298f79 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Tue, 9 Aug 2022 18:08:09 -0700 +Subject: ASoC: mchp-spdiftx: Fix clang -Wbitfield-constant-conversion + +From: Nathan Chancellor + +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 +Reviewed-by: Nick Desaulniers +Link: https://lore.kernel.org/r/20220810010809.2024482-1-nathan@kernel.org +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..d1a2977271b --- /dev/null +++ b/queue-5.10/asoc-mchp-spdiftx-remove-references-to-mchp_i2s_caps.patch @@ -0,0 +1,51 @@ +From 403fcb5118a0f4091001a537e76923031fb45eaf Mon Sep 17 00:00:00 2001 +From: Claudiu Beznea +Date: Wed, 27 Jul 2022 12:08:14 +0300 +Subject: ASoC: mchp-spdiftx: remove references to mchp_i2s_caps + +From: Claudiu Beznea + +commit 403fcb5118a0f4091001a537e76923031fb45eaf upstream. + +Remove references to struct mchp_i2s_caps as they are not used. + +Signed-off-by: Claudiu Beznea +Link: https://lore.kernel.org/r/20220727090814.2446111-3-claudiu.beznea@microchip.com +Signed-off-by: Mark Brown +Cc: Nathan Chancellor +Signed-off-by: Greg Kroah-Hartman +--- + 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)) diff --git a/queue-5.10/series b/queue-5.10/series index de5011d9736..50a6ab1e063 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -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 -- 2.47.3