Re: [PATCH for-5.8] ASoC: amd: doesn't print error log if the return value is EPROBE_DEFER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2020/5/21 下午11:43, Mark Brown wrote:
On Thu, May 21, 2020 at 10:44:34PM +0800, Hui Wang wrote:
The machine driver module and codec driver module don't have
dependency, it is possible that the machine driver is loaded ahead of
the codec driver, then the register_card() will fail and return
EPROBE_DEFER, in this case the driver should not print error log since
this is not a real failure.
This isn't helpful to people who are trying to figure out why the driver
isn't loading - if we silently fail then the user will struggle to
determine what the problem that causes their driver to fail to bind is.

Yes, you are right. If the codec module is not loaded, the machine driver will fail silently.

There are many modules in the kernel, no other modules print the -517 error or warning, so if this driver prints it, it really confuses users (according to my test, the audio works but the kernel prints this error with 100% chance, and within ubuntu, the error message is read color, it is very easily caught by users).

How about we put off the registering the machine device, this can guarantee everything is ready when machine driver's probe is called. I will send a V2 according to this idea.

Thanks,

Hui.




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux