Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1417998
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next 1/8] net: dsa: mv88e6xxx: fix style issues |
| Date | 2016-06-09 02:50 +0200 |
| Message-ID | <rHWky-7lM-31@gated-at.bofh.it> (permalink) |
| References | <rHWkx-7lM-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This patch fixes 5 style problems reported by checkpatch:
WARNING: suspect code indent for conditional statements (8, 24)
#492: FILE: drivers/net/dsa/mv88e6xxx.c:492:
+ if (phydev->link)
+ reg |= PORT_PCS_CTRL_LINK_UP;
CHECK: Logical continuations should be on the previous line
#1318: FILE: drivers/net/dsa/mv88e6xxx.c:1318:
+ oldstate == PORT_CONTROL_STATE_FORWARDING)
+ && (state == PORT_CONTROL_STATE_DISABLED ||
CHECK: multiple assignments should be avoided
#1662: FILE: drivers/net/dsa/mv88e6xxx.c:1662:
+ vlan->vid_begin = vlan->vid_end = next.vid;
WARNING: line over 80 characters
#2097: FILE: drivers/net/dsa/mv88e6xxx.c:2097:
+ const struct switchdev_obj_port_vlan *vlan,
WARNING: suspect code indent for conditional statements (16, 32)
#2734: FILE: drivers/net/dsa/mv88e6xxx.c:2734:
+ if (mv88e6xxx_6352_family(ps) || mv88e6xxx_6351_family(ps) ||
[...]
+ reg |= PORT_CONTROL_EGRESS_ADD_TAG;
total: 0 errors, 3 warnings, 2 checks, 3805 lines checked
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
drivers/net/dsa/mv88e6xxx.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
index ee06055..6a2528f 100644
--- a/drivers/net/dsa/mv88e6xxx.c
+++ b/drivers/net/dsa/mv88e6xxx.c
@@ -490,7 +490,7 @@ static void mv88e6xxx_adjust_link(struct dsa_switch *ds, int port,
reg |= PORT_PCS_CTRL_FORCE_LINK;
if (phydev->link)
- reg |= PORT_PCS_CTRL_LINK_UP;
+ reg |= PORT_PCS_CTRL_LINK_UP;
if (mv88e6xxx_6065_family(ps) && phydev->speed > SPEED_100)
goto out;
@@ -1314,9 +1314,9 @@ static int _mv88e6xxx_port_state(struct mv88e6xxx_priv_state *ps, int port,
* Blocking or Listening state.
*/
if ((oldstate == PORT_CONTROL_STATE_LEARNING ||
- oldstate == PORT_CONTROL_STATE_FORWARDING)
- && (state == PORT_CONTROL_STATE_DISABLED ||
- state == PORT_CONTROL_STATE_BLOCKING)) {
+ oldstate == PORT_CONTROL_STATE_FORWARDING) &&
+ (state == PORT_CONTROL_STATE_DISABLED ||
+ state == PORT_CONTROL_STATE_BLOCKING)) {
ret = _mv88e6xxx_atu_remove(ps, 0, port, false);
if (ret)
return ret;
@@ -1659,7 +1659,8 @@ static int mv88e6xxx_port_vlan_dump(struct dsa_switch *ds, int port,
continue;
/* reinit and dump this VLAN obj */
- vlan->vid_begin = vlan->vid_end = next.vid;
+ vlan->vid_begin = next.vid;
+ vlan->vid_end = next.vid;
vlan->flags = 0;
if (next.data[port] == GLOBAL_VTU_DATA_MEMBER_TAG_UNTAGGED)
@@ -2093,9 +2094,10 @@ unlock:
return ret;
}
-static int mv88e6xxx_port_vlan_prepare(struct dsa_switch *ds, int port,
- const struct switchdev_obj_port_vlan *vlan,
- struct switchdev_trans *trans)
+static int
+mv88e6xxx_port_vlan_prepare(struct dsa_switch *ds, int port,
+ const struct switchdev_obj_port_vlan *vlan,
+ struct switchdev_trans *trans)
{
struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
int err;
@@ -2735,7 +2737,7 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_priv_state *ps, int port)
mv88e6xxx_6165_family(ps) || mv88e6xxx_6097_family(ps) ||
mv88e6xxx_6095_family(ps) || mv88e6xxx_6065_family(ps) ||
mv88e6xxx_6185_family(ps) || mv88e6xxx_6320_family(ps)) {
- reg |= PORT_CONTROL_EGRESS_ADD_TAG;
+ reg |= PORT_CONTROL_EGRESS_ADD_TAG;
}
}
if (dsa_is_dsa_port(ds, port)) {
--
2.8.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 0/8] net: dsa: mv88e6xxx: misc probe improvements Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-09 02:50 +0200
[PATCH net-next 6/8] net: dsa: mv88e6xxx: add chip detection helper Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-09 02:50 +0200
[PATCH net-next 4/8] net: dsa: mv88e6xxx: do not increment bus refcount Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-09 02:50 +0200
Re: [PATCH net-next 4/8] net: dsa: mv88e6xxx: do not increment bus refcount Andrew Lunn <andrew@lunn.ch> - 2016-06-09 04:40 +0200
Re: [PATCH net-next 4/8] net: dsa: mv88e6xxx: do not increment bus refcount Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-10 22:00 +0200
Re: [PATCH net-next 4/8] net: dsa: mv88e6xxx: do not increment bus refcount Andrew Lunn <andrew@lunn.ch> - 2016-06-10 22:10 +0200
[PATCH net-next 2/8] net: dsa: mv88e6xxx: remove redundant assignments Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-09 02:50 +0200
Re: [PATCH net-next 2/8] net: dsa: mv88e6xxx: remove redundant assignments Andrew Lunn <andrew@lunn.ch> - 2016-06-09 04:40 +0200
[PATCH net-next 5/8] net: dsa: mv88e6xxx: add switch register helpers Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-09 02:50 +0200
Re: [PATCH net-next 5/8] net: dsa: mv88e6xxx: add switch register helpers Andrew Lunn <andrew@lunn.ch> - 2016-06-09 04:40 +0200
Re: [PATCH net-next 5/8] net: dsa: mv88e6xxx: add switch register helpers Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-09 15:00 +0200
[PATCH net-next 3/8] net: dsa: mv88e6xxx: use already declared variables Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-09 02:50 +0200
Re: [PATCH net-next 3/8] net: dsa: mv88e6xxx: use already declared variables Andrew Lunn <andrew@lunn.ch> - 2016-06-09 04:40 +0200
[PATCH net-next 8/8] net: dsa: mv88e6xxx: fail on mismatching probe Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-09 02:50 +0200
Re: [PATCH net-next 8/8] net: dsa: mv88e6xxx: fail on mismatching probe Andrew Lunn <andrew@lunn.ch> - 2016-06-09 04:30 +0200
Re: [PATCH net-next 8/8] net: dsa: mv88e6xxx: fail on mismatching probe Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-10 22:40 +0200
[PATCH net-next 7/8] net: dsa: mv88e6xxx: explicit compatible devices Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-09 02:50 +0200
Re: [PATCH net-next 7/8] net: dsa: mv88e6xxx: explicit compatible devices Andrew Lunn <andrew@lunn.ch> - 2016-06-09 04:20 +0200
Re: [PATCH net-next 7/8] net: dsa: mv88e6xxx: explicit compatible devices Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-10 22:30 +0200
[PATCH net-next 1/8] net: dsa: mv88e6xxx: fix style issues Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-09 02:50 +0200
Re: [PATCH net-next 1/8] net: dsa: mv88e6xxx: fix style issues Andrew Lunn <andrew@lunn.ch> - 2016-06-09 04:30 +0200
csiph-web