net: drivers/net: Remove unnecessary skb_copy_expand OOM messages
authorJoe Perches <joe@perches.com>
Mon, 12 Mar 2018 15:07:12 +0000 (08:07 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Mar 2018 18:28:03 +0000 (14:28 -0400)
skb_copy_expand without __GFP_NOWARN already does a dump_stack
on OOM so these messages are redundant.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/qca_spi.c
drivers/net/usb/lg-vl600.c
drivers/net/wimax/i2400m/usb-rx.c
drivers/net/wireless/ti/wl1251/tx.c
drivers/usb/gadget/function/f_eem.c
net/mac80211/rx.c
net/netfilter/nfnetlink_queue.c

index 9c236298fe2125cf26afef756cfd5f3f7250098b..5803cd6db406c7f9c5426ceb87bf062d4f0434fb 100644 (file)
@@ -705,7 +705,6 @@ qcaspi_netdev_xmit(struct sk_buff *skb, struct net_device *dev)
                tskb = skb_copy_expand(skb, QCAFRM_HEADER_LEN,
                                       QCAFRM_FOOTER_LEN + pad_len, GFP_ATOMIC);
                if (!tskb) {
-                       netdev_dbg(qca->net_dev, "could not allocate tx_buff\n");
                        qca->stats.out_of_mem++;
                        return NETDEV_TX_BUSY;
                }
index dbabd7ca5268a73b9b4b159199c867dd647b1d10..257916f172cdf1c9524a238415b05f9c228a9f4a 100644 (file)
@@ -157,12 +157,8 @@ static int vl600_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 
                s->current_rx_buf = skb_copy_expand(skb, 0,
                                le32_to_cpup(&frame->len), GFP_ATOMIC);
-               if (!s->current_rx_buf) {
-                       netif_err(dev, ifup, dev->net, "Reserving %i bytes "
-                                       "for packet assembly failed.\n",
-                                       le32_to_cpup(&frame->len));
+               if (!s->current_rx_buf)
                        dev->net->stats.rx_errors++;
-               }
 
                return 0;
        }
index b78ee676e1029fc21d5ed189b118f43b62aac631..5b64bda7d9e71969c535b93d983235e7f5530ceb 100644 (file)
@@ -263,9 +263,6 @@ retry:
                new_skb = skb_copy_expand(rx_skb, 0, rx_size - rx_skb->len,
                                          GFP_KERNEL);
                if (new_skb == NULL) {
-                       if (printk_ratelimit())
-                               dev_err(dev, "RX: Can't reallocate skb to %d; "
-                                       "RX dropped\n", rx_size);
                        kfree_skb(rx_skb);
                        rx_skb = NULL;
                        goto out;       /* drop it...*/
index de2fa67055745cd935625eace6a00e4c6c94bd92..12ed14ebc3074345fea7ca16b3f2a24efaabe5af 100644 (file)
@@ -221,10 +221,8 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb,
                        struct sk_buff *newskb = skb_copy_expand(skb, 0, 3,
                                                                 GFP_KERNEL);
 
-                       if (unlikely(newskb == NULL)) {
-                               wl1251_error("Can't allocate skb!");
+                       if (unlikely(newskb == NULL))
                                return -EINVAL;
-                       }
 
                        tx_hdr = (struct tx_double_buffer_desc *) newskb->data;
 
index 37557651b600aa8aed271dd128e44745d190cbaf..c13befa311107d9b4447a63f761e9bffb420534a 100644 (file)
@@ -507,7 +507,6 @@ static int eem_unwrap(struct gether *port,
                                                0,
                                                GFP_ATOMIC);
                        if (unlikely(!skb3)) {
-                               DBG(cdev, "unable to realign EEM packet\n");
                                dev_kfree_skb_any(skb2);
                                continue;
                        }
index d01743234cf686795229983e73cca778d421ad2f..9c898a3688c6cac59ec65c79053e67c492fe2646 100644 (file)
@@ -2549,11 +2549,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
 
        fwd_skb = skb_copy_expand(skb, local->tx_headroom +
                                       sdata->encrypt_headroom, 0, GFP_ATOMIC);
-       if (!fwd_skb) {
-               net_info_ratelimited("%s: failed to clone mesh frame\n",
-                                   sdata->name);
+       if (!fwd_skb)
                goto out;
-       }
 
        fwd_hdr =  (struct ieee80211_hdr *) fwd_skb->data;
        fwd_hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_RETRY);
index 59e2833c17f18a8fc8571f9ee3e91c8d8e0b297b..9f572ed56208992bfd65efc0817e0e5e8876e334 100644 (file)
@@ -833,11 +833,8 @@ nfqnl_mangle(void *data, int data_len, struct nf_queue_entry *e, int diff)
                if (diff > skb_tailroom(e->skb)) {
                        nskb = skb_copy_expand(e->skb, skb_headroom(e->skb),
                                               diff, GFP_ATOMIC);
-                       if (!nskb) {
-                               printk(KERN_WARNING "nf_queue: OOM "
-                                     "in mangle, dropping packet\n");
+                       if (!nskb)
                                return -ENOMEM;
-                       }
                        kfree_skb(e->skb);
                        e->skb = nskb;
                }