[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<PAXPR04MB8459349D4D60703FCFFDF7698809A@PAXPR04MB8459.eurprd04.prod.outlook.com>
Date: Thu, 11 Sep 2025 05:47:03 +0000
From: Peng Fan <peng.fan@....com>
To: Dan Carpenter <dan.carpenter@...aro.org>
CC: Sudeep Holla <sudeep.holla@....com>, Cristian Marussi
<cristian.marussi@....com>, Shawn Guo <shawnguo@...nel.org>, Sascha Hauer
<s.hauer@...gutronix.de>, Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, "arm-scmi@...r.kernel.org"
<arm-scmi@...r.kernel.org>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/2] firmware: imx: sm-misc: Dump syslog info
> Subject: Re: [PATCH 2/2] firmware: imx: sm-misc: Dump syslog info
>
> On Wed, Sep 10, 2025 at 10:28:18PM +0800, Peng Fan wrote:
> > static int scmi_imx_misc_ctrl_probe(struct scmi_device *sdev) {
> > const struct scmi_handle *handle = sdev->handle;
> > struct device_node *np = sdev->dev.of_node;
> > + struct dentry *scmi_imx_dentry;
> > u32 src_id, flags;
> > int ret, i, num;
> >
> > @@ -98,6 +134,12 @@ static int scmi_imx_misc_ctrl_probe(struct
> scmi_device *sdev)
> > }
> > }
> >
> > + scmi_imx_dentry = debugfs_create_dir("scmi_imx", NULL);
> > + if (!IS_ERR(scmi_imx_dentry))
> > + debugfs_create_file("syslog", 0444, scmi_imx_dentry,
> &sdev->dev,
> > +&syslog_fops);
>
> You don't need the IS_ERR() check. If debugfs_create_dir() fails then
> just pass the error pointer to debugfs_create_file(), it's fine.
Hi Dan,
Thanks for raising this. I will fix in next version.
Thanks,
Peng.
>
> regards,
> dan carpenter
>
> > +
> > + devm_add_action_or_reset(&sdev->dev, scmi_imx_misc_put,
> > +scmi_imx_dentry);
> > +
> > return 0;
> > }
> >
> >
> > --
> > 2.37.1
> >
Powered by blists - more mailing lists