Skip to content

Commit 0c3d5a9

Browse files
JoePerchesdavem330
authored andcommitted
net: drivers/net: Remove unnecessary skb_copy_expand OOM messages
skb_copy_expand without __GFP_NOWARN already does a dump_stack on OOM so these messages are redundant. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 80d9f3a commit 0c3d5a9

File tree

7 files changed

+4
-21
lines changed

7 files changed

+4
-21
lines changed

drivers/net/ethernet/qualcomm/qca_spi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,6 @@ qcaspi_netdev_xmit(struct sk_buff *skb, struct net_device *dev)
705705
tskb = skb_copy_expand(skb, QCAFRM_HEADER_LEN,
706706
QCAFRM_FOOTER_LEN + pad_len, GFP_ATOMIC);
707707
if (!tskb) {
708-
netdev_dbg(qca->net_dev, "could not allocate tx_buff\n");
709708
qca->stats.out_of_mem++;
710709
return NETDEV_TX_BUSY;
711710
}

drivers/net/usb/lg-vl600.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,8 @@ static int vl600_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
157157

158158
s->current_rx_buf = skb_copy_expand(skb, 0,
159159
le32_to_cpup(&frame->len), GFP_ATOMIC);
160-
if (!s->current_rx_buf) {
161-
netif_err(dev, ifup, dev->net, "Reserving %i bytes "
162-
"for packet assembly failed.\n",
163-
le32_to_cpup(&frame->len));
160+
if (!s->current_rx_buf)
164161
dev->net->stats.rx_errors++;
165-
}
166162

167163
return 0;
168164
}

drivers/net/wimax/i2400m/usb-rx.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,6 @@ struct sk_buff *i2400mu_rx(struct i2400mu *i2400mu, struct sk_buff *rx_skb)
263263
new_skb = skb_copy_expand(rx_skb, 0, rx_size - rx_skb->len,
264264
GFP_KERNEL);
265265
if (new_skb == NULL) {
266-
if (printk_ratelimit())
267-
dev_err(dev, "RX: Can't reallocate skb to %d; "
268-
"RX dropped\n", rx_size);
269266
kfree_skb(rx_skb);
270267
rx_skb = NULL;
271268
goto out; /* drop it...*/

drivers/net/wireless/ti/wl1251/tx.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,8 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb,
221221
struct sk_buff *newskb = skb_copy_expand(skb, 0, 3,
222222
GFP_KERNEL);
223223

224-
if (unlikely(newskb == NULL)) {
225-
wl1251_error("Can't allocate skb!");
224+
if (unlikely(newskb == NULL))
226225
return -EINVAL;
227-
}
228226

229227
tx_hdr = (struct tx_double_buffer_desc *) newskb->data;
230228

drivers/usb/gadget/function/f_eem.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ static int eem_unwrap(struct gether *port,
507507
0,
508508
GFP_ATOMIC);
509509
if (unlikely(!skb3)) {
510-
DBG(cdev, "unable to realign EEM packet\n");
511510
dev_kfree_skb_any(skb2);
512511
continue;
513512
}

net/mac80211/rx.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2549,11 +2549,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
25492549

25502550
fwd_skb = skb_copy_expand(skb, local->tx_headroom +
25512551
sdata->encrypt_headroom, 0, GFP_ATOMIC);
2552-
if (!fwd_skb) {
2553-
net_info_ratelimited("%s: failed to clone mesh frame\n",
2554-
sdata->name);
2552+
if (!fwd_skb)
25552553
goto out;
2556-
}
25572554

25582555
fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data;
25592556
fwd_hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_RETRY);

net/netfilter/nfnetlink_queue.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -833,11 +833,8 @@ nfqnl_mangle(void *data, int data_len, struct nf_queue_entry *e, int diff)
833833
if (diff > skb_tailroom(e->skb)) {
834834
nskb = skb_copy_expand(e->skb, skb_headroom(e->skb),
835835
diff, GFP_ATOMIC);
836-
if (!nskb) {
837-
printk(KERN_WARNING "nf_queue: OOM "
838-
"in mangle, dropping packet\n");
836+
if (!nskb)
839837
return -ENOMEM;
840-
}
841838
kfree_skb(e->skb);
842839
e->skb = nskb;
843840
}

0 commit comments

Comments
 (0)