提交 887aaf39 编写于 作者: T Tyler Hicks 提交者: Zheng Zengkai

EDAC/dmc520: Don't print an error for each unconfigured interrupt line

stable inclusion
from stable-v5.10.121
commit dd2b1d70ef2081227ebdacb5db8ac18f9378131b
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=dd2b1d70ef2081227ebdacb5db8ac18f9378131b

--------------------------------

[ Upstream commit ad2df247 ]

The dmc520 driver requires that at least one interrupt line, out of the
ten possible, is configured. The driver prints an error and returns
-EINVAL from its .probe function if there are no interrupt lines
configured.

Don't print a KERN_ERR level message for each interrupt line that's
unconfigured as that can confuse users into thinking that there is an
error condition.

Before this change, the following KERN_ERR level messages would be
reported if only dram_ecc_errc and dram_ecc_errd were configured in the
device tree:

  dmc520 68000000.dmc: IRQ ram_ecc_errc not found
  dmc520 68000000.dmc: IRQ ram_ecc_errd not found
  dmc520 68000000.dmc: IRQ failed_access not found
  dmc520 68000000.dmc: IRQ failed_prog not found
  dmc520 68000000.dmc: IRQ link_err not
  dmc520 68000000.dmc: IRQ temperature_event not found
  dmc520 68000000.dmc: IRQ arch_fsm not found
  dmc520 68000000.dmc: IRQ phy_request not found

Fixes: 1088750d ("EDAC: Add EDAC driver for DMC520")
Reported-by: NSinan Kaya <okaya@kernel.org>
Signed-off-by: NTyler Hicks <tyhicks@linux.microsoft.com>
Signed-off-by: NBorislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220111163800.22362-1-tyhicks@linux.microsoft.comSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 23d92583
...@@ -489,7 +489,7 @@ static int dmc520_edac_probe(struct platform_device *pdev) ...@@ -489,7 +489,7 @@ static int dmc520_edac_probe(struct platform_device *pdev)
dev = &pdev->dev; dev = &pdev->dev;
for (idx = 0; idx < NUMBER_OF_IRQS; idx++) { for (idx = 0; idx < NUMBER_OF_IRQS; idx++) {
irq = platform_get_irq_byname(pdev, dmc520_irq_configs[idx].name); irq = platform_get_irq_byname_optional(pdev, dmc520_irq_configs[idx].name);
irqs[idx] = irq; irqs[idx] = irq;
masks[idx] = dmc520_irq_configs[idx].mask; masks[idx] = dmc520_irq_configs[idx].mask;
if (irq >= 0) { if (irq >= 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册