Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756656Ab1CRSfk (ORCPT ); Fri, 18 Mar 2011 14:35:40 -0400 Received: from nm3-vm0.bullet.mail.in.yahoo.com ([121.101.151.212]:25706 "HELO nm3-vm0.bullet.mail.in.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755357Ab1CRSfd (ORCPT ); Fri, 18 Mar 2011 14:35:33 -0400 X-Yahoo-Newman-Id: 956906.69875.bm@omp1003.mail.in.yahoo.com DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type:Content-Disposition:User-Agent; b=WfAlIiwhv9n2/kN7osruO+E3OvRFBG0M1wPLto0VlUJ2v83k54R69Ju/ieLrrg65PgAgE8zUPF7DF87TzMmHrF0L2djWxBHz5g5eVT09tRLMqiuvYy9xggRkuSmzxpEsP/TQ5Ex+FokWvR7MghT1BJFKd1MXekLj8TKV4/SQWxM= ; X-Yahoo-SMTP: dNW5aIGswBCf1iV6QK8RWrBgWyjShXs- X-YMail-OSG: D.sYNzkVM1ncGhNirRap1vcH2YnSYBQu_FNbZM.MX.qts5b OIYtx4E4V4xkitqMlZyxrJw9FZkeCb6d4E0t8dO2O5sd2mnUBGNmtdr8MXPu rrGumjlSw9OLIZQzv9uhUeKHqMYY5LGA0lx7FEqIgZQzo2XtZn4Izf9CIl5E _mxaFdlUAaK3DaZGCd8YikuZRtgY7_U2l0Q5JR_RDWBSi3UG1iCw1NH_sEJ3 kCisdsLUhery9VeUjzJ4cOLqW.ITOnnSvJjacMqDtu6VwvxDTLXcl4uTYU6b hvViK.d61Lg3CBQ-- X-Yahoo-Newman-Property: ymail-3 Date: Sat, 19 Mar 2011 00:05:29 +0530 From: Jeffrin Jose To: "David S. Miller" , Alexey Kuznetsov Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: patch for format issues and header bug in net/ipv4/icmp.c Message-ID: <20110318183529.GA3617@debian.Jeff> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5126 Lines: 161 --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hello , I have created a patch for net/ipv4/icmp.c using checkpatch.pl script to fix several warnings and an error. I have attached the patch along with this mail. /Thanks -- software engineer. department of computer science rajagiri school of engineering and technology. --+HP7ph2BbKc20aGI Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-net-Fixed-format-issues-and-header-bug-in-net-ipv4-i.patch" >From 01861eb7151d397d10e1e8be58ac79252b04e254 Mon Sep 17 00:00:00 2001 From: Jeffrin Jose Date: Fri, 18 Mar 2011 23:20:24 +0530 Subject: [PATCH] net : Fixed format issues and header bug in net/ipv4/icmp.c This is a patch to net/ipv4/icmp.c file that fixes several line limit and several format ones and also a header path issue found by the checkpatch.pl tool. Author: Jeffrin Jose Signed-off-by: Jeffrin Jose --- net/ipv4/icmp.c | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index a91dc16..348cc17 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -53,7 +53,7 @@ * - ICMP header length was not accounted * at all. * Tristan Greaves : Added sysctl option to ignore bogus - * broadcast responses from broken routers. + * broadcast responses from broken routers. * * To Fix: * @@ -89,7 +89,7 @@ #include #include #include -#include +#include #include #include #include @@ -113,7 +113,8 @@ struct icmp_bxm { }; /* An array of errno for error messages from dest unreach. */ -/* RFC 1122: 3.2.2.1 States that NET_UNREACH, HOST_UNREACH and SR_FAILED MUST be considered 'transient errs'. */ +/* RFC 1122: 3.2.2.1 States that NET_UNREACH, HOST_UNREACH and SR_FAILED MUST +be considered 'transient errs'. */ const struct icmp_err icmp_err_convert[] = { { @@ -303,7 +304,7 @@ static void icmp_push_reply(struct icmp_bxm *icmp_param, ipc, rt, MSG_DONTWAIT) < 0) { ICMP_INC_STATS_BH(sock_net(sk), ICMP_MIB_OUTERRORS); ip_flush_pending_frames(sk); - } else if ((skb = skb_peek(&sk->sk_write_queue)) != NULL) { + } else if ((skb == skb_peek(&sk->sk_write_queue)) != NULL) { struct icmphdr *icmph = icmp_hdr(skb); __wsum csum = 0; struct sk_buff *skb1; @@ -411,7 +412,8 @@ static struct rtable *icmp_route_lookup(struct net *net, struct sk_buff *skb_in, } else return rt; - err = xfrm_decode_session_reverse(skb_in, flowi4_to_flowi(&fl4), AF_INET); + err = xfrm_decode_session_reverse(skb_in, \ + flowi4_to_flowi(&fl4), AF_INET); if (err) goto relookup_failed; @@ -648,7 +650,7 @@ static void icmp_unreach(struct sk_buff *skb) /* * Incomplete header ? - * Only checks for the IP header, there should be an + * Only checks for the IP header, there should be an * additional check for longer headers in upper levels. */ @@ -670,18 +672,20 @@ static void icmp_unreach(struct sk_buff *skb) break; case ICMP_FRAG_NEEDED: if (ipv4_config.no_pmtu_disc) { - LIMIT_NETDEBUG(KERN_INFO "ICMP: %pI4: fragmentation needed and DF set.\n", + LIMIT_NETDEBUG(KERN_INFO "ICMP: %pI4: \ + fragmentation needed and DF set.\n", &iph->daddr); } else { info = ip_rt_frag_needed(net, iph, - ntohs(icmph->un.frag.mtu), + ntohs(icmph->un.frag.mtu), skb->dev); if (!info) goto out; } break; case ICMP_SR_FAILED: - LIMIT_NETDEBUG(KERN_INFO "ICMP: %pI4: Source Route Failed.\n", + LIMIT_NETDEBUG(KERN_INFO "ICMP: %pI4: \ + Source Route Failed.\n", &iph->daddr); break; default: @@ -875,7 +879,7 @@ out_err: * * RFC1812 (4.3.3.9). A router MUST implement it. * A router SHOULD have switch turning it on/off. - * This switch MUST be ON by default. + * This switch MUST be ON by default. * * Gratuitous replies, zero-source replies are not implemented, * that complies with RFC. DO NOT implement them!!! All the idea @@ -1163,7 +1167,7 @@ static int __net_init icmp_sk_init(struct net *net) net->ipv4.sysctl_icmp_ignore_bogus_error_responses = 1; /* - * Configurable global rate limit. + * Configurable global rate limit. * * ratelimit defines tokens/packet consumed for dst->rate_token * bucket ratemask defines which icmp types are ratelimited by @@ -1188,8 +1192,8 @@ fail: } static struct pernet_operations __net_initdata icmp_sk_ops = { - .init = icmp_sk_init, - .exit = icmp_sk_exit, + .init = icmp_sk_init, + .exit = icmp_sk_exit, }; int __init icmp_init(void) -- 1.7.1 --+HP7ph2BbKc20aGI-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/