Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932255AbdCILzc (ORCPT ); Thu, 9 Mar 2017 06:55:32 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:57323 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754137AbdCILz0 (ORCPT ); Thu, 9 Mar 2017 06:55:26 -0500 Subject: Re: [PATCH v2 08/22] PCI: dwc: designware: Add EP mode support To: Christoph Hellwig , Joao Pinto , Kishon Vijay Abraham I References: <1487325042-28227-1-git-send-email-kishon@ti.com> <1487325042-28227-9-git-send-email-kishon@ti.com> <45e5288e-d11f-c855-af9b-692a42d878c6@synopsys.com> <58BE42B2.20305@ti.com> <02461be2-268d-485a-2bc4-3b148726d37d@synopsys.com> <58BFEC7D.3090608@ti.com> <35d539ba-956f-330e-c28d-b67c3d414578@synopsys.com> <58C00798.1030302@ti.com> <650c53fc-482c-feab-faa3-c30689d3d128@synopsys.com> <20170308191419.GA12085@infradead.org> CC: Bjorn Helgaas , Jingoo Han , , , , , , , From: Joao Pinto Message-ID: Date: Thu, 9 Mar 2017 11:55:01 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170308191419.GA12085@infradead.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.107.19.101] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 524 Lines: 17 Hi Christoph, ?s 7:14 PM de 3/8/2017, Christoph Hellwig escreveu: > On Wed, Mar 08, 2017 at 03:32:03PM +0000, Joao Pinto wrote: >> #define PCIE_GET_ATU_INB_UNR_REG_ADDR(region, register) \ >> ((0x3 << 20) | (region << 9) | \ >> (0x1 << 8) > > Can you turn this and any similar macro into inline functions? > Use an inline functions instead of macro is fine by me. In the initial patch I implemented as a macro since it only does simple bit shifts and nothing else and seemed simpler as a macro. Thanks, Joao