mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Joerg Reuter <jreuter@yaina.de>, Ralf Baechle <ralf@linux-mips.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-hams@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 04/24] ax25: Remove unnecessary OOM logging messages
Date: Mon, 29 Aug 2011 14:17:23 -0700	[thread overview]
Message-ID: <a426e678426cf2be1552edfbbb0de7ce08e9a7ef.1314650069.git.joe@perches.com> (raw)
In-Reply-To: <cover.1314650069.git.joe@perches.com>

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/ax25/ax25_dev.c   |    5 ++---
 net/ax25/ax25_out.c   |    8 ++++----
 net/ax25/ax25_route.c |    5 ++---
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c
index c1cb982..986908a 100644
--- a/net/ax25/ax25_dev.c
+++ b/net/ax25/ax25_dev.c
@@ -55,10 +55,9 @@ void ax25_dev_device_up(struct net_device *dev)
 {
 	ax25_dev *ax25_dev;
 
-	if ((ax25_dev = kzalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) {
-		printk(KERN_ERR "AX.25: ax25_dev_device_up - out of memory\n");
+	ax25_dev = kzalloc(sizeof(*ax25_dev), GFP_ATOMIC);
+	if (ax25_dev == NULL)
 		return;
-	}
 
 	ax25_unregister_sysctl();
 
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c
index 37507d8..a27046d 100644
--- a/net/ax25/ax25_out.c
+++ b/net/ax25/ax25_out.c
@@ -146,9 +146,9 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb)
 
 		while (skb->len > 0) {
 			spin_lock_bh(&ax25_frag_lock);
-			if ((skbn = alloc_skb(paclen + 2 + frontlen, GFP_ATOMIC)) == NULL) {
+			skbn = alloc_skb(paclen + 2 + frontlen, GFP_ATOMIC);
+			if (skbn == NULL) {
 				spin_unlock_bh(&ax25_frag_lock);
-				printk(KERN_CRIT "AX.25: ax25_output - out of memory\n");
 				return;
 			}
 
@@ -342,8 +342,8 @@ void ax25_transmit_buffer(ax25_cb *ax25, struct sk_buff *skb, int type)
 	headroom = ax25_addr_size(ax25->digipeat);
 
 	if (skb_headroom(skb) < headroom) {
-		if ((skbn = skb_realloc_headroom(skb, headroom)) == NULL) {
-			printk(KERN_CRIT "AX.25: ax25_transmit_buffer - out of memory\n");
+		skbn = skb_realloc_headroom(skb, headroom);
+		if (skbn == NULL) {
 			kfree_skb(skb);
 			return;
 		}
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c
index a169084..75e67c0 100644
--- a/net/ax25/ax25_route.c
+++ b/net/ax25/ax25_route.c
@@ -466,10 +466,9 @@ struct sk_buff *ax25_rt_build_path(struct sk_buff *skb, ax25_address *src,
 	len = digi->ndigi * AX25_ADDR_LEN;
 
 	if (skb_headroom(skb) < len) {
-		if ((skbn = skb_realloc_headroom(skb, len)) == NULL) {
-			printk(KERN_CRIT "AX.25: ax25_dg_build_path - out of memory\n");
+		skbn = skb_realloc_headroom(skb, len);
+		if (skbn == NULL)
 			return NULL;
-		}
 
 		if (skb->sk != NULL)
 			skb_set_owner_w(skbn, skb->sk);
-- 
1.7.6.405.gc1be0


  parent reply	other threads:[~2011-08-29 21:19 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 21:17 [PATCH 00/24] net: " Joe Perches
2011-08-29 21:17 ` [PATCH 01/24] 802: " Joe Perches
2011-08-29 21:17 ` [PATCH 02/24] 9p: " Joe Perches
2011-08-29 21:17 ` [PATCH 03/24] atm: " Joe Perches
2011-08-29 21:17 ` Joe Perches [this message]
2011-08-29 22:42   ` [PATCH 04/24] ax25: " Joerg Reuter
2011-08-29 21:17 ` [PATCH 05/24] batman-adv: " Joe Perches
2011-08-30 10:58   ` [B.A.T.M.A.N.] " Marek Lindner
2011-08-29 21:17 ` [PATCH 06/24] netfilter: " Joe Perches
2011-08-30 12:46   ` Patrick McHardy
2011-08-30 16:13     ` Joe Perches
2011-08-30 17:55     ` David Miller
2011-08-31 10:13       ` Patrick McHardy
2011-10-11  0:15         ` Pablo Neira Ayuso
2011-08-29 21:17 ` [PATCH 07/24] can: " Joe Perches
2011-08-31 17:11   ` Oliver Hartkopp
2011-08-29 21:17 ` [PATCH 08/24] ceph: " Joe Perches
2011-08-29 21:17 ` [PATCH 09/24] decnet: " Joe Perches
2011-08-29 21:17 ` [PATCH 10/24] econet: " Joe Perches
2011-08-29 21:17 ` [PATCH 11/24] iucv: " Joe Perches
2011-08-29 21:17 ` [PATCH 12/24] mac80211: " Joe Perches
2011-08-29 21:17 ` [PATCH 13/24] netrom: " Joe Perches
2011-08-29 21:17 ` [PATCH 14/24] rds: " Joe Perches
2011-08-29 21:17 ` [PATCH 15/24] rfkill: " Joe Perches
2011-08-29 21:17 ` [PATCH 16/24] rose: " Joe Perches
2011-08-29 21:17 ` [PATCH 17/24] sched: " Joe Perches
2011-08-30 22:27   ` jamal
2011-08-29 21:17 ` [PATCH 18/24] sctp: " Joe Perches
2011-08-29 21:29   ` Vladislav Yasevich
2011-08-29 21:43   ` Eric Dumazet
2011-08-29 21:51     ` Eric Dumazet
2011-08-29 22:15       ` David Miller
2011-09-01  0:25         ` Joe Perches
2011-08-30  1:21     ` Joe Perches
2011-08-29 21:17 ` [PATCH 19/24] sunrpc: " Joe Perches
2011-08-29 21:36   ` Myklebust, Trond
2011-08-29 21:37     ` David Miller
2011-08-29 21:54       ` Boaz Harrosh
2011-08-29 22:03         ` David Miller
2011-08-29 23:25           ` Myklebust, Trond
2011-08-29 23:33             ` Boaz Harrosh
2011-08-30  2:35             ` David Miller
2011-08-29 22:08         ` Myklebust, Trond
2011-08-29 21:17 ` [PATCH 20/24] tipc: " Joe Perches
2011-08-29 21:17 ` [PATCH 21/24] wanrouter: " Joe Perches
2011-08-29 21:17 ` [PATCH 22/24] wireless: " Joe Perches
2011-08-29 21:17 ` [PATCH 23/24] x25: " Joe Perches
2011-08-29 21:17 ` [PATCH 24/24] net: " Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a426e678426cf2be1552edfbbb0de7ce08e9a7ef.1314650069.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=jreuter@yaina.de \
    --cc=linux-hams@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®