From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Kevin Chen <kevin_chen@aspeedtech.com>,
lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, joel@jms.id.au, andrew@codeconstruct.com.au,
derek.kiernan@amd.com, dragan.cvetic@amd.com, arnd@arndb.de,
gregkh@linuxfoundation.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] soc: aspeed: lpc-pcc: Add PCC controller support
Date: Tue, 4 Mar 2025 22:20:59 +0100 [thread overview]
Message-ID: <7ef88ec2-24a5-4aa7-a601-d605a12768ba@wanadoo.fr> (raw)
In-Reply-To: <20250304104434.481429-4-kevin_chen@aspeedtech.com>
Le 04/03/2025 à 11:44, Kevin Chen a écrit :
> Add LPC PCC controller driver to support POST code capture.
>
> Signed-off-by: Kevin Chen <kevin_chen@aspeedtech.com>
Hi,
> + init_waitqueue_head(&pcc->wq);
> +
> + pcc->mdev_id = ida_alloc(&aspeed_pcc_ida, GFP_KERNEL);
Missing ida_free() in therror handling path and in the rmove function?
> + if (pcc->mdev_id < 0) {
> + dev_err(dev, "Couldn't allocate ID\n");
> + return pcc->mdev_id;
> + }
> +
> + pcc->mdev.parent = dev;
> + pcc->mdev.minor = MISC_DYNAMIC_MINOR;
> + pcc->mdev.name = devm_kasprintf(dev, GFP_KERNEL, "%s%d", DEVICE_NAME,
> + pcc->mdev_id);
> + pcc->mdev.fops = &pcc_fops;
> + rc = misc_register(&pcc->mdev);
> + if (rc) {
> + dev_err(dev, "Couldn't register misc device\n");
> + goto err_free_kfifo;
> + }
> +
> + rc = aspeed_pcc_enable(pcc, dev);
> + if (rc) {
> + dev_err(dev, "Couldn't enable PCC\n");
> + goto err_dereg_mdev;
> + }
> +
> + dev_set_drvdata(&pdev->dev, pcc);
> +
> + return 0;
> +
> +err_dereg_mdev:
> + misc_deregister(&pcc->mdev);
> +
> +err_free_kfifo:
> + kfifo_free(&pcc->fifo);
> +
> + return rc;
> +}
> +
> +static void aspeed_pcc_remove(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct aspeed_pcc_ctrl *pcc = dev_get_drvdata(dev);
> +
> + kfifo_free(&pcc->fifo);
> + misc_deregister(&pcc->mdev);
> +}
> +
> +static const struct of_device_id aspeed_pcc_table[] = {
> + { .compatible = "aspeed,ast2600-lpc-pcc" },
> + { },
Unneeded trailing comma after a terminator.
> +};
> +
> +static struct platform_driver aspeed_pcc_driver = {
> + .driver = {
> + .name = "aspeed-pcc",
> + .of_match_table = aspeed_pcc_table,
> + },
> + .probe = aspeed_pcc_probe,
> + .remove = aspeed_pcc_remove,
> +};
...
CJ
next prev parent reply other threads:[~2025-03-04 21:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 10:44 Add AST2600 LPC PCC support Kevin Chen
2025-03-04 10:44 ` [PATCH v2 1/3] dt-binding: aspeed: Add LPC PCC controller Kevin Chen
2025-03-05 6:38 ` Krzysztof Kozlowski
2025-03-10 1:50 ` Kevin Chen
2025-03-10 7:15 ` Krzysztof Kozlowski
2025-03-10 9:49 ` Kevin Chen
2025-03-10 11:42 ` Krzysztof Kozlowski
2025-03-11 0:22 ` Kevin Chen
2025-03-04 10:44 ` [PATCH v2 2/3] ARM: dts: aspeed-g6: Add AST2600 LPC PCC support Kevin Chen
2025-03-04 10:59 ` Krzysztof Kozlowski
2025-03-14 10:39 ` Kevin Chen
2025-03-04 10:44 ` [PATCH v2 3/3] soc: aspeed: lpc-pcc: Add PCC controller support Kevin Chen
2025-03-04 10:59 ` Krzysztof Kozlowski
2025-03-10 10:05 ` Kevin Chen
2025-03-10 11:43 ` Krzysztof Kozlowski
2025-03-11 0:17 ` Kevin Chen
2025-03-04 21:20 ` Christophe JAILLET [this message]
2025-03-10 2:15 ` Kevin Chen
2025-03-05 23:19 ` kernel test robot
2025-03-10 7:26 ` 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=7ef88ec2-24a5-4aa7-a601-d605a12768ba@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=andrew@codeconstruct.com.au \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=derek.kiernan@amd.com \
--cc=devicetree@vger.kernel.org \
--cc=dragan.cvetic@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=joel@jms.id.au \
--cc=kevin_chen@aspeedtech.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/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