All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@codeaurora.org>
To: Florian Fainelli <f.fainelli@gmail.com>,
	David Miller <davem@davemloft.net>,
	jon.mason@broadcom.com, netdev@vger.kernel.org
Subject: Re: [PATCH] [v3] net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause
Date: Tue, 6 Dec 2016 19:50:03 -0600	[thread overview]
Message-ID: <58476ACB.3030206@codeaurora.org> (raw)
In-Reply-To: <2c2aaf1d-05a5-d2bc-d04a-79224a4c6b43@gmail.com>

Florian Fainelli wrote:
>> +	if (phydrv->features & (SUPPORTED_Pause | SUPPORTED_Asym_Pause)) {
>> >+		phydev->supported &= ~(SUPPORTED_Pause | SUPPORTED_Asym_Pause);
>> >+		phydev->supported |= phydrv->features &
>> >+				     (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
> Is not the & (SUPPORTED_Pause | SUPPORTED_Asym_Pause) redundant here anyway?

I'm just trying to be safe.  Can I be certain that those bits are 
already zero?

>
>> >+	} else {
>> >+		phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
> that part looks good.
>
>> >+	}
>> >+
>> >+	phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
> but this one basically "undoes" what the if () clause did where we
> checked if either, or one of the two bits was already set?

Ugh, sorry.  I thought I deleted that before sending the patch out. 
I'll send out a v4 tomorrow.

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, hosted by The Linux Foundation.

  reply	other threads:[~2016-12-07  2:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07  0:27 [PATCH] [v3] net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause Timur Tabi
2016-12-07  0:36 ` Florian Fainelli
2016-12-07  1:50   ` Timur Tabi [this message]
2016-12-07  1:57     ` Florian Fainelli
2016-12-07  2:54       ` Timur Tabi
2016-12-07  9:13         ` Niklas Cassel
2016-12-07 17:19           ` Timur Tabi

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=58476ACB.3030206@codeaurora.org \
    --to=timur@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=jon.mason@broadcom.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.