[PATCH] loopback: Prepend module name to log messages

Jan Kiszka jan.kiszka at siemens.com
Mon Aug 12 21:07:10 CEST 2019


On 11.08.19 21:07, Tormod Volden via Xenomai wrote:
> From: Tormod Volden <debian.tormod at gmail.com>
> 
> Signed-off-by: Tormod Volden <debian.tormod at gmail.com>
> ---
>   kernel/drivers/net/drivers/loopback.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/drivers/net/drivers/loopback.c b/kernel/drivers/net/drivers/loopback.c
> index ef5323a..ebfcf5c 100644
> --- a/kernel/drivers/net/drivers/loopback.c
> +++ b/kernel/drivers/net/drivers/loopback.c
> @@ -18,6 +18,9 @@
>    * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
>    */
>   
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> +#include <linux/printk.h>
>   #include <linux/module.h>
>   #include <linux/kernel.h>
>   #include <linux/init.h>
> @@ -93,7 +96,7 @@ static int __init loopback_init(void)
>       int err;
>       struct rtnet_device *rtdev;
>   
> -    printk("initializing loopback...\n");
> +    pr_info("initializing loopback interface...\n");
>   
>       if ((rtdev = rt_alloc_etherdev(0, 1)) == NULL)
>   	return -ENODEV;
> @@ -129,7 +132,7 @@ static void __exit loopback_cleanup(void)
>   {
>       struct rtnet_device *rtdev = rt_loopback_dev;
>   
> -    printk("removing loopback...\n");
> +    pr_info("removing loopback interface...\n");
>   
>       rt_unregister_rtnetdev(rtdev);
>       rt_rtdev_disconnect(rtdev);
> 

Thanks, applied both to next.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux



More information about the Xenomai mailing list