linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/24] net: Remove unnecessary OOM logging messages
@ 2011-08-29 21:17 Joe Perches
  2011-08-29 21:17 ` [PATCH 12/24] mac80211: " Joe Perches
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: linux-hams, b.a.t.m.a.n, netfilter-devel, netfilter, coreteam,
	netdev, ceph-devel, linux-decnet-user, linux-s390, linux-wireless,
	lvs-devel, rds-devel, linux-sctp, linux-nfs, tipc-discussion,
	linux-x25
  Cc: linux-kernel, bridge

Remove all the site-specific OOM messages because they duplicate
the MM subsystem generic OOM message.

Saves ~.2% (~2.5kb) of code/text in an x86 defconfig

$ size net/built-in.o*defconfig
   text	   data	    bss	    dec	    hex	filename
1506772	  58652	  34928	1600352	 186b60	net/built-in.o.new.defconfig
1509144	  58652	  34928	1602724	 1874a4	net/built-in.o.old.defconfig

$ size net/built-in.o*allyesconfig
   text	   data	    bss	    dec	    hex	filename
7655361	 275361	2062352	 9993074 987b72	net/built-in.o.new.allyesconfig
7667400	 275649	2064024	10007073 98b221	net/built-in.o.old.allyesconfig

Joe Perches (24):
  802: Remove unnecessary OOM logging messages
  9p: Remove unnecessary OOM logging messages
  atm: Remove unnecessary OOM logging messages
  ax25: Remove unnecessary OOM logging messages
  batman-adv: Remove unnecessary OOM logging messages
  netfilter: Remove unnecessary OOM logging messages
  net: Remove unnecessary OOM logging messages
  ceph: Remove unnecessary OOM logging messages
  decnet: Remove unnecessary OOM logging messages
  econet: Remove unnecessary OOM logging messages
  iucv: Remove unnecessary OOM logging messages
  mac80211: Remove unnecessary OOM logging messages
  netrom: Remove unnecessary OOM logging messages
  rds: Remove unnecessary OOM logging messages
  rfkill: Remove unnecessary OOM logging messages
  rose: Remove unnecessary OOM logging messages
  sched: Remove unnecessary OOM logging messages
  sctp: Remove unnecessary OOM logging messages
  sunrpc: Remove unnecessary OOM logging messages
  tipc: Remove unnecessary OOM logging messages
  wanrouter: Remove unnecessary OOM logging messages
  wireless: Remove unnecessary OOM logging messages
  x25: Remove unnecessary OOM logging messages
  net: Remove unnecessary OOM logging messages

 net/802/tr.c                            |    1 -
 net/9p/client.c                         |    7 +----
 net/9p/trans_virtio.c                   |    6 +----
 net/atm/lec.c                           |    4 +--
 net/atm/mpc.c                           |   17 ++++----------
 net/atm/mpoa_caches.c                   |    8 +-----
 net/ax25/ax25_dev.c                     |    5 +--
 net/ax25/ax25_out.c                     |    8 +++---
 net/ax25/ax25_route.c                   |    5 +--
 net/batman-adv/hard-interface.c         |    5 +---
 net/batman-adv/main.c                   |    2 -
 net/batman-adv/originator.c             |   16 +++----------
 net/batman-adv/soft-interface.c         |    4 +--
 net/batman-adv/vis.c                    |    4 +--
 net/bridge/netfilter/ebt_ulog.c         |    7 ++---
 net/can/af_can.c                        |    6 +---
 net/ceph/messenger.c                    |    5 +---
 net/ceph/msgpool.c                      |    6 +----
 net/core/dev.c                          |   25 ++++++----------------
 net/core/flow.c                         |    4 +--
 net/core/pktgen.c                       |    5 +---
 net/decnet/dn_neigh.c                   |    6 -----
 net/econet/af_econet.c                  |    4 +--
 net/ipv4/netfilter/ipt_CLUSTERIP.c      |    1 -
 net/ipv4/netfilter/ipt_ULOG.c           |    4 +--
 net/ipv4/netfilter/nf_nat_snmp_basic.c  |   22 +-----------------
 net/ipv6/netfilter/nf_conntrack_reasm.c |    7 ++---
 net/iucv/iucv.c                         |    5 +--
 net/mac80211/agg-rx.c                   |   19 +---------------
 net/mac80211/agg-tx.c                   |   35 +++++++-----------------------
 net/mac80211/debugfs.c                  |    3 ++
 net/mac80211/ht.c                       |    6 +----
 net/mac80211/mesh.c                     |    5 +--
 net/mac80211/mlme.c                     |   17 ++++----------
 net/mac80211/spectmgmt.c                |    6 +----
 net/mac80211/tx.c                       |   17 ++++----------
 net/mac80211/util.c                     |   11 ++-------
 net/mac80211/work.c                     |    6 +---
 net/netfilter/ipset/ip_set_core.c       |    4 +--
 net/netfilter/ipvs/ip_vs_core.c         |    5 +--
 net/netfilter/ipvs/ip_vs_ctl.c          |   18 +++++----------
 net/netfilter/ipvs/ip_vs_dh.c           |    5 +--
 net/netfilter/ipvs/ip_vs_lblc.c         |    9 ++-----
 net/netfilter/ipvs/ip_vs_lblcr.c        |   13 +++--------
 net/netfilter/ipvs/ip_vs_proto.c        |    5 +--
 net/netfilter/ipvs/ip_vs_sh.c           |    5 +--
 net/netfilter/ipvs/ip_vs_wrr.c          |    5 +--
 net/netfilter/nf_conntrack_core.c       |    5 +---
 net/netfilter/nfnetlink_log.c           |    7 +----
 net/netfilter/xt_IDLETIMER.c            |    2 -
 net/netfilter/xt_hashlimit.c            |    5 +---
 net/netrom/af_netrom.c                  |    8 +-----
 net/rds/ib_rdma.c                       |    1 -
 net/rds/iw_rdma.c                       |    8 +------
 net/rds/iw_send.c                       |    8 +-----
 net/rfkill/rfkill-regulator.c           |    1 -
 net/rose/af_rose.c                      |    1 -
 net/sched/act_api.c                     |    6 +---
 net/sched/sch_atm.c                     |    1 -
 net/sctp/protocol.c                     |    3 --
 net/socket.c                            |    5 +---
 net/sunrpc/auth_gss/gss_krb5_crypto.c   |   10 +-------
 net/sunrpc/auth_gss/gss_krb5_mech.c     |    2 -
 net/sunrpc/backchannel_rqst.c           |    9 ++-----
 net/sunrpc/clnt.c                       |    3 --
 net/sunrpc/rpc_pipe.c                   |    3 +-
 net/sunrpc/rpcb_clnt.c                  |    2 -
 net/sunrpc/xprtrdma/svc_rdma.c          |    8 +-----
 net/sunrpc/xprtrdma/transport.c         |    5 +---
 net/sunrpc/xprtrdma/verbs.c             |   14 ------------
 net/sunrpc/xprtsock.c                   |    5 +---
 net/tipc/link.c                         |    4 +--
 net/wanrouter/wanmain.c                 |    8 +------
 net/wireless/lib80211_crypt_ccmp.c      |    2 -
 net/wireless/lib80211_crypt_tkip.c      |    4 ---
 net/wireless/lib80211_crypt_wep.c       |    4 ---
 net/wireless/util.c                     |    5 +--
 net/x25/x25_dev.c                       |   10 +++-----
 78 files changed, 137 insertions(+), 415 deletions(-)

-- 
1.7.6.405.gc1be0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 12/24] mac80211: Remove unnecessary OOM logging messages
  2011-08-29 21:17 [PATCH 00/24] net: Remove unnecessary OOM logging messages Joe Perches
@ 2011-08-29 21:17 ` Joe Perches
  2011-08-29 21:17 ` [PATCH 15/24] rfkill: " Joe Perches
  2011-08-29 21:17 ` [PATCH 22/24] wireless: " Joe Perches
  2 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: John W. Linville, Johannes Berg
  Cc: David S. Miller, linux-wireless, netdev, linux-kernel

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/mac80211/agg-rx.c    |   19 ++-----------------
 net/mac80211/agg-tx.c    |   35 ++++++++---------------------------
 net/mac80211/debugfs.c   |    3 +++
 net/mac80211/ht.c        |    6 +-----
 net/mac80211/mesh.c      |    5 ++---
 net/mac80211/mlme.c      |   17 +++++------------
 net/mac80211/spectmgmt.c |    6 +-----
 net/mac80211/tx.c        |   17 +++++------------
 net/mac80211/util.c      |   11 +++--------
 net/mac80211/work.c      |    6 ++----
 10 files changed, 32 insertions(+), 93 deletions(-)

diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 9b5bd8c..7c366df 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -167,12 +167,8 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d
 	u16 capab;
 
 	skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
-
-	if (!skb) {
-		printk(KERN_DEBUG "%s: failed to allocate buffer "
-		       "for addba resp frame\n", sdata->name);
+	if (!skb)
 		return;
-	}
 
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 	mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
@@ -279,14 +275,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
 
 	/* prepare A-MPDU MLME for Rx aggregation */
 	tid_agg_rx = kmalloc(sizeof(struct tid_ampdu_rx), GFP_KERNEL);
-	if (!tid_agg_rx) {
-#ifdef CONFIG_MAC80211_HT_DEBUG
-		if (net_ratelimit())
-			printk(KERN_ERR "allocate rx mlme to tid %d failed\n",
-					tid);
-#endif
+	if (!tid_agg_rx)
 		goto end;
-	}
 
 	spin_lock_init(&tid_agg_rx->reorder_lock);
 
@@ -306,11 +296,6 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
 	tid_agg_rx->reorder_time =
 		kcalloc(buf_size, sizeof(unsigned long), GFP_KERNEL);
 	if (!tid_agg_rx->reorder_buf || !tid_agg_rx->reorder_time) {
-#ifdef CONFIG_MAC80211_HT_DEBUG
-		if (net_ratelimit())
-			printk(KERN_ERR "can not allocate reordering buffer "
-			       "to tid %d\n", tid);
-#endif
 		kfree(tid_agg_rx->reorder_buf);
 		kfree(tid_agg_rx->reorder_time);
 		kfree(tid_agg_rx);
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index b7075f3..7f568d6 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -68,11 +68,9 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
 
 	skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
 
-	if (!skb) {
-		printk(KERN_ERR "%s: failed to allocate buffer "
-				"for addba request frame\n", sdata->name);
+	if (!skb)
 		return;
-	}
+
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 	mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
 	memset(mgmt, 0, 24);
@@ -114,11 +112,9 @@ void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u1
 	u16 bar_control = 0;
 
 	skb = dev_alloc_skb(sizeof(*bar) + local->hw.extra_tx_headroom);
-	if (!skb) {
-		printk(KERN_ERR "%s: failed to allocate buffer for "
-			"bar frame\n", sdata->name);
+	if (!skb)
 		return;
-	}
+
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 	bar = (struct ieee80211_bar *)skb_put(skb, sizeof(*bar));
 	memset(bar, 0, sizeof(*bar));
@@ -413,11 +409,6 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
 	/* prepare A-MPDU MLME for Tx aggregation */
 	tid_tx = kzalloc(sizeof(struct tid_ampdu_tx), GFP_ATOMIC);
 	if (!tid_tx) {
-#ifdef CONFIG_MAC80211_HT_DEBUG
-		if (net_ratelimit())
-			printk(KERN_ERR "allocate tx mlme to tid %d failed\n",
-					tid);
-#endif
 		ret = -ENOMEM;
 		goto err_unlock_sta;
 	}
@@ -574,14 +565,9 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
 	struct ieee80211_ra_tid *ra_tid;
 	struct sk_buff *skb = dev_alloc_skb(0);
 
-	if (unlikely(!skb)) {
-#ifdef CONFIG_MAC80211_HT_DEBUG
-		if (net_ratelimit())
-			printk(KERN_WARNING "%s: Not enough memory, "
-			       "dropping start BA session", sdata->name);
-#endif
+	if (unlikely(!skb))
 		return;
-	}
+
 	ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
 	memcpy(&ra_tid->ra, ra, ETH_ALEN);
 	ra_tid->tid = tid;
@@ -727,14 +713,9 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
 	struct ieee80211_ra_tid *ra_tid;
 	struct sk_buff *skb = dev_alloc_skb(0);
 
-	if (unlikely(!skb)) {
-#ifdef CONFIG_MAC80211_HT_DEBUG
-		if (net_ratelimit())
-			printk(KERN_WARNING "%s: Not enough memory, "
-			       "dropping stop BA session", sdata->name);
-#endif
+	if (unlikely(!skb))
 		return;
-	}
+
 	ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
 	memcpy(&ra_tid->ra, ra, ETH_ALEN);
 	ra_tid->tid = tid;
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 186e02f..583c9ed 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -305,6 +305,9 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf,
 	char *buf = kzalloc(mxln, GFP_KERNEL);
 	int sf = 0; /* how many written so far */
 
+	if (!buf)
+		return 0;
+
 	sf += snprintf(buf, mxln - sf, "0x%x\n", local->hw.flags);
 	if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
 		sf += snprintf(buf + sf, mxln - sf, "HAS_RATE_CONTROL\n");
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 7cfc286..2b9b52c 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -186,12 +186,8 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
 	u16 params;
 
 	skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
-
-	if (!skb) {
-		printk(KERN_ERR "%s: failed to allocate buffer "
-					"for delba frame\n", sdata->name);
+	if (!skb)
 		return;
-	}
 
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 	mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 29e9980..d262f38 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -193,10 +193,9 @@ int mesh_rmc_check(u8 *sa, struct ieee80211s_hdr *mesh_hdr,
 	}
 
 	p = kmem_cache_alloc(rm_cache, GFP_ATOMIC);
-	if (!p) {
-		printk(KERN_DEBUG "o11s: could not allocate RMC entry\n");
+	if (!p)
 		return 0;
-	}
+
 	p->seqnum = seqnum;
 	p->exp_time = jiffies + RMC_TIMEOUT;
 	memcpy(p->sa, sa, ETH_ALEN);
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d6470c7..f193a91 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -271,11 +271,9 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
 	struct ieee80211_mgmt *mgmt;
 
 	skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*mgmt));
-	if (!skb) {
-		printk(KERN_DEBUG "%s: failed to allocate buffer for "
-		       "deauth/disassoc frame\n", sdata->name);
+	if (!skb)
 		return;
-	}
+
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 
 	mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
@@ -354,11 +352,9 @@ static void ieee80211_send_4addr_nullfunc(struct ieee80211_local *local,
 		return;
 
 	skb = dev_alloc_skb(local->hw.extra_tx_headroom + 30);
-	if (!skb) {
-		printk(KERN_DEBUG "%s: failed to allocate buffer for 4addr "
-		       "nullfunc frame\n", sdata->name);
+	if (!skb)
 		return;
-	}
+
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 
 	nullfunc = (struct ieee80211_hdr *) skb_put(skb, 30);
@@ -1483,11 +1479,8 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
 	ifmgd->aid = aid;
 
 	sta = sta_info_alloc(sdata, cbss->bssid, GFP_KERNEL);
-	if (!sta) {
-		printk(KERN_DEBUG "%s: failed to alloc STA entry for"
-		       " the AP\n", sdata->name);
+	if (!sta)
 		return false;
-	}
 
 	set_sta_flags(sta, WLAN_STA_AUTH | WLAN_STA_ASSOC |
 			   WLAN_STA_ASSOC_AP);
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index 7733f66..578eea3 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -32,12 +32,8 @@ static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_da
 
 	skb = dev_alloc_skb(sizeof(*msr_report) + local->hw.extra_tx_headroom +
 				sizeof(struct ieee80211_msrment_ie));
-
-	if (!skb) {
-		printk(KERN_ERR "%s: failed to allocate buffer for "
-				"measurement report frame\n", sdata->name);
+	if (!skb)
 		return;
-	}
 
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 	msr_report = (struct ieee80211_mgmt *)skb_put(skb, 24);
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 69fd494..55bc1f6 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2355,11 +2355,9 @@ struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
 	local = sdata->local;
 
 	skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*pspoll));
-	if (!skb) {
-		printk(KERN_DEBUG "%s: failed to allocate buffer for "
-		       "pspoll template\n", sdata->name);
+	if (!skb)
 		return NULL;
-	}
+
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 
 	pspoll = (struct ieee80211_pspoll *) skb_put(skb, sizeof(*pspoll));
@@ -2395,11 +2393,9 @@ struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
 	local = sdata->local;
 
 	skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*nullfunc));
-	if (!skb) {
-		printk(KERN_DEBUG "%s: failed to allocate buffer for nullfunc "
-		       "template\n", sdata->name);
+	if (!skb)
 		return NULL;
-	}
+
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 
 	nullfunc = (struct ieee80211_hdr_3addr *) skb_put(skb,
@@ -2434,11 +2430,8 @@ struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
 
 	skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*hdr) +
 			    ie_ssid_len + ie_len);
-	if (!skb) {
-		printk(KERN_DEBUG "%s: failed to allocate buffer for probe "
-		       "request template\n", sdata->name);
+	if (!skb)
 		return NULL;
-	}
 
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index ce916ff..1c10802 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -707,11 +707,9 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
 
 	skb = dev_alloc_skb(local->hw.extra_tx_headroom +
 			    sizeof(*mgmt) + 6 + extra_len);
-	if (!skb) {
-		printk(KERN_DEBUG "%s: failed to allocate buffer for auth "
-		       "frame\n", sdata->name);
+	if (!skb)
 		return;
-	}
+
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 
 	mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24 + 6);
@@ -864,11 +862,8 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
 
 	/* FIXME: come up with a proper value */
 	buf = kmalloc(200 + ie_len, GFP_KERNEL);
-	if (!buf) {
-		printk(KERN_DEBUG "%s: failed to allocate temporary IE "
-		       "buffer\n", sdata->name);
+	if (!buf)
 		return NULL;
-	}
 
 	/*
 	 * Do not send DS Channel parameter for directed probe requests
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 380b9a7..bac3439 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -229,11 +229,9 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
 			wk->ie_len + /* extra IEs */
 			9, /* WMM */
 			GFP_KERNEL);
-	if (!skb) {
-		printk(KERN_DEBUG "%s: failed to allocate buffer for assoc "
-		       "frame\n", sdata->name);
+	if (!skb)
 		return;
-	}
+
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 
 	capab = WLAN_CAPABILITY_ESS;
-- 
1.7.6.405.gc1be0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 15/24] rfkill: Remove unnecessary OOM logging messages
  2011-08-29 21:17 [PATCH 00/24] net: Remove unnecessary OOM logging messages Joe Perches
  2011-08-29 21:17 ` [PATCH 12/24] mac80211: " Joe Perches
@ 2011-08-29 21:17 ` Joe Perches
  2011-08-29 21:17 ` [PATCH 22/24] wireless: " Joe Perches
  2 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: John W. Linville, Johannes Berg
  Cc: David S. Miller, linux-wireless, netdev, linux-kernel

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/rfkill/rfkill-regulator.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/rfkill/rfkill-regulator.c b/net/rfkill/rfkill-regulator.c
index 18dc512..3ca7277 100644
--- a/net/rfkill/rfkill-regulator.c
+++ b/net/rfkill/rfkill-regulator.c
@@ -90,7 +90,6 @@ static int __devinit rfkill_regulator_probe(struct platform_device *pdev)
 				pdata->type,
 				&rfkill_regulator_ops, rfkill_data);
 	if (rf_kill == NULL) {
-		dev_err(&pdev->dev, "Cannot alloc rfkill device\n");
 		ret = -ENOMEM;
 		goto err_rfkill_alloc;
 	}
-- 
1.7.6.405.gc1be0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 22/24] wireless: Remove unnecessary OOM logging messages
  2011-08-29 21:17 [PATCH 00/24] net: Remove unnecessary OOM logging messages Joe Perches
  2011-08-29 21:17 ` [PATCH 12/24] mac80211: " Joe Perches
  2011-08-29 21:17 ` [PATCH 15/24] rfkill: " Joe Perches
@ 2011-08-29 21:17 ` Joe Perches
  2 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
  To: Johannes Berg, John W. Linville
  Cc: David S. Miller, linux-wireless, netdev, linux-kernel

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/wireless/lib80211_crypt_ccmp.c |    2 --
 net/wireless/lib80211_crypt_tkip.c |    4 ----
 net/wireless/lib80211_crypt_wep.c  |    4 ----
 net/wireless/util.c                |    5 ++---
 4 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/net/wireless/lib80211_crypt_ccmp.c b/net/wireless/lib80211_crypt_ccmp.c
index dacb3b4..755738d 100644
--- a/net/wireless/lib80211_crypt_ccmp.c
+++ b/net/wireless/lib80211_crypt_ccmp.c
@@ -77,8 +77,6 @@ static void *lib80211_ccmp_init(int key_idx)
 
 	priv->tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->tfm)) {
-		printk(KERN_DEBUG "lib80211_crypt_ccmp: could not allocate "
-		       "crypto API aes\n");
 		priv->tfm = NULL;
 		goto fail;
 	}
diff --git a/net/wireless/lib80211_crypt_tkip.c b/net/wireless/lib80211_crypt_tkip.c
index 7ea4f2b..3873484 100644
--- a/net/wireless/lib80211_crypt_tkip.c
+++ b/net/wireless/lib80211_crypt_tkip.c
@@ -101,7 +101,6 @@ static void *lib80211_tkip_init(int key_idx)
 	priv->tx_tfm_arc4 = crypto_alloc_blkcipher("ecb(arc4)", 0,
 						CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->tx_tfm_arc4)) {
-		printk(KERN_DEBUG pr_fmt("could not allocate crypto API arc4\n"));
 		priv->tx_tfm_arc4 = NULL;
 		goto fail;
 	}
@@ -109,7 +108,6 @@ static void *lib80211_tkip_init(int key_idx)
 	priv->tx_tfm_michael = crypto_alloc_hash("michael_mic", 0,
 						 CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->tx_tfm_michael)) {
-		printk(KERN_DEBUG pr_fmt("could not allocate crypto API michael_mic\n"));
 		priv->tx_tfm_michael = NULL;
 		goto fail;
 	}
@@ -117,7 +115,6 @@ static void *lib80211_tkip_init(int key_idx)
 	priv->rx_tfm_arc4 = crypto_alloc_blkcipher("ecb(arc4)", 0,
 						CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->rx_tfm_arc4)) {
-		printk(KERN_DEBUG pr_fmt("could not allocate crypto API arc4\n"));
 		priv->rx_tfm_arc4 = NULL;
 		goto fail;
 	}
@@ -125,7 +122,6 @@ static void *lib80211_tkip_init(int key_idx)
 	priv->rx_tfm_michael = crypto_alloc_hash("michael_mic", 0,
 						 CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->rx_tfm_michael)) {
-		printk(KERN_DEBUG pr_fmt("could not allocate crypto API michael_mic\n"));
 		priv->rx_tfm_michael = NULL;
 		goto fail;
 	}
diff --git a/net/wireless/lib80211_crypt_wep.c b/net/wireless/lib80211_crypt_wep.c
index 2f265e0..c130401 100644
--- a/net/wireless/lib80211_crypt_wep.c
+++ b/net/wireless/lib80211_crypt_wep.c
@@ -50,16 +50,12 @@ static void *lib80211_wep_init(int keyidx)
 
 	priv->tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->tx_tfm)) {
-		printk(KERN_DEBUG "lib80211_crypt_wep: could not allocate "
-		       "crypto API arc4\n");
 		priv->tx_tfm = NULL;
 		goto fail;
 	}
 
 	priv->rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC);
 	if (IS_ERR(priv->rx_tfm)) {
-		printk(KERN_DEBUG "lib80211_crypt_wep: could not allocate "
-		       "crypto API arc4\n");
 		priv->rx_tfm = NULL;
 		goto fail;
 	}
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 844ddb0..4252765 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -513,10 +513,9 @@ int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr,
 		if (head_need)
 			skb_orphan(skb);
 
-		if (pskb_expand_head(skb, head_need, 0, GFP_ATOMIC)) {
-			pr_err("failed to reallocate Tx buffer\n");
+		if (pskb_expand_head(skb, head_need, 0, GFP_ATOMIC))
 			return -ENOMEM;
-		}
+
 		skb->truesize += head_need;
 	}
 
-- 
1.7.6.405.gc1be0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-29 21:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-29 21:17 [PATCH 00/24] net: Remove unnecessary OOM logging messages Joe Perches
2011-08-29 21:17 ` [PATCH 12/24] mac80211: " Joe Perches
2011-08-29 21:17 ` [PATCH 15/24] rfkill: " Joe Perches
2011-08-29 21:17 ` [PATCH 22/24] wireless: " Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).