Hi Egil, Egil Hjelmeland <pri...@egil-hjelmeland.no> writes:
> Prepare for next patch: > Move tag setup from lan9303_separate_ports() to new function > lan9303_setup_tagging() > > Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> Minor styling issues, otherwise LGTM: Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> > +/* forward special tagged packets from port 0 to port 1 *or* port 2 */ > +static int lan9303_setup_tagging(struct lan9303 *chip) > +{ > + int ret; > + /* enable defining the destination port via special VLAN tagging > + * for port 0 > + */ > + ret = lan9303_write_switch_reg(chip, LAN9303_SWE_INGRESS_PORT_TYPE, > + LAN9303_SWE_INGRESS_PORT_TYPE_VLAN); > + if (ret) > + return ret; > + > + /* tag incoming packets at port 1 and 2 on their way to port 0 to be > + * able to discover their source port > + */ > + return lan9303_write_switch_reg( > + chip, LAN9303_BM_EGRSS_PORT_TYPE, > + LAN9303_BM_EGRSS_PORT_TYPE_SPECIAL_TAG_PORT0); Please avoid this kind of alignment as much as possible. u32 val = LAN9303_BM_EGRSS_PORT_TYPE_SPECIAL_TAG_PORT0; would do the trick for the +80 chars issue. BTW, it'd be great to see sometime soon a cleanup patch which makes use of such temporary u32 val variable for most of the lan9303_write_switch_reg and lan9303_write_switch_port calls. ;-) Thanks, Vivien