Subject: Re: [PATCH net-next] ipv6: convert printk call to pr_err macro

From: Joe Perches <[email-masked]>
Date: Thu, 26 Feb 2015 18:39:09 -0800

On Fri, 2015-02-27 at 01:14 +0000, Ian Morris wrote:
> change a printk(KERN_ERR to a pr_err macro. No changes detected by
> objdiff.
[]
> diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c
[]
> @@ -198,7 +198,7 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
>  
>  		ip6 = skb_header_pointer(skb, *offset, sizeof(_ip6), &_ip6);
>  		if (!ip6 || (ip6->version != 6)) {
> -			printk(KERN_ERR "IPv6 header not found\n");
> +			pr_err("IPv6 header not found\n");

Hello Ian.

I presume this message is very rare, (is it even possible?)
but I also think it'd be better to use

			netdev_err(skb->dev, "IPv6 header not found\n");

so that the network device can be easily identified.