Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp524016img; Wed, 20 Mar 2019 05:44:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSW2ZlrbmV4znLMvcIEDG4DO3KfKN5Cnced949XMpkGEkzSSRnJGk+bQUaxVfp+Ygm6qrC X-Received: by 2002:a17:902:bd97:: with SMTP id q23mr8043273pls.94.1553085874075; Wed, 20 Mar 2019 05:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553085874; cv=none; d=google.com; s=arc-20160816; b=ic2HMeOnqhGEbajyOYoz6Ue8MiOYcfz+eTQCiDiNQLTKoD6yaT0h6B4iKGRwd+9K2C py/EIsVMAf0LzrxDSkly6YYitYvACoIu5946CnWSVQqozut7okGDJzuBc6+cApgh1loG 0it/XNssqLLBA8DqKBwwl9H8IuMNZ93Tq/zdYl8mmmzFPgRuLGwaOmTGK0fwir3Pgqtk XGMoNw8TyA+25oj9xHSRfOiWqgxhMlP/D9gXbD3WIr4UwXErA5qfoSLyaQqls4fD5SKu 8Ip1rVxNmOi9SLvdi4MbNCcaS9c4bRJMtn7/fVVvqN3dTJ3EFOZMAQEbgSWqHxCFQKaX MaFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=04XwcsfTZ1R0QsHYMFDJsfOYyv8/svDLPPFH2qpFOh0=; b=YDIZLM9lLoAHu2CnFp8MaMWqZrcEb9FXEMuj11IM+7VcNijdAaLH5LtLTqub3ls8cT o/PrAFZugMj6u62vNpE2jW/1Dn88f3vnYLYn0yMkzxrubc8vYTI2F9Gp0WZiMH0SIrGd znlVjNV0jAD2iie75XZ+qoWoNo7+69dbeoze+Z1IS6kVcx0poKSp7VJjyyvK+AoW3E32 XZsdv++frSRsmtvctZGj3eN4rX56wOOSBfVeIO5noJqEktoRBFZEiBJZjX39rft+k4Ey hAPevr5B13E7Adls6aW28np9NSpobPEjn62LNDALsqo7pfS9CayTEyjO+5dt0wnHf1sJ LxRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YSfanRc2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p19si1819767plq.29.2019.03.20.05.44.19; Wed, 20 Mar 2019 05:44:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YSfanRc2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727763AbfCTMmv (ORCPT + 99 others); Wed, 20 Mar 2019 08:42:51 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:44471 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727180AbfCTMmu (ORCPT ); Wed, 20 Mar 2019 08:42:50 -0400 Received: by mail-lf1-f66.google.com with SMTP id u9so1737746lfe.11 for ; Wed, 20 Mar 2019 05:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=04XwcsfTZ1R0QsHYMFDJsfOYyv8/svDLPPFH2qpFOh0=; b=YSfanRc2TSVyk5C12aZBx6feqH4EonczhprKzog/b3Fs/K9wlv0KzGxES2Hd2H3Svv by5Cn/EQ7MaKq6BlyTlqiMnUTAIbQI+/mHNlBfgZSyX9JgtKwHsyq9/i1wW65GotkR8C Mo2BL77rZDXkxyHwhlZ7rmpykF3w/qOkN0s0RSV8WBVCKHrNO81pRADCVKut+8Ogytqv Ri8Ftq7zjSWOrZGBrWA+QvPH+HgR2jIqRHSyc2ar/dJOYAsLJMZUsS0cr0HhLq62oXbR pCnZlLlxCd2ImPREh1MrfvIMLYXiNorzPzZPoARqBKwP5RnzAIrYXp6Nt5+SULPS3Mug ms4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=04XwcsfTZ1R0QsHYMFDJsfOYyv8/svDLPPFH2qpFOh0=; b=hjPDothoKqlGkImldCxO6mWpFVmm9hziyg32WaI8oMsoBafiwo2eH8TM3ugbD5HMbl KcrhaZuLAJOgpLwSciN87P48saEWpdfw7WObqcB9vpvIiuYNM7BSmSr/0QKqUFzEZ2kT lpq3oI8+njv0+yxaPKGaRdg6qVjLpfJUXvKewV/kzT+dHpVtRhlvHmfDZC6nLtUURJfL tYxfGVeJ85324t2OWSNci4pDgJ8JigPVGIwh1KqWrLLkXyvutxHk8bjuyU5uw469qVzm JIk+3cnTyPyq+lPv7yPYHP0MGoI810LlDtcewZH1QyI/7qx8vTKwGU1Nv0Jcu0lHtpGC gZNQ== X-Gm-Message-State: APjAAAUI9QoFKYalVTkxAX3UaNtF0zyCyEB6wmRSGCiPNJ6FIX0ol7eh AjAlMxoS+XJVbCH1K/qkwPo= X-Received: by 2002:a19:a40b:: with SMTP id q11mr16159371lfc.33.1553085768910; Wed, 20 Mar 2019 05:42:48 -0700 (PDT) Received: from alpha ([178.71.210.108]) by smtp.gmail.com with ESMTPSA id q22sm322746ljc.59.2019.03.20.05.42.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Mar 2019 05:42:48 -0700 (PDT) Received: (nullmailer pid 15795 invoked by uid 1000); Wed, 20 Mar 2019 12:45:23 -0000 From: Ivan Safonov To: Greg Kroah-Hartman Cc: Bhagyashri Dighole , Jeff Kirsher , Wentao Cai , Alexander Duyck , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Ivan Safonov Subject: [PATCH] staging: netlogic: replace skb_put/pull pair with skb_reserve Date: Wed, 20 Mar 2019 15:45:19 +0300 Message-Id: <20190320124519.15751-1-insafonov@gmail.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The sequence skb_put(skb); skb_pull(skb); leads to the same result as skb_reserve(skb); but second is a little shorter and clearer. Signed-off-by: Ivan Safonov --- drivers/staging/netlogic/xlr_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index 10f14a5cf490..1897b711d66d 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -87,8 +87,7 @@ static inline unsigned char *xlr_alloc_skb(void) if (!skb) return NULL; skb_data = skb->data; - skb_put(skb, MAC_SKB_BACK_PTR_SIZE); - skb_pull(skb, MAC_SKB_BACK_PTR_SIZE); + skb_reserve(skb, MAC_SKB_BACK_PTR_SIZE); memcpy(skb_data, &skb, buf_len); return skb->data; -- 2.19.2