On Sun, 11 Oct 2020 11:24:07 +0200 Oliver Hartkopp wrote:
> diff --git a/net/can/isotp.c b/net/can/isotp.c
> index e6ff032b5426..22187669c5c9 100644
> --- a/net/can/isotp.c
> +++ b/net/can/isotp.c
> @@ -79,6 +79,8 @@ MODULE_LICENSE("Dual BSD/GPL");
>  MODULE_AUTHOR("Oliver Hartkopp <socket...@hartkopp.net>");
>  MODULE_ALIAS("can-proto-6");
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

You need to move this before the includes:

net/can/isotp.c:82: warning: "pr_fmt" redefined
   82 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
      | 
In file included from ../include/linux/kernel.h:15,
                 from ../include/linux/list.h:9,
                 from ../include/linux/module.h:12,
                 from ../net/can/isotp.c:56:
include/linux/printk.h:297: note: this is the location of the previous 
definition
  297 | #define pr_fmt(fmt) fmt
      | 
net/can/isotp.c:82:9: warning: preprocessor token pr_fmt redefined
net/can/isotp.c: note: in included file (through ../include/linux/kernel.h, 
../include/linux/list.h, ../include/linux/module.h):
include/linux/printk.h:297:9: this was the original definition

Reply via email to