From dae52f167d18d088264fb28383cdf7a22ba88cf9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 4 Oct 2021 12:13:29 +0200 Subject: [PATCH] 4.4-stable patches added patches: edac-synopsys-fix-wrong-value-type-assignment-for-edac_mode.patch --- ...-value-type-assignment-for-edac_mode.patch | 40 +++++++++++++++++++ queue-4.4/series | 1 + 2 files changed, 41 insertions(+) create mode 100644 queue-4.4/edac-synopsys-fix-wrong-value-type-assignment-for-edac_mode.patch diff --git a/queue-4.4/edac-synopsys-fix-wrong-value-type-assignment-for-edac_mode.patch b/queue-4.4/edac-synopsys-fix-wrong-value-type-assignment-for-edac_mode.patch new file mode 100644 index 00000000000..02daa006704 --- /dev/null +++ b/queue-4.4/edac-synopsys-fix-wrong-value-type-assignment-for-edac_mode.patch @@ -0,0 +1,40 @@ +From 5297cfa6bdf93e3889f78f9b482e2a595a376083 Mon Sep 17 00:00:00 2001 +From: Sai Krishna Potthuri +Date: Wed, 18 Aug 2021 12:53:14 +0530 +Subject: EDAC/synopsys: Fix wrong value type assignment for edac_mode + +From: Sai Krishna Potthuri + +commit 5297cfa6bdf93e3889f78f9b482e2a595a376083 upstream. + +dimm->edac_mode contains values of type enum edac_type - not the +corresponding capability flags. Fix that. + +Issue caught by Coverity check "enumerated type mixed with another +type." + + [ bp: Rewrite commit message, add tags. ] + +Fixes: ae9b56e3996d ("EDAC, synps: Add EDAC support for zynq ddr ecc controller") +Signed-off-by: Sai Krishna Potthuri +Signed-off-by: Shubhrajyoti Datta +Signed-off-by: Borislav Petkov +Cc: +Link: https://lkml.kernel.org/r/20210818072315.15149-1-shubhrajyoti.datta@xilinx.com +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/edac/synopsys_edac.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/edac/synopsys_edac.c ++++ b/drivers/edac/synopsys_edac.c +@@ -371,7 +371,7 @@ static int synps_edac_init_csrows(struct + + for (j = 0; j < csi->nr_channels; j++) { + dimm = csi->channels[j]->dimm; +- dimm->edac_mode = EDAC_FLAG_SECDED; ++ dimm->edac_mode = EDAC_SECDED; + dimm->mtype = synps_edac_get_mtype(priv->baseaddr); + dimm->nr_pages = (size >> PAGE_SHIFT) / csi->nr_channels; + dimm->grain = SYNPS_EDAC_ERR_GRAIN; diff --git a/queue-4.4/series b/queue-4.4/series index 85f24b17ad2..1da7ebc533d 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -33,3 +33,4 @@ ipack-ipoctal-fix-tty-registration-error-handling.patch ipack-ipoctal-fix-missing-allocation-failure-check.patch ipack-ipoctal-fix-module-reference-leak.patch ext4-fix-potential-infinite-loop-in-ext4_dx_readdir.patch +edac-synopsys-fix-wrong-value-type-assignment-for-edac_mode.patch -- 2.47.3