lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 16 Jan 2018 08:56:17 -0800
From:   Joe Perches <joe@...ches.com>
To:     Igor Russkikh <igor.russkikh@...antia.com>,
        "David S . Miller" <davem@...emloft.net>
Cc:     netdev@...r.kernel.org, David Arcari <darcari@...hat.com>,
        Pavel Belous <pavel.belous@...antia.com>
Subject: Re: [PATCH net-next v2 08/10] net: aquantia: Fix register
 definitions to linux style

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ