From mboxrd@z Thu Jan 1 00:00:00 1970 From: Priit Laes Date: Wed, 09 Nov 2016 23:42:56 +0200 Subject: [U-Boot] [linux-sunxi] [PATCH 1/3] net: phy: realtek: Use the BIT() macro In-Reply-To: <20161108163859.14760-2-oliver@schinagl.nl> References: <20161108163859.14760-1-oliver@schinagl.nl> <20161108163859.14760-2-oliver@schinagl.nl> Message-ID: <1478727776.444.2.camel@plaes.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 2016-11-08 at 17:38 +0100, Olliver Schinagl wrote: > The BIT macro is the preferred method to set bits. > This patch adds the bit macro and converts bit invocations. > > Signed-off-by: Olliver Schinagl > --- > ?drivers/net/phy/realtek.c | 5 +++-- > ?1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c > index 7a99cb0..35b934b 100644 > --- a/drivers/net/phy/realtek.c > +++ b/drivers/net/phy/realtek.c > @@ -9,13 +9,14 @@ > ? */ > ?#include > ?#include > +#include > ?#include > ? > ?#define PHY_AUTONEGOTIATE_TIMEOUT 5000 > ? > ?/* RTL8211x 1000BASE-T Control Register */ > -#define MIIM_RTL8211x_CTRL1000T_MSCE (1 << 12); > -#define MIIM_RTL8211X_CTRL1000T_MASTER (1 << 11); > +#define MIIM_RTL8211x_CTRL1000T_MSCE BIT(12); > +#define MIIM_RTL8211X_CTRL1000T_MASTER BIT(11); You should also get rid of semicolons. > ? > ?/* RTL8211x PHY Status Register */ > ?#define MIIM_RTL8211x_PHY_STATUS???????0x11 > --? > 2.10.2 >