From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF976C04AB3 for ; Tue, 28 May 2019 01:53:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C54D22075E for ; Tue, 28 May 2019 01:53:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HrzxUfwL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C54D22075E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=f1b6IMW2aWc5m+B3P8VpWC4SMEAXgLwskQpmjPz/eCQ=; b=HrzxUfwLo7JONk SM+X2Ffgd3YBEAkA9l7HIoLt+q8rwAiqwnuKhwnzi9PgkaE0t9lCe5FdINS/wVkb/gfHDbgV0tYnX 6OvlZPaJNEZRdmYo390t5oMu/9p3K1xyuKfVadYsh5M/z7TWnMNUM8H8xxYfL9R7RRrboTNjkk+8k w7BQFMptkP5JS/DEuGoTaNKxIXMO9Dgo5g7PXXfvbDIC3LAcCmGWnJ0DfxkaEmQnYINxDkepRsMuC 6tdrL4r3YwOA914QR7h+Yv1rAgDtXN4Rg6g45dGrXqutOhs5GCCxffpJhWwd/SJJn6nrvBof0O51d XpoiX8ZBP4WM1LApoZEg==; 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 1hVRIh-00086L-7B; Tue, 28 May 2019 01:53:15 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVRId-00085x-ED; Tue, 28 May 2019 01:53:13 +0000 X-UUID: 366fbe3dbfa342e1a7cd8a7e0ac19b8a-20190527 X-UUID: 366fbe3dbfa342e1a7cd8a7e0ac19b8a-20190527 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 511790623; Mon, 27 May 2019 17:52:54 -0800 Received: from MTKMBS31N1.mediatek.inc (172.27.4.69) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 27 May 2019 18:52:53 -0700 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 28 May 2019 09:52:50 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 28 May 2019 09:52:49 +0800 Message-ID: <1559008369.24897.66.camel@mhfsdcap03> Subject: Re: [v3, PATCH] net: stmmac: add support for hash table size 128/256 in dwmac4 From: biao huang To: David Miller Date: Tue, 28 May 2019 09:52:49 +0800 In-Reply-To: <20190527.100800.1719164073038257292.davem@davemloft.net> References: <1558926867-16472-1-git-send-email-biao.huang@mediatek.com> <1558926867-16472-2-git-send-email-biao.huang@mediatek.com> <20190527.100800.1719164073038257292.davem@davemloft.net> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190527_185311_483777_E1AC3181 X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jianguo.zhang@mediatek.com, alexandre.torgue@st.com, boon.leong.ong@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, yt.shen@mediatek.com, joabreu@synopsys.com, linux-mediatek@lists.infradead.org, mcoquelin.stm32@gmail.com, matthias.bgg@gmail.com, peppe.cavallaro@st.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dear David, On Mon, 2019-05-27 at 10:08 -0700, David Miller wrote: > From: Biao Huang > Date: Mon, 27 May 2019 11:14:27 +0800 > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c > > index 5e98da4..029a3db 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c > > @@ -403,41 +403,50 @@ static void dwmac4_set_filter(struct mac_device_info *hw, > > struct net_device *dev) > > { > > void __iomem *ioaddr = (void __iomem *)dev->base_addr; > > - unsigned int value = 0; > > + unsigned int value; > > + int numhashregs = (hw->multicast_filter_bins >> 5); > > + int mcbitslog2 = hw->mcast_bits_log2; > > + int i; > > Please retain the reverse christmas tree ordering here. I'm a little confused about the reverse xmas tree ordering. should I reorder them only according to the total length like this: void __iomem *ioaddr = (void __iomem *)dev->base_addr; int numhashregs = (hw->multicast_filter_bins >> 5); int mcbitslog2 = hw->mcast_bits_log2; unsigned int value; int i; or should I gather the same type together, and order types as reverse xmas tree, then order the same type definitions as reverse xmas tree, like this: void __iomem *ioaddr = (void __iomem *)dev->base_addr; unsigned int value; int numhashregs = (hw->multicast_filter_bins >> 5); int mcbitslog2 = hw->mcast_bits_log2; int i; Thank you. > > Thank you. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel