From: Florian Fainelli <f.fainelli@gmail.com>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com,
"David S. Miller" <davem@davemloft.net>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU trunk
Date: Tue, 28 Mar 2017 12:29:19 -0700 [thread overview]
Message-ID: <29073565-c03a-f684-6b49-b5226cbdd61b@gmail.com> (raw)
In-Reply-To: <20170328190943.18320-1-vivien.didelot@savoirfairelinux.com>
On 03/28/2017 12:09 PM, Vivien Didelot wrote:
> Set the trunk member of the mv88e6xxx_atu_entry structure regardless its
> value, so that uninitialized structures gets the correct boolean value.
Ouch, yes indeed!
>
> Note that no mainline code is affected by the current behavior.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/net/dsa/mv88e6xxx/global1_atu.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/dsa/mv88e6xxx/global1_atu.c b/drivers/net/dsa/mv88e6xxx/global1_atu.c
> index 831434bc5c13..fa7e7db5171b 100644
> --- a/drivers/net/dsa/mv88e6xxx/global1_atu.c
> +++ b/drivers/net/dsa/mv88e6xxx/global1_atu.c
> @@ -128,9 +128,7 @@ static int mv88e6xxx_g1_atu_data_read(struct mv88e6xxx_chip *chip,
>
> entry->state = val & 0xf;
> if (entry->state != GLOBAL_ATU_DATA_STATE_UNUSED) {
> - if (val & GLOBAL_ATU_DATA_TRUNK)
> - entry->trunk = true;
> -
> + entry->trunk = !!(val & GLOBAL_ATU_DATA_TRUNK);
> entry->portvec = (val >> 4) & mv88e6xxx_port_mask(chip);
> }
>
>
--
Florian
next prev parent reply other threads:[~2017-03-28 19:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 19:09 Vivien Didelot
2017-03-28 19:26 ` Andrew Lunn
2017-03-28 19:29 ` Florian Fainelli [this message]
2017-03-29 5:05 ` David Miller
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=29073565-c03a-f684-6b49-b5226cbdd61b@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/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
all inboxes | Powered by JetHome®