Message ID | 20161108163859.14760-2-oliver@schinagl.nl |
---|---|
State | Accepted |
Commit | 020f67628d7f3e8f1c3ca93e8388d6b5ee128ec2 |
Delegated to: | Joe Hershberger |
Headers | show |
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 <oliver@schinagl.nl> > --- > 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 <config.h> > #include <common.h> > +#include <linux/bitops.h> > #include <phy.h> > > #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 >
Hi, On 09-11-16 22:42, Priit Laes wrote: > 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 <oliver@schinagl.nl> >> --- >> 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 <config.h> >> #include <common.h> >> +#include <linux/bitops.h> >> #include <phy.h> >> >> #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); ah yeah, didn't even notice it, it's actually wrong. Also here, if that's all I don't mind if it gets fixed in the merge, if it needs a v2 I'll gladly do it however. Olliver > You should also get rid of semicolons. > > >> >> /* RTL8211x PHY Status Register */ >> #define MIIM_RTL8211x_PHY_STATUS 0x11 >> -- >> 2.10.2 >>
On Tue, Nov 8, 2016 at 10:38 AM, Olliver Schinagl <oliver@schinagl.nl> 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 <oliver@schinagl.nl> Acked-by: Joe Hershberger <joe.hershberger@ni.com> I can clean up the ';' inline.
Hi oliver@schinagl.nl, https://patchwork.ozlabs.org/patch/692379/ was applied to u-boot-net.git. Thanks! -Joe
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 <config.h> #include <common.h> +#include <linux/bitops.h> #include <phy.h> #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); /* RTL8211x PHY Status Register */ #define MIIM_RTL8211x_PHY_STATUS 0x11
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 <oliver@schinagl.nl> --- drivers/net/phy/realtek.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)