From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id A0C002BB4 for ; Tue, 14 Nov 2017 14:44:52 +0100 (CET) Received: by mail-wm0-f67.google.com with SMTP id n74so18006944wmi.1 for ; Tue, 14 Nov 2017 05:44:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=TeZlPenOWCShP9dcL3Qg2srexxWMFtiaB3QsWsYGpiU=; b=i7WPzvtY/YhZM1rQB1N/wAeK0GNWrywD8ZrMb/VwBbnNAkAOXTvmi1P/RqFAJqj453 pcw8fiQPjQ6wSedYYFIULZGjZKTDd8GfP0O0Hpt64kEiQSbSGiUqtta8jYF0F5kt1Xbf JrhSjfx5tmRN5O/oA6BFHudlSVpZXtqrRXx0Ho60juFCUKG5Uv48EIp1qfF+Iq983dzv Lw08qGJAz5f6RWciLI6+ZMlQski04UvLW2mMahSDu4QdSenzBK3GYQwBHSJe9SqD9sHG Bzw6cDTUdLDMw58WCP9Z2riexG2f/nnJnL16N4xj+1hjldrNFT5ewKDIsdPnVCeX1Qd7 MInQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=TeZlPenOWCShP9dcL3Qg2srexxWMFtiaB3QsWsYGpiU=; b=nStgjUkLfXJPZ1b/uvrfHmCO2ZbXrfNWIHFIb+c15GPNuudiZMPV6JL0420igffJoS P5cLAjCmfnUi2xufE58iWquRzEAP6VTnSJ7N6cJGHxbs8upV2x9aApW6iZ/MNAgTlF4C iqIJi0fnJtWy47OT2+Bjoxdl6TWSXpyXAwSFfUg/HVvtujQEzP0pwvc57/g0R2F1i/Dy HZtxSpPwnuyKARpKpKEhxpuz85GBUu/egiR3RbZ7YRqtFia4yYmZqmOfI6Hr/I0T1ByO zNq5rPKCD7y8xWtvCz1B0KVt9PZn7xbxjffoNLV2jcWk/r6qrU8aure0/V/TqXiHNbiC NqNw== X-Gm-Message-State: AJaThX5TVncHUEWJo2HUt4GJfkebKiLPPZsxUsdu1KoV89pqDA0zeqik 2PzFFBlrT4qzSD86d7pF5zm3DKFl X-Google-Smtp-Source: AGs4zMbgMfIVQEAbZukjRXM9OkU2fPohqD+wRpKkz51GsnrpHpQ9C8F/tq4cKT2arxuMVsvvu1sw8g== X-Received: by 10.80.207.134 with SMTP id h6mr17482240edk.189.1510667092062; Tue, 14 Nov 2017 05:44:52 -0800 (PST) Received: from [10.61.0.167] (bba193485.alshamil.net.ae. [217.165.96.191]) by smtp.gmail.com with ESMTPSA id m23sm18179910edc.53.2017.11.14.05.44.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Nov 2017 05:44:51 -0800 (PST) From: Ilya Matveychikov Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Message-Id: <3DBFD712-8DA6-4FDB-B139-66398039B4C0@gmail.com> Date: Tue, 14 Nov 2017 17:44:49 +0400 To: dev@dpdk.org X-Mailer: Apple Mail (2.3273) Subject: [dpdk-dev] [PATCH] mbuf: cleanup rte_pktmbuf_lastseg(), remove useless variable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 13:44:52 -0000 Fixes: af75078fece3 ("first public release") Cc: intel.com Signed-off-by: Ilya V. Matveychikov --- There is no reason to have local variable m2 or am I wrong? lib/librte_mbuf/rte_mbuf.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 7e326bbc2..be79e3728 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1538,12 +1538,10 @@ static inline uint16_t = rte_pktmbuf_tailroom(const struct rte_mbuf *m) */ static inline struct rte_mbuf *rte_pktmbuf_lastseg(struct rte_mbuf *m) { - struct rte_mbuf *m2 =3D (struct rte_mbuf *)m; - __rte_mbuf_sanity_check(m, 1); - while (m2->next !=3D NULL) - m2 =3D m2->next; - return m2; + while (m->next !=3D NULL) + m =3D m->next; + return m; } /** -- 2.15.0=