11721 bnxe: cast between incompatible function types

Review Request #2325 - Created Sept. 20, 2019 and submitted

Information
Toomas Soome
illumos-gate
11721
2aec221...
Reviewers
general
../../common/io/bnxe/577xx/common/bnxe_clc.c:12430:21: error: cast between incompatible function types from 'void (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_xgxs_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12431:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.read_status = */(read_status_t)elink_link_settings_status,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12469:21: error: cast between incompatible function types from 'void (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_xgxs_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12470:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.read_status = */(read_status_t)elink_link_settings_status,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12509:21: error: cast between incompatible function types from 'void (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_warpcore_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12510:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.read_status = */(read_status_t)elink_warpcore_read_status,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12544:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_7101_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12548:22: error: cast between incompatible function types from 'elink_status_t (*)(u32,  u8 *, u16 *)' {aka 'enum elink_status (*)(unsigned int,  unsigned char *, short unsigned int *)'} to 'u8 (*)(u32,  u8 *, u16 *)' {aka 'unsigned char (*)(unsigned int,  unsigned char *, short unsigned int *)'} [-Werror=cast-function-type]
  /*.format_fw_ver= */(format_fw_ver_t)elink_7101_format_ver,
                      ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12578:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_8073_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12582:22: error: cast between incompatible function types from 'elink_status_t (*)(u32,  u8 *, u16 *)' {aka 'enum elink_status (*)(unsigned int,  unsigned char *, short unsigned int *)'} to 'u8 (*)(u32,  u8 *, u16 *)' {aka 'unsigned char (*)(unsigned int,  unsigned char *, short unsigned int *)'} [-Werror=cast-function-type]
  /*.format_fw_ver= */(format_fw_ver_t)elink_format_ver,
                      ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12609:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_8705_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12613:22: error: cast between incompatible function types from 'elink_status_t (*)(u32,  u8 *, u16 *)' {aka 'enum elink_status (*)(unsigned int,  unsigned char *, short unsigned int *)'} to 'u8 (*)(u32,  u8 *, u16 *)' {aka 'unsigned char (*)(unsigned int,  unsigned char *, short unsigned int *)'} [-Werror=cast-function-type]
  /*.format_fw_ver= */(format_fw_ver_t)elink_null_format_ver,
                      ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12641:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.read_status = */(read_status_t)elink_8706_read_status,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12644:22: error: cast between incompatible function types from 'elink_status_t (*)(u32,  u8 *, u16 *)' {aka 'enum elink_status (*)(unsigned int,  unsigned char *, short unsigned int *)'} to 'u8 (*)(u32,  u8 *, u16 *)' {aka 'unsigned char (*)(unsigned int,  unsigned char *, short unsigned int *)'} [-Werror=cast-function-type]
  /*.format_fw_ver= */(format_fw_ver_t)elink_format_ver,
                      ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12672:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_8726_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12676:22: error: cast between incompatible function types from 'elink_status_t (*)(u32,  u8 *, u16 *)' {aka 'enum elink_status (*)(unsigned int,  unsigned char *, short unsigned int *)'} to 'u8 (*)(u32,  u8 *, u16 *)' {aka 'unsigned char (*)(unsigned int,  unsigned char *, short unsigned int *)'} [-Werror=cast-function-type]
  /*.format_fw_ver= */(format_fw_ver_t)elink_format_ver,
                      ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12706:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_8727_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12710:22: error: cast between incompatible function types from 'elink_status_t (*)(u32,  u8 *, u16 *)' {aka 'enum elink_status (*)(unsigned int,  unsigned char *, short unsigned int *)'} to 'u8 (*)(u32,  u8 *, u16 *)' {aka 'unsigned char (*)(unsigned int,  unsigned char *, short unsigned int *)'} [-Werror=cast-function-type]
  /*.format_fw_ver= */(format_fw_ver_t)elink_format_ver,
                      ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12745:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_8481_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12749:22: error: cast between incompatible function types from 'elink_status_t (*)(u32,  u8 *, u16 *)' {aka 'enum elink_status (*)(unsigned int,  unsigned char *, short unsigned int *)'} to 'u8 (*)(u32,  u8 *, u16 *)' {aka 'unsigned char (*)(unsigned int,  unsigned char *, short unsigned int *)'} [-Werror=cast-function-type]
  /*.format_fw_ver= */(format_fw_ver_t)elink_848xx_format_ver,
                      ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12784:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_848x3_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12788:22: error: cast between incompatible function types from 'elink_status_t (*)(u32,  u8 *, u16 *)' {aka 'enum elink_status (*)(unsigned int,  unsigned char *, short unsigned int *)'} to 'u8 (*)(u32,  u8 *, u16 *)' {aka 'unsigned char (*)(unsigned int,  unsigned char *, short unsigned int *)'} [-Werror=cast-function-type]
  /*.format_fw_ver= */(format_fw_ver_t)elink_848xx_format_ver,
                      ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12824:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_848x3_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12828:22: error: cast between incompatible function types from 'elink_status_t (*)(u32,  u8 *, u16 *)' {aka 'enum elink_status (*)(unsigned int,  unsigned char *, short unsigned int *)'} to 'u8 (*)(u32,  u8 *, u16 *)' {aka 'unsigned char (*)(unsigned int,  unsigned char *, short unsigned int *)'} [-Werror=cast-function-type]
  /*.format_fw_ver= */(format_fw_ver_t)elink_848xx_format_ver,
                      ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12829:18: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *)'} to 'void (*)(struct elink_phy *, struct elink_params *)' [-Werror=cast-function-type]
  /*.hw_reset = */(hw_reset_t)elink_84833_hw_reset_phy,
                  ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12860:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_848x3_config_init,
                     ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12864:22: error: cast between incompatible function types from 'elink_status_t (*)(u32,  u8 *, u16 *)' {aka 'enum elink_status (*)(unsigned int,  unsigned char *, short unsigned int *)'} to 'u8 (*)(u32,  u8 *, u16 *)' {aka 'unsigned char (*)(unsigned int,  unsigned char *, short unsigned int *)'} [-Werror=cast-function-type]
  /*.format_fw_ver= */(format_fw_ver_t)elink_848xx_format_ver,
                      ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12865:18: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *)'} to 'void (*)(struct elink_phy *, struct elink_params *)' [-Werror=cast-function-type]
  /*.hw_reset = */(hw_reset_t)elink_84833_hw_reset_phy,
                  ^
../../common/io/bnxe/577xx/common/bnxe_clc.c:12898:21: error: cast between incompatible function types from 'elink_status_t (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'enum elink_status (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} to 'u8 (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)' {aka 'unsigned char (*)(struct elink_phy *, struct elink_params *, struct elink_vars *)'} [-Werror=cast-function-type]
  /*.config_init = */(config_init_t)elink_54618se_config_init,
                     ^
cc1: all warnings being treated as errors

  

Issues

  • 0
  • 2
  • 1
  • 3
Description From Last Updated
Andy Fiddaman
Robert Mustacchi
Toomas Soome
Andrew Stormont
Andrew Stormont
Andy Fiddaman
Robert Mustacchi
Toomas Soome
Andrew Stormont
Robert Mustacchi
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...