Re: kernel/module: Delete an error message for a failed memory allocation in add_module_usage()

From: SF Markus Elfring
Date: Thu Oct 19 2017 - 07:12:48 EST


>> This is a small allocation so it can't fail in current kernels. I can't
>> imagine a situation where this could fail and it wasn't dead easy to
>> debug. Most modules are loaded at boot so it's not likely to fail, but
>> if it did, it would be easy to reproduce. If it's not loaded at boot
>> it's probably really easy to tell which module we're loading.
>
> Yeah, good points. And on second thought, we normally don't print
> warnings for every small alloc failure in the kernel anyway (that
> would be utterly superfluous), the error code itself is sufficient.
> And in the module loader this seems to be the only printk out of the
> dozen alloc calls we do, so I'm OK with removing this one.

Thanks for your constructive feedback.

Can it help to improve the corresponding documentation for Linux
programming interfaces a bit more?

Regards,
Markus