[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230831042023.GA76997@atom0118>
Date: Thu, 31 Aug 2023 09:50:23 +0530
From: Atul Kumar Pant <atulpant.linux@...il.com>
To: Michal Simek <michal.simek@....com>
Cc: shubhrajyoti.datta@....com, sai.krishna.potthuri@....com,
bp@...en8.de, tony.luck@...el.com, james.morse@....com,
mchehab@...nel.org, rric@...nel.org, linux-edac@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
shuah@...nel.org
Subject: Re: [PATCH v1] drivers: edac: Drop unnecessary error check for
debugfs_create_dir
On Mon, Aug 28, 2023 at 04:00:41PM +0200, Michal Simek wrote:
>
>
> On 8/28/23 15:35, Atul Kumar Pant wrote:
> > On Fri, Aug 25, 2023 at 09:31:54AM +0200, Michal Simek wrote:
> > >
> > >
> > > On 8/15/23 22:38, Atul Kumar Pant wrote:
> > > > This patch removes the error checking for debugfs_create_dir.
> > >
> > > Avoid using "This patch".
> >
> > Thanks for pointing this out. I'll remember this.
> >
> > >
> > > > Even if we get an error from this function, other debugfs APIs will
> > > > handle the error value and doesn't crash in that case. Hence caller can
> > > > safely ignore the errors that occur during the creation of debugfs nodes.
> > >
> > > First of all which issue do you have? Did you see that folder is not created?
> >
> > I have not seen any issue as such. But going by the comments before
> > the debugfs_create_dir API (https://elixir.bootlin.com/linux/latest/source/fs/debugfs/inode.c#L583),
> > we can ignore safely ignore the return value from this API.
> >
> > >
> > > I am not quite sure if this is the right behavior.
> > > In the code there is
> > > 135 if (!parent)
> > > 136 parent = edac_debugfs;
> > >
> > > It means you are right that if creating ocm folder can fail and properties
> > > will be still created under edac_debugfs but is this the right behavior?
> > >
> > > altera_edac/armada_xp_edac/i10nm/i5100/igen6/others are checking return
> > > value that's why I can't see any reason to remove this checking from one
> > > driver.
> > >
> > > If you want to fix all please send patch for all but I don't think it will
> > > improve situation and it will just hide different issue if creating folder
> > > fails.
> >
> > Understood your point. Are you suggesting that we should keep these
> > checks as it is, or should I fix for all the drivers and upload the
> > patch ?
>
> Up to Boris to decide but I would say keep it as is. Even debugfs is not
> stable interface I would like to be informed if something fails. But just
> 2c.
Thanks you Michal. I'll wait for the reply from Boris.
>
> Thanks,
> Michal
>
>
>
Powered by blists - more mailing lists