Commit a46a5036 authored by Volodymyr Mytnyk's avatar Volodymyr Mytnyk Committed by David S. Miller
Browse files

net: marvell: prestera: fix patchwork build problems



fix the remaining build issues reported by patchwork
in firmware v4.0 support commit which has been already
merged.

Fix patchwork issues:
 - source inline
 - checkpatch

Fixes: bb5dbf2c ("net: marvell: prestera: add firmware v4.0 support")
Signed-off-by: default avatarVolodymyr Mytnyk <vmytnyk@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dce981c4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -499,7 +499,8 @@ static void prestera_port_mdix_get(struct ethtool_link_ksettings *ecmd,
{
	struct prestera_port_phy_state *state = &port->state_phy;

	if (prestera_hw_port_phy_mode_get(port, &state->mdix, NULL, NULL, NULL)) {
	if (prestera_hw_port_phy_mode_get(port,
					  &state->mdix, NULL, NULL, NULL)) {
		netdev_warn(port->dev, "MDIX params get failed");
		state->mdix = ETH_TP_MDI_INVALID;
	}
+2 −1
Original line number Diff line number Diff line
@@ -1356,7 +1356,8 @@ int prestera_hw_port_speed_get(const struct prestera_port *port, u32 *speed)
int prestera_hw_port_autoneg_restart(struct prestera_port *port)
{
	struct prestera_msg_port_attr_req req = {
		.attr = __cpu_to_le32(PRESTERA_CMD_PORT_ATTR_PHY_AUTONEG_RESTART),
		.attr =
		    __cpu_to_le32(PRESTERA_CMD_PORT_ATTR_PHY_AUTONEG_RESTART),
		.port = __cpu_to_le32(port->hw_id),
		.dev = __cpu_to_le32(port->dev_id),
	};
+4 −2
Original line number Diff line number Diff line
@@ -405,7 +405,8 @@ static int prestera_port_create(struct prestera_switch *sw, u32 id)

	err = prestera_port_cfg_mac_write(port, &cfg_mac);
	if (err) {
		dev_err(prestera_dev(sw), "Failed to set port(%u) mac mode\n", id);
		dev_err(prestera_dev(sw),
			"Failed to set port(%u) mac mode\n", id);
		goto err_port_init;
	}

@@ -418,7 +419,8 @@ static int prestera_port_create(struct prestera_switch *sw, u32 id)
						    false, 0, 0,
						    port->cfg_phy.mdix);
		if (err) {
			dev_err(prestera_dev(sw), "Failed to set port(%u) phy mode\n", id);
			dev_err(prestera_dev(sw),
				"Failed to set port(%u) phy mode\n", id);
			goto err_port_init;
		}
	}
+2 −1
Original line number Diff line number Diff line
@@ -411,7 +411,8 @@ static int prestera_fw_cmd_send(struct prestera_fw *fw, int qid,
		goto cmd_exit;
	}

	memcpy_fromio(out_msg, prestera_fw_cmdq_buf(fw, qid) + in_size, ret_size);
	memcpy_fromio(out_msg,
		      prestera_fw_cmdq_buf(fw, qid) + in_size, ret_size);

cmd_exit:
	prestera_fw_write(fw, PRESTERA_CMDQ_REQ_CTL_REG(qid),