From: Joe Perches Subject: Re: [PATCH net-next v2 08/10] net: aquantia: Fix register definitions to linux style Date: Tue, 16 Jan 2018 08:56:17 -0800 Message-ID: <1516121777.3045.45.camel@perches.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, David Arcari , Pavel Belous To: Igor Russkikh , "David S . Miller" Return-path: Received: from smtprelay0121.hostedemail.com ([216.40.44.121]:52104 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751980AbeAPQ4X (ORCPT ); Tue, 16 Jan 2018 11:56:23 -0500 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 2018-01-15 at 16:41 +0300, Igor Russkikh wrote: > Original driver code had internal registers and masks declarations > in low case and without any prefix. > Here we make all these uppercase and add already used HW_ATL prefix > to recognize these. [] > diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c [] > @@ -114,13 +115,13 @@ void itr_irq_map_en_rx_set(struct aq_hw_s *aq_hw, u32 irq_map_en_rx, u32 rx) > /* register address for bitfield imr_rx{r}_en */ > static u32 itr_imr_rxren_adr[32] = { > 0x00002100U, 0x00002100U, 0x00002104U, 0x00002104U, > - 0x00002108U, 0x00002108U, 0x0000210cU, 0x0000210cU, > + 0x00002108U, 0x00002108U, 0x0000210CU, 0x0000210CU, > 0x00002110U, 0x00002110U, 0x00002114U, 0x00002114U, > - 0x00002118U, 0x00002118U, 0x0000211cU, 0x0000211cU, > + 0x00002118U, 0x00002118U, 0x0000211CU, 0x0000211CU, > 0x00002120U, 0x00002120U, 0x00002124U, 0x00002124U, > - 0x00002128U, 0x00002128U, 0x0000212cU, 0x0000212cU, > + 0x00002128U, 0x00002128U, 0x0000212CU, 0x0000212CU, > 0x00002130U, 0x00002130U, 0x00002134U, 0x00002134U, > - 0x00002138U, 0x00002138U, 0x0000213cU, 0x0000213cU > + 0x00002138U, 0x00002138U, 0x0000213CU, 0x0000213CU > }; Be nice to change all these to static const > /* bitmask for bitfield imr_rx{r}_en */ > @@ -154,13 +155,13 @@ void itr_irq_map_en_tx_set(struct aq_hw_s *aq_hw, u32 irq_map_en_tx, u32 tx) > /* register address for bitfield imr_tx{t}_en */ > static u32 itr_imr_txten_adr[32] = { etc... > 0x00002100U, 0x00002100U, 0x00002104U, 0x00002104U, > - 0x00002108U, 0x00002108U, 0x0000210cU, 0x0000210cU, > + 0x00002108U, 0x00002108U, 0x0000210CU, 0x0000210CU, > 0x00002110U, 0x00002110U, 0x00002114U, 0x00002114U, > - 0x00002118U, 0x00002118U, 0x0000211cU, 0x0000211cU, > + 0x00002118U, 0x00002118U, 0x0000211CU, 0x0000211CU, > 0x00002120U, 0x00002120U, 0x00002124U, 0x00002124U, > - 0x00002128U, 0x00002128U, 0x0000212cU, 0x0000212cU, > + 0x00002128U, 0x00002128U, 0x0000212CU, 0x0000212CU, > 0x00002130U, 0x00002130U, 0x00002134U, 0x00002134U, > - 0x00002138U, 0x00002138U, 0x0000213cU, 0x0000213cU > + 0x00002138U, 0x00002138U, 0x0000213CU, 0x0000213CU > }; > > /* bitmask for bitfield imr_tx{t}_en */ > @@ -194,25 +195,25 @@ void itr_irq_map_rx_set(struct aq_hw_s *aq_hw, u32 irq_map_rx, u32 rx) > /* register address for bitfield imr_rx{r}[4:0] */ > static u32 itr_imr_rxr_adr[32] = { [] > /* bitmask for bitfield imr_rx{r}[4:0] */ > static u32 itr_imr_rxr_msk[32] = { [] > @@ -234,25 +235,25 @@ void itr_irq_map_tx_set(struct aq_hw_s *aq_hw, u32 irq_map_tx, u32 tx) > /* register address for bitfield imr_tx{t}[4:0] */ > static u32 itr_imr_txt_adr[32] = { [] > /* bitmask for bitfield imr_tx{t}[4:0] */ > static u32 itr_imr_txt_msk[32] = {