Project

General

Profile

Bug #11721

bnxe: cast between incompatible function types

Added by Toomas Soome about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with gcc 8:

    ../../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

History

#1

Updated by Electric Monk about 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit ca19b8572adc4c6a3d44d243844ef95865864bf7

commit  ca19b8572adc4c6a3d44d243844ef95865864bf7
Author: Toomas Soome <tsoome@me.com>
Date:   2019-10-11T16:08:53.000Z

    11721 bnxe: cast between incompatible function types
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Garrett D'Amore <gdamore@racktopsystems.com>

Also available in: Atom PDF