From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754977AbbI0HWi (ORCPT ); Sun, 27 Sep 2015 03:22:38 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:50958 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753354AbbI0HWg (ORCPT ); Sun, 27 Sep 2015 03:22:36 -0400 Message-ID: <5607986D.7050700@hisilicon.com> Date: Sun, 27 Sep 2015 15:19:09 +0800 From: huangdaode User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: David Miller CC: , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH net-next v3] net: Fix Hisilicon Network Subsystem Support Compilation References: <1443169790-54861-1-git-send-email-huangdaode@hisilicon.com> <20150925.214256.1901015223799070196.davem@davemloft.net> In-Reply-To: <20150925.214256.1901015223799070196.davem@davemloft.net> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.61.13.165] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/9/26 12:42, David Miller wrote: > From: huangdaode > Date: Fri, 25 Sep 2015 16:29:50 +0800 > >> @@ -191,9 +191,12 @@ static void hns_rcb_ring_init(struct ring_pair_cb *ring_pair, int ring_type) >> if (ring_type == RX_RING) { >> dsaf_write_dev(q, RCB_RING_RX_RING_BASEADDR_L_REG, >> (u32)dma); >> +#ifdef CONFIG_64BIT >> dsaf_write_dev(q, RCB_RING_RX_RING_BASEADDR_H_REG, >> (u32)(dma >> 32)); >> - >> +#else >> + dsaf_write_dev(q, RCB_RING_RX_RING_BASEADDR_H_REG, 0); >> +#endif >> dsaf_write_dev(q, RCB_RING_RX_RING_BD_LEN_REG, >> bd_size_type); >> dsaf_write_dev(q, RCB_RING_RX_RING_BD_NUM_REG, > CONFIG_64BIT doesn't tell you if _DMA_ addresses are 64-bit or not. > > Furthermore there is a portable way to shift a 32-bit value down > 32-bits whilst avoiding warnings. > > (x >> 31) >> 1 > > So you should definitely use that instead of the CONFIG_64BIT test. > > . agreed.