Re: [alsa-devel] [PATCH 2/5] sound: soc: skylake: no need to check return value of debugfs_create functions
On Mon, 24 Jun 2019 12:53:34 +0200, Mark Brown wrote:
On Sat, Jun 22, 2019 at 10:39:11PM +0200, Takashi Iwai wrote:
Well, I just wonder whether you have ever seen a case where the debugfs creation failed. Or more practically, would it fail silently at all?
If there can be a silent failure, then it's bad to just ignore, yes. We may need either to make it more obvious or return an error.
Currently debugfs doesn't report any errors other than via the return codes (at least in the common creation stuff) so it's up to the callers to do that.
So this should be changed to follow a la sysfs creation error, IMO. At least, the name conflicts etc should be reported more obviously.
thanks,
Takashi
On Mon, Jun 24, 2019 at 03:15:26PM +0200, Takashi Iwai wrote:
Mark Brown wrote:
Currently debugfs doesn't report any errors other than via the return codes (at least in the common creation stuff) so it's up to the callers to do that.
So this should be changed to follow a la sysfs creation error, IMO. At least, the name conflicts etc should be reported more obviously.
Indeed, that'd mitigate the problems with just making everything silently fail a lot - so long as we say there's a problem people are a lot less likely to be mislead if anything goes wrong.
On Mon, Jun 24, 2019 at 02:33:36PM +0100, Mark Brown wrote:
On Mon, Jun 24, 2019 at 03:15:26PM +0200, Takashi Iwai wrote:
Mark Brown wrote:
Currently debugfs doesn't report any errors other than via the return codes (at least in the common creation stuff) so it's up to the callers to do that.
So this should be changed to follow a la sysfs creation error, IMO. At least, the name conflicts etc should be reported more obviously.
Indeed, that'd mitigate the problems with just making everything silently fail a lot - so long as we say there's a problem people are a lot less likely to be mislead if anything goes wrong.
Ok, let me work on doing this in the debugfs core and will cc: you all on the resulting patches to see if it will satisfy your objections here.
sorry for the delay, am on the road all this week with limited internet...
greg k-h
participants (3)
-
Greg Kroah-Hartman
-
Mark Brown
-
Takashi Iwai