Commit 548e5ffe authored by Kees Cook's avatar Kees Cook Committed by David S. Miller

bnx2x: Remove hw_reset_t function casts

All .rw_reset callbacks except bnx2x_84833_hw_reset_phy() use a
void return type. No callers of .hw_reset check a return value and
bnx2x_84833_hw_reset_phy() unconditionally returns 0. Remove all
hw_reset_t casts and fix the return type to void.
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 26658f6b
...@@ -10201,8 +10201,8 @@ static u8 bnx2x_84833_get_reset_gpios(struct bnx2x *bp, ...@@ -10201,8 +10201,8 @@ static u8 bnx2x_84833_get_reset_gpios(struct bnx2x *bp,
return reset_gpios; return reset_gpios;
} }
static int bnx2x_84833_hw_reset_phy(struct bnx2x_phy *phy, static void bnx2x_84833_hw_reset_phy(struct bnx2x_phy *phy,
struct link_params *params) struct link_params *params)
{ {
struct bnx2x *bp = params->bp; struct bnx2x *bp = params->bp;
u8 reset_gpios; u8 reset_gpios;
...@@ -10230,8 +10230,6 @@ static int bnx2x_84833_hw_reset_phy(struct bnx2x_phy *phy, ...@@ -10230,8 +10230,6 @@ static int bnx2x_84833_hw_reset_phy(struct bnx2x_phy *phy,
udelay(10); udelay(10);
DP(NETIF_MSG_LINK, "84833 hw reset on pin values 0x%x\n", DP(NETIF_MSG_LINK, "84833 hw reset on pin values 0x%x\n",
reset_gpios); reset_gpios);
return 0;
} }
static int bnx2x_8483x_disable_eee(struct bnx2x_phy *phy, static int bnx2x_8483x_disable_eee(struct bnx2x_phy *phy,
...@@ -11737,7 +11735,7 @@ static const struct bnx2x_phy phy_warpcore = { ...@@ -11737,7 +11735,7 @@ static const struct bnx2x_phy phy_warpcore = {
.link_reset = bnx2x_warpcore_link_reset, .link_reset = bnx2x_warpcore_link_reset,
.config_loopback = bnx2x_set_warpcore_loopback, .config_loopback = bnx2x_set_warpcore_loopback,
.format_fw_ver = NULL, .format_fw_ver = NULL,
.hw_reset = (hw_reset_t)bnx2x_warpcore_hw_reset, .hw_reset = bnx2x_warpcore_hw_reset,
.set_link_led = NULL, .set_link_led = NULL,
.phy_specific_func = NULL .phy_specific_func = NULL
}; };
...@@ -11768,7 +11766,7 @@ static const struct bnx2x_phy phy_7101 = { ...@@ -11768,7 +11766,7 @@ static const struct bnx2x_phy phy_7101 = {
.link_reset = bnx2x_common_ext_link_reset, .link_reset = bnx2x_common_ext_link_reset,
.config_loopback = bnx2x_7101_config_loopback, .config_loopback = bnx2x_7101_config_loopback,
.format_fw_ver = bnx2x_7101_format_ver, .format_fw_ver = bnx2x_7101_format_ver,
.hw_reset = (hw_reset_t)bnx2x_7101_hw_reset, .hw_reset = bnx2x_7101_hw_reset,
.set_link_led = bnx2x_7101_set_link_led, .set_link_led = bnx2x_7101_set_link_led,
.phy_specific_func = NULL .phy_specific_func = NULL
}; };
...@@ -11919,7 +11917,7 @@ static const struct bnx2x_phy phy_8727 = { ...@@ -11919,7 +11917,7 @@ static const struct bnx2x_phy phy_8727 = {
.link_reset = bnx2x_8727_link_reset, .link_reset = bnx2x_8727_link_reset,
.config_loopback = NULL, .config_loopback = NULL,
.format_fw_ver = bnx2x_format_ver, .format_fw_ver = bnx2x_format_ver,
.hw_reset = (hw_reset_t)bnx2x_8727_hw_reset, .hw_reset = bnx2x_8727_hw_reset,
.set_link_led = bnx2x_8727_set_link_led, .set_link_led = bnx2x_8727_set_link_led,
.phy_specific_func = bnx2x_8727_specific_func .phy_specific_func = bnx2x_8727_specific_func
}; };
...@@ -11954,7 +11952,7 @@ static const struct bnx2x_phy phy_8481 = { ...@@ -11954,7 +11952,7 @@ static const struct bnx2x_phy phy_8481 = {
.link_reset = bnx2x_8481_link_reset, .link_reset = bnx2x_8481_link_reset,
.config_loopback = NULL, .config_loopback = NULL,
.format_fw_ver = bnx2x_848xx_format_ver, .format_fw_ver = bnx2x_848xx_format_ver,
.hw_reset = (hw_reset_t)bnx2x_8481_hw_reset, .hw_reset = bnx2x_8481_hw_reset,
.set_link_led = bnx2x_848xx_set_link_led, .set_link_led = bnx2x_848xx_set_link_led,
.phy_specific_func = NULL .phy_specific_func = NULL
}; };
...@@ -12026,7 +12024,7 @@ static const struct bnx2x_phy phy_84833 = { ...@@ -12026,7 +12024,7 @@ static const struct bnx2x_phy phy_84833 = {
.link_reset = bnx2x_848x3_link_reset, .link_reset = bnx2x_848x3_link_reset,
.config_loopback = NULL, .config_loopback = NULL,
.format_fw_ver = bnx2x_848xx_format_ver, .format_fw_ver = bnx2x_848xx_format_ver,
.hw_reset = (hw_reset_t)bnx2x_84833_hw_reset_phy, .hw_reset = bnx2x_84833_hw_reset_phy,
.set_link_led = bnx2x_848xx_set_link_led, .set_link_led = bnx2x_848xx_set_link_led,
.phy_specific_func = bnx2x_848xx_specific_func .phy_specific_func = bnx2x_848xx_specific_func
}; };
...@@ -12060,7 +12058,7 @@ static const struct bnx2x_phy phy_84834 = { ...@@ -12060,7 +12058,7 @@ static const struct bnx2x_phy phy_84834 = {
.link_reset = bnx2x_848x3_link_reset, .link_reset = bnx2x_848x3_link_reset,
.config_loopback = NULL, .config_loopback = NULL,
.format_fw_ver = bnx2x_848xx_format_ver, .format_fw_ver = bnx2x_848xx_format_ver,
.hw_reset = (hw_reset_t)bnx2x_84833_hw_reset_phy, .hw_reset = bnx2x_84833_hw_reset_phy,
.set_link_led = bnx2x_848xx_set_link_led, .set_link_led = bnx2x_848xx_set_link_led,
.phy_specific_func = bnx2x_848xx_specific_func .phy_specific_func = bnx2x_848xx_specific_func
}; };
...@@ -12094,7 +12092,7 @@ static const struct bnx2x_phy phy_84858 = { ...@@ -12094,7 +12092,7 @@ static const struct bnx2x_phy phy_84858 = {
.link_reset = bnx2x_848x3_link_reset, .link_reset = bnx2x_848x3_link_reset,
.config_loopback = NULL, .config_loopback = NULL,
.format_fw_ver = bnx2x_8485x_format_ver, .format_fw_ver = bnx2x_8485x_format_ver,
.hw_reset = (hw_reset_t)bnx2x_84833_hw_reset_phy, .hw_reset = bnx2x_84833_hw_reset_phy,
.set_link_led = bnx2x_848xx_set_link_led, .set_link_led = bnx2x_848xx_set_link_led,
.phy_specific_func = bnx2x_848xx_specific_func .phy_specific_func = bnx2x_848xx_specific_func
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment