From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Medad CChien <medadyoung@gmail.com>,
rric@kernel.org, james.morse@arm.com, tony.luck@intel.com,
mchehab@kernel.org, bp@alien8.de, robh+dt@kernel.org,
benjaminfair@google.com, yuenn@google.com, venture@google.com,
KWLIU@nuvoton.com, YSCHU@nuvoton.com, JJLIU0@nuvoton.com,
KFTING@nuvoton.com, avifishman70@gmail.com, tmaimon77@gmail.com,
tali.perry1@gmail.com, ctcchien@nuvoton.com
Cc: devicetree@vger.kernel.org, openbmc@lists.ozlabs.org,
linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org
Subject: Re: [PATCH v3 3/3] EDAC: nuvoton: Add NPCM memory controller driver
Date: Fri, 11 Mar 2022 10:15:21 +0100 [thread overview]
Message-ID: <1f5e1e49-4ab0-5e06-fa8f-2a11b0fd1df9@canonical.com> (raw)
In-Reply-To: <20220311014245.4612-4-ctcchien@nuvoton.com>
On 11/03/2022 02:42, Medad CChien wrote:
> Add support for Nuvoton NPCM SoC.
>
> Signed-off-by: Medad CChien <ctcchien@nuvoton.com>
> ---
> drivers/edac/Kconfig | 9 +
> drivers/edac/Makefile | 1 +
> drivers/edac/npcm_edac.c | 714 +++++++++++++++++++++++++++++++++++++++
> 3 files changed, 724 insertions(+)
> create mode 100644 drivers/edac/npcm_edac.c
>
> diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
> index 58ab63642e72..757e1d160640 100644
> --- a/drivers/edac/Kconfig
> +++ b/drivers/edac/Kconfig
> @@ -539,4 +539,13 @@ config EDAC_DMC520
> Support for error detection and correction on the
> SoCs with ARM DMC-520 DRAM controller.
>
> +config EDAC_NPCM
> + tristate "Nuvoton NPCM DDR Memory Controller"
> + depends on ARCH_NPCM
|| COMPILE_TEST
(and test if it compiles)
(...)
> +
> +MODULE_DEVICE_TABLE(of, npcm_edac_of_match);
> +
> +static int npcm_edac_mc_probe(struct platform_device *pdev)
> +{
> + const struct npcm_edac_platform_data *npcm_chip;
> + struct device *dev = &pdev->dev;
> + struct edac_mc_layer layers[1];
> + const struct of_device_id *id;
> + struct priv_data *priv_data;
> + struct mem_ctl_info *mci;
> + struct resource *res;
> + void __iomem *reg;
> + int ret = -ENODEV;
> + int irq;
> +
> + id = of_match_device(npcm_edac_of_match, &pdev->dev);
> + if (!id)
> + return -ENODEV;
Why do you need it? How such case is even possible?
> +
> + npcm_chip = of_device_get_match_data(&pdev->dev);
> + if (!npcm_chip)
> + return -ENODEV;
I wonder, how is it possible to have here NULL?
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-03-11 9:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 1:42 [PATCH v3 0/3] EDAC: nuvoton: Add nuvoton NPCM memory controller driver Medad CChien
2022-03-11 1:42 ` [PATCH v3 1/3] ARM: dts: nuvoton: Add new device node Medad CChien
2022-03-11 8:58 ` Krzysztof Kozlowski
2022-03-14 5:22 ` Medad Young
2022-03-12 2:31 ` Jonathan Neuschäfer
2022-03-14 5:22 ` Medad Young
2022-03-11 1:42 ` [PATCH v3 2/3] dt-bindings: edac: nuvoton, npcm-memory-controller.yaml Medad CChien
2022-03-11 8:58 ` [PATCH v3 2/3] dt-bindings: edac: nuvoton,npcm-memory-controller.yaml Krzysztof Kozlowski
2022-03-14 5:33 ` [PATCH v3 2/3] dt-bindings: edac: nuvoton, npcm-memory-controller.yaml Medad Young
2022-03-11 13:28 ` Rob Herring
2022-03-11 13:56 ` Medad Young
2022-03-11 1:42 ` [PATCH v3 3/3] EDAC: nuvoton: Add NPCM memory controller driver Medad CChien
2022-03-11 9:15 ` Krzysztof Kozlowski [this message]
2022-03-13 20:22 ` Avi Fishman
2022-03-14 7:35 ` Krzysztof Kozlowski
2022-03-14 8:23 ` Medad Young
2022-03-14 5:32 ` Medad Young
2022-03-14 7:36 ` Krzysztof Kozlowski
2022-03-14 8:24 ` Medad Young
2022-03-11 23:25 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1f5e1e49-4ab0-5e06-fa8f-2a11b0fd1df9@canonical.com \
--to=krzysztof.kozlowski@canonical.com \
--cc=JJLIU0@nuvoton.com \
--cc=KFTING@nuvoton.com \
--cc=KWLIU@nuvoton.com \
--cc=YSCHU@nuvoton.com \
--cc=avifishman70@gmail.com \
--cc=benjaminfair@google.com \
--cc=bp@alien8.de \
--cc=ctcchien@nuvoton.com \
--cc=devicetree@vger.kernel.org \
--cc=james.morse@arm.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=medadyoung@gmail.com \
--cc=openbmc@lists.ozlabs.org \
--cc=robh+dt@kernel.org \
--cc=rric@kernel.org \
--cc=tali.perry1@gmail.com \
--cc=tmaimon77@gmail.com \
--cc=tony.luck@intel.com \
--cc=venture@google.com \
--cc=yuenn@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).