From: Priit Laes <plaes@plaes.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] [PATCH 1/3] net: phy: realtek: Use the BIT() macro
Date: Wed, 09 Nov 2016 23:42:56 +0200 [thread overview]
Message-ID: <1478727776.444.2.camel@plaes.org> (raw)
In-Reply-To: <20161108163859.14760-2-oliver@schinagl.nl>
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
>
next prev parent reply other threads:[~2016-11-09 21:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-08 16:38 [U-Boot] [PATCH] Do not force master mode on unaffected PHY's Olliver Schinagl
2016-11-08 16:38 ` [U-Boot] [PATCH 1/3] net: phy: realtek: Use the BIT() macro Olliver Schinagl
2016-11-09 21:42 ` Priit Laes [this message]
2016-11-09 22:40 ` [U-Boot] [linux-sunxi] " Olliver Schinagl
2016-11-15 3:19 ` [U-Boot] " Joe Hershberger
2016-12-08 17:20 ` [U-Boot] " Joe Hershberger
2016-11-08 16:38 ` [U-Boot] [PATCH 2/3] net: phy: realtek: make define more concistent Olliver Schinagl
2016-11-08 23:17 ` [U-Boot] [linux-sunxi] " Emilio López
2016-11-09 10:34 ` Olliver Schinagl
2016-11-15 2:52 ` [U-Boot] " Joe Hershberger
2016-12-08 17:20 ` [U-Boot] net: phy: realtek: make define more consistent Joe Hershberger
2016-11-08 16:38 ` [U-Boot] [PATCH 3/3] net: phy: realtek: Only force master mode on rtl8211b/c Olliver Schinagl
2016-11-15 3:34 ` Joe Hershberger
2016-12-08 17:20 ` [U-Boot] " Joe Hershberger
2016-11-14 11:26 ` [U-Boot] [PATCH] Do not force master mode on unaffected PHY's Hans de Goede
2016-11-14 14:11 ` Olliver Schinagl
2016-11-14 14:13 ` Hans de Goede
2016-11-14 14:13 ` Olliver Schinagl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1478727776.444.2.camel@plaes.org \
--to=plaes@plaes.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox