diff mbox

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

Message ID 1424999650-25847-1-git-send-email-ipm@chirality.org.uk
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Ian Morris Feb. 27, 2015, 1:14 a.m. UTC
change a printk(KERN_ERR to a pr_err macro. No changes detected by
objdiff.

Signed-off-by: Ian Morris <ipm@chirality.org.uk>
---
 net/ipv6/exthdrs_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joe Perches Feb. 27, 2015, 2:39 a.m. UTC | #1
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.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c
index 8af3eb5..2f2945d 100644
--- 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");
 			return -EBADMSG;
 		}
 		start = *offset + sizeof(struct ipv6hdr);