* [B.A.T.M.A.N.] [PATCH 00/24] net: Remove unnecessary OOM logging messages
@ 2011-08-29 21:17 Joe Perches
2011-08-29 21:17 ` [B.A.T.M.A.N.] [PATCH 05/24] batman-adv: " Joe Perches
0 siblings, 1 reply; 3+ 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: bridge, linux-kernel
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] 3+ messages in thread
* [B.A.T.M.A.N.] [PATCH 05/24] batman-adv: Remove unnecessary OOM logging messages
2011-08-29 21:17 [B.A.T.M.A.N.] [PATCH 00/24] net: Remove unnecessary OOM logging messages Joe Perches
@ 2011-08-29 21:17 ` Joe Perches
2011-08-30 10:58 ` Marek Lindner
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2011-08-29 21:17 UTC (permalink / raw)
To: Marek Lindner, Simon Wunderlich
Cc: netdev, b.a.t.m.a.n, David S. Miller, 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/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 +---
5 files changed, 7 insertions(+), 24 deletions(-)
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index bf91e4d..6a5312e 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -455,11 +455,8 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
dev_hold(net_dev);
hard_iface = kmalloc(sizeof(*hard_iface), GFP_ATOMIC);
- if (!hard_iface) {
- pr_err("Can't add interface (%s): out of memory\n",
- net_dev->name);
+ if (!hard_iface)
goto release_dev;
- }
ret = sysfs_add_hardif(&hard_iface->hardif_obj, net_dev);
if (ret)
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 79b9ae5..fb87bdc 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -117,8 +117,6 @@ int mesh_init(struct net_device *soft_iface)
goto end;
err:
- pr_err("Unable to allocate memory for mesh information structures: "
- "out of mem ?\n");
mesh_free(soft_iface);
return -1;
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index d448018..6e558cd 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -493,10 +493,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
data_ptr = kmalloc(max_if_num * sizeof(unsigned long) * NUM_WORDS,
GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own,
(max_if_num - 1) * sizeof(unsigned long) * NUM_WORDS);
@@ -504,10 +502,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
orig_node->bcast_own = data_ptr;
data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own_sum,
(max_if_num - 1) * sizeof(uint8_t));
@@ -562,10 +558,8 @@ static int orig_node_del_if(struct orig_node *orig_node,
chunk_size = sizeof(unsigned long) * NUM_WORDS;
data_ptr = kmalloc(max_if_num * chunk_size, GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
/* copy first part */
memcpy(data_ptr, orig_node->bcast_own, del_if_num * chunk_size);
@@ -583,10 +577,8 @@ free_bcast_own:
goto free_own_sum;
data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own_sum,
del_if_num * sizeof(uint8_t));
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 402fd96..9b5e69e 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -800,10 +800,8 @@ struct net_device *softif_create(const char *name)
soft_iface = alloc_netdev(sizeof(*bat_priv), name, interface_setup);
- if (!soft_iface) {
- pr_err("Unable to allocate the batman interface: %s\n", name);
+ if (!soft_iface)
goto out;
- }
ret = register_netdevice(soft_iface);
if (ret < 0) {
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c
index fb9b19f..f81a6b6 100644
--- a/net/batman-adv/vis.c
+++ b/net/batman-adv/vis.c
@@ -887,10 +887,8 @@ int vis_init(struct bat_priv *bat_priv)
}
bat_priv->my_vis_info = kmalloc(MAX_VIS_PACKET_SIZE, GFP_ATOMIC);
- if (!bat_priv->my_vis_info) {
- pr_err("Can't initialize vis packet\n");
+ if (!bat_priv->my_vis_info)
goto err;
- }
bat_priv->my_vis_info->skb_packet = dev_alloc_skb(sizeof(*packet) +
MAX_VIS_PACKET_SIZE +
--
1.7.6.405.gc1be0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH 05/24] batman-adv: Remove unnecessary OOM logging messages
2011-08-29 21:17 ` [B.A.T.M.A.N.] [PATCH 05/24] batman-adv: " Joe Perches
@ 2011-08-30 10:58 ` Marek Lindner
0 siblings, 0 replies; 3+ messages in thread
From: Marek Lindner @ 2011-08-30 10:58 UTC (permalink / raw)
To: b.a.t.m.a.n
Cc: Joe Perches, netdev, David S. Miller, Simon Wunderlich,
linux-kernel
On Monday, August 29, 2011 23:17:24 Joe Perches wrote:
> 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.
Applied in our tree.
Thanks,
Marek
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-30 10:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-29 21:17 [B.A.T.M.A.N.] [PATCH 00/24] net: Remove unnecessary OOM logging messages Joe Perches
2011-08-29 21:17 ` [B.A.T.M.A.N.] [PATCH 05/24] batman-adv: " Joe Perches
2011-08-30 10:58 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox