Commit f92e88db authored by David S. Miller's avatar David S. Miller

Merge branch 'bnx2x-Remove-function-casts'

Kees Cook says:

====================
bnx2x: Remove function casts

In order to make the entire kernel usable under Clang's Control Flow
Integrity protections, function prototype casts need to be avoided
because this will trip CFI checks at runtime (i.e. a mismatch between
the caller's expected function prototype and the destination function's
prototype). Many of these cases can be found with -Wcast-function-type,
which found that bnx2x had a bunch of needless (or at least confusing)
function casts. This series removes them all.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 2e47cb41 548e5ffe
...@@ -127,15 +127,15 @@ struct link_vars; ...@@ -127,15 +127,15 @@ struct link_vars;
struct link_params; struct link_params;
struct bnx2x_phy; struct bnx2x_phy;
typedef u8 (*config_init_t)(struct bnx2x_phy *phy, struct link_params *params, typedef void (*config_init_t)(struct bnx2x_phy *phy, struct link_params *params,
struct link_vars *vars); struct link_vars *vars);
typedef u8 (*read_status_t)(struct bnx2x_phy *phy, struct link_params *params, typedef u8 (*read_status_t)(struct bnx2x_phy *phy, struct link_params *params,
struct link_vars *vars); struct link_vars *vars);
typedef void (*link_reset_t)(struct bnx2x_phy *phy, typedef void (*link_reset_t)(struct bnx2x_phy *phy,
struct link_params *params); struct link_params *params);
typedef void (*config_loopback_t)(struct bnx2x_phy *phy, typedef void (*config_loopback_t)(struct bnx2x_phy *phy,
struct link_params *params); struct link_params *params);
typedef u8 (*format_fw_ver_t)(u32 raw, u8 *str, u16 *len); typedef int (*format_fw_ver_t)(u32 raw, u8 *str, u16 *len);
typedef void (*hw_reset_t)(struct bnx2x_phy *phy, struct link_params *params); typedef void (*hw_reset_t)(struct bnx2x_phy *phy, struct link_params *params);
typedef void (*set_link_led_t)(struct bnx2x_phy *phy, typedef void (*set_link_led_t)(struct bnx2x_phy *phy,
struct link_params *params, u8 mode); struct link_params *params, u8 mode);
......
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