[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CB4D859@AcuExch.aculab.com>
Date: Fri, 12 Jun 2015 13:30:47 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Ivan Vecera' <ivecera@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "rasesh.mody@...gic.com" <rasesh.mody@...gic.com>,
"joe@...ches.com" <joe@...ches.com>
Subject: RE: [PATCH net-next v2 05/19] bna: use BIT(x) instead of (1 << x)
From: Ivan Vecera
...
> diff --git a/drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h
> b/drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h
> index 679a503..16090fd 100644
> --- a/drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h
> +++ b/drivers/net/ethernet/brocade/bna/bfa_defs_mfg_comm.h
> @@ -75,7 +75,7 @@ enum {
> CB_GPIO_FC4P2 = (4), /*!< 4G 2port FC card */
> CB_GPIO_FC4P1 = (5), /*!< 4G 1port FC card */
> CB_GPIO_DFLY = (6), /*!< 8G 2port FC mezzanine card */
> - CB_GPIO_PROTO = (1 << 7) /*!< 8G 2port FC prototypes */
> + CB_GPIO_PROTO = BIT(7) /*!< 8G 2port FC prototypes */
That doesn't look like a BIT() value to me, just a large number.
Should the release driver even have support for the prototype hardware?
...
> - if (rx_enet_mask & ((u32)(1 << i))) {
> + if (rx_enet_mask & ((u32)BIT(i))) {
The (u32) cast looks superfluous.
There are also too many ().
...
> - int bit = (1 << (vlan_id & BFI_VLAN_WORD_MASK));
> + int bit = BIT((vlan_id & BFI_VLAN_WORD_MASK));
Too many ()
David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists