Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751351AbdH1XT1 (ORCPT ); Mon, 28 Aug 2017 19:19:27 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:50900 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751189AbdH1XT0 (ORCPT ); Mon, 28 Aug 2017 19:19:26 -0400 Date: Mon, 28 Aug 2017 16:19:24 -0700 (PDT) Message-Id: <20170828.161924.1286298670313299855.davem@davemloft.net> To: yanhaishuang@cmss.chinamobile.com Cc: sathya.perla@broadcom.com, ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com, somnath.kotur@broadcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] be2net: Fix some u16 fields appropriately From: David Miller In-Reply-To: <1503818685-32068-1-git-send-email-yanhaishuang@cmss.chinamobile.com> References: <1503818685-32068-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 28 Aug 2017 16:19:25 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 936 Lines: 30 From: Haishuang Yan Date: Sun, 27 Aug 2017 15:24:45 +0800 > In be_tx_compl_process, frag_index declared as u32, so it's better to > declare last_index as u32 also. > > CC: Ajit Khaparde > Fixes: b0fd2eb28bd4 ("be2net: Declare some u16 fields as u32 to improve > performance") > Signed-off-by: Haishuang Yan That is not a legitimate reason for making this change. > @@ -255,7 +255,7 @@ struct be_tx_stats { > /* Structure to hold some data of interest obtained from a TX CQE */ > struct be_tx_compl_info { > u8 status; /* Completion status */ > - u16 end_index; /* Completed TXQ Index */ > + u32 end_index; /* Completed TXQ Index */ > }; > > struct be_tx_obj { The ->end_index comes solely from: txcp->end_index = GET_TX_COMPL_BITS(wrb_index, compl); Which is precisely a 16-bit value. I'm not applying this, sorry.