layer2_switch: remove unneeded lines and format the style