Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1611292 > unrolled thread
| Started by | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| First post | 2017-03-28 21:20 +0200 |
| Last post | 2017-03-29 07:10 +0200 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU trunk Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-03-28 21:20 +0200
Re: [PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU trunk Florian Fainelli <f.fainelli@gmail.com> - 2017-03-28 21:40 +0200
Re: [PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU trunk Andrew Lunn <andrew@lunn.ch> - 2017-03-28 21:40 +0200
Re: [PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU trunk David Miller <davem@davemloft.net> - 2017-03-29 07:10 +0200
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Date | 2017-03-28 21:20 +0200 |
| Subject | [PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU trunk |
| Message-ID | <tq4OS-3L1-5@gated-at.bofh.it> |
Set the trunk member of the mv88e6xxx_atu_entry structure regardless its
value, so that uninitialized structures gets the correct boolean value.
Note that no mainline code is affected by the current behavior.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.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);
}
--
2.12.1
[toc] | [next] | [standalone]
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Date | 2017-03-28 21:40 +0200 |
| Subject | Re: [PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU trunk |
| Message-ID | <tq58e-3Wt-19@gated-at.bofh.it> |
| In reply to | #1611292 |
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
[toc] | [prev] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2017-03-28 21:40 +0200 |
| Subject | Re: [PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU trunk |
| Message-ID | <tq58e-3Wt-25@gated-at.bofh.it> |
| In reply to | #1611292 |
On Tue, Mar 28, 2017 at 03:09:43PM -0400, 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.
>
> Note that no mainline code is affected by the current behavior.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-03-29 07:10 +0200 |
| Subject | Re: [PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU trunk |
| Message-ID | <tqe1P-29U-13@gated-at.bofh.it> |
| In reply to | #1611292 |
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Tue, 28 Mar 2017 15:09:43 -0400 > Set the trunk member of the mv88e6xxx_atu_entry structure regardless its > value, so that uninitialized structures gets the correct boolean value. > > Note that no mainline code is affected by the current behavior. > > Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web