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] = {

Reply via email to