[alsa-devel] [PATCH 2/2] ASoC: dapm: Adapt for debugfs API change
Greg KH
greg at kroah.com
Fri Jun 21 16:53:09 CEST 2019
On Fri, Jun 21, 2019 at 03:30:53PM +0100, Mark Brown wrote:
> On Fri, Jun 21, 2019 at 03:22:22PM +0200, Greg KH wrote:
> > On Fri, Jun 21, 2019 at 12:33:57PM +0100, Mark Brown wrote:
>
> > > struct dentry *d;
> > >
> > > - if (!parent)
> > > + if (!parent || IS_ERR(parent))
> > > return;
>
> > How can parent be NULL?
>
> It was more effort than it was worth to check to see if it could
> actually be NULL through default initialization or something and fix it
> than just not delete the check so I just left it there. I'll probably
> go back and clean it up more thorougly at some point.
>
> > I am trying to make it so that debugfs doesn't return anything for when
> > a file is created. Now if that will ever be possible or not, I don't
> > know, but I am pretty close in one of the branches in my driver-core
> > tree...
>
> You mentioned this in a mail last week, I then replied pointing out that
> this is not helpful as it reduces the robustness and quality of our
> debugging tools and you then did not respond.
Sorry, had lots of other stuff to work on, it's in my queue to respond
to still...
> This is a view I still hold and in any case debugfs as it stands (and
> was in the kernel versions since this was broken) is still capable of
> reporting errors so we should fix that.
Sort story is, I am trying to change it so that it can not report errors :)
And even then, no kernel code should be doing anything different if
debugfs calls fail or not, that is why I am I making these changes. No
"real" code should ever be affected, and right now, it is, if something
goes wrong with debugfs.
So removing those checks is the goal here. Your driver code should not
care if debugfs is working at all or not.
thanks,
greg k-h
More information about the Alsa-devel
mailing list