From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755972AbcIKNTr (ORCPT ); Sun, 11 Sep 2016 09:19:47 -0400 Received: from mga06.intel.com ([134.134.136.31]:34683 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753947AbcIKNTp (ORCPT ); Sun, 11 Sep 2016 09:19:45 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,317,1470726000"; d="scan'208";a="7041486" From: "Levy, Amir (Jer)" To: Andreas Noever CC: Greg KH , Bjorn Helgaas , Jonathan Corbet , "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-doc@vger.kernel.org" , thunderbolt-linux , "Westerberg, Mika" , "Winkler, Tomas" Subject: RE: [PATCH v6 2/8] thunderbolt: Updating the register definitions Thread-Topic: [PATCH v6 2/8] thunderbolt: Updating the register definitions Thread-Index: AQHR6+/IDbGH1th1lUCiEOGklWpigaBzdUgAgAELkFA= Date: Sun, 11 Sep 2016 13:19:38 +0000 Message-ID: References: <1470054233-4309-1-git-send-email-amir.jer.levy@intel.com> <1470054233-4309-3-git-send-email-amir.jer.levy@intel.com> In-Reply-To: Accept-Language: he-IL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.184.70.10] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u8BDK0ct008528 On Sun, Sep 11 2016, 03:02 AM, Andreas Noever wrote: > On Mon, Aug 1, 2016 at 2:23 PM, Amir Levy wrote: > > Adding more Thunderbolt(TM) register definitions and some helper > > macros. > > Thinking about this again I would prefer it if you would put your definitions > into a separate file under icm/ (even if there is some duplication). The style > (bitfields vs. genmask) is different between the drivers and for a reader it is > difficult to find out what is actually supposed to be used by the two drivers > (ring_desc vs tbt_buf_desc or the ring RING_INT_EN/DISABLE macros in the > header file vs. ring_interrupt_active in nhi.c). > > This would also completely separate the two drivers. > > Andreas > I'm also in favor of completely separating the drivers, but is it the right thing to do with the register definitions when the underlying registers layout is exactly the same? Note that bitfields are not so recommended when you care about the format/order of bits, like in the ring descriptor. Amir