From patchwork Tue Feb 19 06:33:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 221626 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 09D1B2C0094 for ; Tue, 19 Feb 2013 17:33:56 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757619Ab3BSGdw (ORCPT ); Tue, 19 Feb 2013 01:33:52 -0500 Received: from mail-ee0-f42.google.com ([74.125.83.42]:53095 "EHLO mail-ee0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757485Ab3BSGdw (ORCPT ); Tue, 19 Feb 2013 01:33:52 -0500 Received: by mail-ee0-f42.google.com with SMTP id b47so3265669eek.29 for ; Mon, 18 Feb 2013 22:33:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=6sLCY8+AR6Kvu5EmZpUyP7mo8biAxFIiTkrKK1/p0Co=; b=EvEDtQ8ldPdLlFgG9VpbjwNHdvX7G4UDA3XWC+NxLKh1zxPlmEIK32nCLH7XxqPPAY NLzA22usw4hO0zLewU+29PqbKln9zhfvgMTLoHZDw58NCeVWC1hzVfwhXa50nAJUjwzL PqRjLMTIihYlSyN64gU8RAdTBbXb6v/0pPnj4i+CBDjvUen+tIUQIeo5RSytrqJ/q+8g RlEqwTaIX0m2H4t6py9Akzv+HnMnUBfx6i2kk/ABW2PJ4VbXy3UihX3ghNT8uv2cnM4e tCj6NV5TQJ02b6rY1QxWBD91Jd+5NtEfbGUA0yS9NQKaAUEVSzgzdOfq5iJ0yJtYujYF fWdg== X-Received: by 10.14.219.7 with SMTP id l7mr29586912eep.12.1361255630832; Mon, 18 Feb 2013 22:33:50 -0800 (PST) Received: from linux-sonyvaio.poz.roche.com (gw.bas.roche.com. [196.3.50.254]) by mx.google.com with ESMTPS id f47sm56536069eep.13.2013.02.18.22.33.48 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Feb 2013 22:33:49 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: netdev@vger.kernel.org, "David S. Miller" Cc: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH] b44: use helper function for aligning IP header Date: Tue, 19 Feb 2013 07:33:43 +0100 Message-Id: <1361255623-26927-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Don't duplicate netdev_alloc_skb_ip_align which by the way uses NET_IP_ALIGN instead of hardcoded "2". Signed-off-by: Rafał Miłecki --- I don't have hardware to check this, so please review if it's OK. It's quite trivial so I hope I couldn't do anything wrong. --- drivers/net/ethernet/broadcom/b44.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c index 330b090..041aea6 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c @@ -809,11 +809,10 @@ static int b44_rx(struct b44 *bp, int budget) struct sk_buff *copy_skb; b44_recycle_rx(bp, cons, bp->rx_prod); - copy_skb = netdev_alloc_skb(bp->dev, len + 2); + copy_skb = netdev_alloc_skb_ip_align(bp->dev, len); if (copy_skb == NULL) goto drop_it_no_recycle; - skb_reserve(copy_skb, 2); skb_put(copy_skb, len); /* DMA sync done above, copy just the actual packet */ skb_copy_from_linear_data_offset(skb, RX_PKT_OFFSET,