lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PSAPR06MB49497EF12121AA18F21361A289D62@PSAPR06MB4949.apcprd06.prod.outlook.com>
Date: Mon, 10 Mar 2025 02:15:31 +0000
From: Kevin Chen <kevin_chen@...eedtech.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>, "lee@...nel.org"
	<lee@...nel.org>, "robh@...nel.org" <robh@...nel.org>, "krzk+dt@...nel.org"
	<krzk+dt@...nel.org>, "conor+dt@...nel.org" <conor+dt@...nel.org>,
	"joel@....id.au" <joel@....id.au>, "andrew@...econstruct.com.au"
	<andrew@...econstruct.com.au>, "derek.kiernan@....com"
	<derek.kiernan@....com>, "dragan.cvetic@....com" <dragan.cvetic@....com>,
	"arnd@...db.de" <arnd@...db.de>, "gregkh@...uxfoundation.org"
	<gregkh@...uxfoundation.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-aspeed@...ts.ozlabs.org"
	<linux-aspeed@...ts.ozlabs.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, Mo Elbadry <elbadrym@...gle.com>
Subject: RE: [PATCH v2 3/3] soc: aspeed: lpc-pcc: Add PCC controller support

> 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@...eedtech.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?
OK. I will add the ida_free function in remove function. Thanks a lot.

> 
> > +	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.
OK, I will remove it.

> 
> > +};
> > +
> > +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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ