Re: [PATCH] firmware loader: log path to loaded firmwares

From: Greg Kroah-Hartman
Date: Sun Nov 03 2019 - 12:50:26 EST


On Sun, Nov 03, 2019 at 12:38:38PM -0500, Drew DeVault wrote:
> This is useful for users who are trying to identify the firmwares in use
> on their system.
>
> Signed-off-by: Drew DeVault <sir@xxxxxxxxx>
> ---
> drivers/base/firmware_loader/main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c
> index bf44c79beae9..139d40a2f423 100644
> --- a/drivers/base/firmware_loader/main.c
> +++ b/drivers/base/firmware_loader/main.c
> @@ -34,6 +34,7 @@
> #include <linux/reboot.h>
> #include <linux/security.h>
> #include <linux/xz.h>
> +#include <linux/kernel.h>
>
> #include <generated/utsrelease.h>
>
> @@ -504,6 +505,7 @@ fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv,
> path);
> continue;
> }
> + printk(KERN_INFO "Loading firmware from %s\n", path);

And it's totally noisy :(

Also, if you have a 'struct device' you should always use the dev_*()
calls instead, which will show you exactly what device is asking for
what.

Please just make this a debug call, that way you can turn it on
dynamically if you really want to see what firmware is attempting to be
loaded.

thanks,

greg k-h