From patchwork Tue Sep 25 19:52:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10614773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 747FF15E8 for ; Tue, 25 Sep 2018 19:54:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6427B2AB6D for ; Tue, 25 Sep 2018 19:54:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 582412AC89; Tue, 25 Sep 2018 19:54:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 909B92AB6D for ; Tue, 25 Sep 2018 19:54:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=4TSbBg7PwBWkzWUawuYDPQB4TAcuvSFBTfKy/r/bLtw=; b=pnc TqG7FQME4hlfW2X++fdQXjbLLt4D1/BkDvsOPmV0mHEXif4lt6mg1RF5Anfi2WQl0jyjKx6MR7tlM rCHfSGbo2X3j5weaUJyjqaRd2rB37PRt/0xNh34KJvBlRdsrGVw1DhNEpA7h/bfnktjA4WpktEdOD 4t7ppuO5uOqkkkuykYChezZfdj4GUmiUq9AFjULsQLIM6zBOSOQPrxEQr8lP7Bb0+KEg9Av9Eg4qx ypK5fkLEXln0ZX41rkqy1M0+aNzveCcF2df6/VqKTtbE/kNR4JG9Vtokzq24XJEbepJIY5NasV3vj 8TzqrMfK6SdKU+85mGOFEMvP1JWxbqQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g4tPI-00069K-4Q; Tue, 25 Sep 2018 19:54:04 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g4tOs-00066B-UR for linux-mediatek@lists.infradead.org; Tue, 25 Sep 2018 19:53:42 +0000 Received: from smtp2.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 911AA49D1F; Tue, 25 Sep 2018 21:53:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id HkMqyK3pWIe2; Tue, 25 Sep 2018 21:53:03 +0200 (CEST) From: Hauke Mehrtens To: kvalo@codeaurora.org, lorenzo.bianconi@redhat.com Subject: [PATCH] mt76: use skb_pad() instead of __skb_pad() Date: Tue, 25 Sep 2018 21:52:51 +0200 Message-Id: <20180925195251.10568-1-hauke@hauke-m.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180925_125339_159788_C7F55682 X-CRM114-Status: GOOD ( 15.82 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: matthias.bgg@gmail.com, linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org, Hauke Mehrtens MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP mt76 uses __skb_pad() with free_on_error set to true, this is the same as calling skb_pad(). This patch does not change any functionality, but it makes it easier to backport this driver in backports, because skb_pad() is also available in older kernel versions. Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer") Signed-off-by: Hauke Mehrtens --- drivers/net/wireless/mediatek/mt76/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c index 7780b07543bb..e03de13f5afe 100644 --- a/drivers/net/wireless/mediatek/mt76/usb.c +++ b/drivers/net/wireless/mediatek/mt76/usb.c @@ -535,7 +535,7 @@ int mt76u_skb_dma_info(struct sk_buff *skb, int port, u32 flags) } if (unlikely(pad)) { - if (__skb_pad(last, pad, true)) + if (skb_pad(last, pad)) return -ENOMEM; __skb_put(last, pad); }