netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Woojung.Huh@microchip.com, davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/3] lan78xx: replace devid to chipid & chiprev
Date: Thu, 11 Feb 2016 00:36:44 +0300	[thread overview]
Message-ID: <56BBAD6C.6070901@cogentembedded.com> (raw)
In-Reply-To: <9235D6609DB808459E95D78E17F2E43D404AB9F2@CHN-SV-EXMX02.mchp-main.com>

On 02/11/2016 12:13 AM, Woojung.Huh@microchip.com wrote:

> Replace devid to chipid & chiprev for easy access.
>
> Signed-off-by: Woojung Huh <woojung.huh@microchip.com>
> ---
>   drivers/net/usb/lan78xx.c | 20 +++++++++++---------
>   drivers/net/usb/lan78xx.h |  1 +
>   2 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
> index 1c299b8..b14b22d 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/usb/lan78xx.c
[...]
> @@ -471,7 +472,7 @@ static int lan78xx_read_raw_eeprom(struct lan78xx_net *dev, u32 offset,
>   	 */
>   	ret = lan78xx_read_reg(dev, HW_CFG, &val);
>   	saved = val;
> -	if ((dev->devid & ID_REV_CHIP_ID_MASK_) == 0x78000000) {
> +	if ((dev->chipid) == ID_REV_CHIP_ID_7800_) {

    Inner parens not needed.

[...]
> @@ -505,7 +506,7 @@ static int lan78xx_read_raw_eeprom(struct lan78xx_net *dev, u32 offset,
>
>   	retval = 0;
>   exit:
> -	if ((dev->devid & ID_REV_CHIP_ID_MASK_) == 0x78000000)
> +	if ((dev->chipid) == ID_REV_CHIP_ID_7800_)

    Same here.

[...]
> @@ -539,7 +540,7 @@ static int lan78xx_write_raw_eeprom(struct lan78xx_net *dev, u32 offset,
>   	 */
>   	ret = lan78xx_read_reg(dev, HW_CFG, &val);
>   	saved = val;
> -	if ((dev->devid & ID_REV_CHIP_ID_MASK_) == 0x78000000) {
> +	if ((dev->chipid) == ID_REV_CHIP_ID_7800_) {

    And here.

[...]
> @@ -587,7 +588,7 @@ static int lan78xx_write_raw_eeprom(struct lan78xx_net *dev, u32 offset,
>
>   	retval = 0;
>   exit:
> -	if ((dev->devid & ID_REV_CHIP_ID_MASK_) == 0x78000000)
> +	if ((dev->chipid) == ID_REV_CHIP_ID_7800_)

    Here too.

[...]

MBR, Sergei

  reply	other threads:[~2016-02-10 21:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 21:13 [PATCH net-next 1/3] lan78xx: replace devid to chipid & chiprev Woojung.Huh
2016-02-10 21:36 ` Sergei Shtylyov [this message]
2016-02-10 22:49   ` Woojung.Huh
2016-02-10 22:45 ` Andrew Lunn

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=56BBAD6C.6070901@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=Woojung.Huh@microchip.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).