[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <201803230852.Y4PG4qcn%fengguang.wu@intel.com>
Date: Fri, 23 Mar 2018 08:47:56 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: David Ahern <dsahern@...il.com>
Cc: kbuild-all@...org, netdev@...r.kernel.org
Subject: [net-next:master 304/314]
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3878:8: error: too few
arguments to function 'devlink_resource_register'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 6686c459e1449a3ee5f3fd313b0a559ace7a700e
commit: 145307460ba9c11489807de7acd3f4c7395f60b7 [304/314] devlink: Remove top_hierarchy arg to devlink_resource_register
config: x86_64-randconfig-s1-03230751 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout 145307460ba9c11489807de7acd3f4c7395f60b7
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function 'mlxsw_sp_resources_register':
>> drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3881:6: warning: passing argument 6 of 'devlink_resource_register' makes integer from pointer without a cast [-Wint-conversion]
&kvd_size_params,
^
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.c:64:
include/net/devlink.h:560:1: note: expected 'u64 {aka long long unsigned int}' but argument is of type 'struct devlink_resource_size_params *'
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3878:8: error: too few arguments to function 'devlink_resource_register'
err = devlink_resource_register(devlink, MLXSW_SP_RESOURCE_NAME_KVD,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.c:64:
include/net/devlink.h:560:1: note: declared here
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3891:6: warning: passing argument 6 of 'devlink_resource_register' makes integer from pointer without a cast [-Wint-conversion]
&linear_size_params,
^
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.c:64:
include/net/devlink.h:560:1: note: expected 'u64 {aka long long unsigned int}' but argument is of type 'struct devlink_resource_size_params *'
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3892:6: error: passing argument 7 of 'devlink_resource_register' from incompatible pointer type [-Werror=incompatible-pointer-types]
&mlxsw_sp_resource_kvd_linear_ops);
^
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.c:64:
include/net/devlink.h:560:1: note: expected 'const struct devlink_resource_size_params *' but argument is of type 'struct devlink_resource_ops *'
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3887:8: error: too few arguments to function 'devlink_resource_register'
err = devlink_resource_register(devlink, MLXSW_SP_RESOURCE_NAME_KVD_LINEAR,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.c:64:
include/net/devlink.h:560:1: note: declared here
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3909:6: warning: passing argument 6 of 'devlink_resource_register' makes integer from pointer without a cast [-Wint-conversion]
&hash_double_size_params,
^
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.c:64:
include/net/devlink.h:560:1: note: expected 'u64 {aka long long unsigned int}' but argument is of type 'struct devlink_resource_size_params *'
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3905:8: error: too few arguments to function 'devlink_resource_register'
err = devlink_resource_register(devlink, MLXSW_SP_RESOURCE_NAME_KVD_HASH_DOUBLE,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.c:64:
include/net/devlink.h:560:1: note: declared here
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3919:6: warning: passing argument 6 of 'devlink_resource_register' makes integer from pointer without a cast [-Wint-conversion]
&hash_single_size_params,
^
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.c:64:
include/net/devlink.h:560:1: note: expected 'u64 {aka long long unsigned int}' but argument is of type 'struct devlink_resource_size_params *'
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3915:8: error: too few arguments to function 'devlink_resource_register'
err = devlink_resource_register(devlink, MLXSW_SP_RESOURCE_NAME_KVD_HASH_SINGLE,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.c:64:
include/net/devlink.h:560:1: note: declared here
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c: In function 'mlxsw_sp_kvdl_resources_register':
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:465:6: warning: passing argument 6 of 'devlink_resource_register' makes integer from pointer without a cast [-Wint-conversion]
&mlxsw_sp_kvdl_single_size_params,
^
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:38:
include/net/devlink.h:560:1: note: expected 'u64 {aka long long unsigned int}' but argument is of type 'struct devlink_resource_size_params *'
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:466:6: error: passing argument 7 of 'devlink_resource_register' from incompatible pointer type [-Werror=incompatible-pointer-types]
&mlxsw_sp_kvdl_single_ops);
^
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:38:
include/net/devlink.h:560:1: note: expected 'const struct devlink_resource_size_params *' but argument is of type 'struct devlink_resource_ops *'
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:461:8: error: too few arguments to function 'devlink_resource_register'
err = devlink_resource_register(devlink, MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_SINGLES,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:38:
include/net/devlink.h:560:1: note: declared here
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:474:6: warning: passing argument 6 of 'devlink_resource_register' makes integer from pointer without a cast [-Wint-conversion]
&mlxsw_sp_kvdl_chunks_size_params,
^
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:38:
include/net/devlink.h:560:1: note: expected 'u64 {aka long long unsigned int}' but argument is of type 'struct devlink_resource_size_params *'
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:475:6: error: passing argument 7 of 'devlink_resource_register' from incompatible pointer type [-Werror=incompatible-pointer-types]
&mlxsw_sp_kvdl_chunks_ops);
^
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:38:
include/net/devlink.h:560:1: note: expected 'const struct devlink_resource_size_params *' but argument is of type 'struct devlink_resource_ops *'
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:470:8: error: too few arguments to function 'devlink_resource_register'
err = devlink_resource_register(devlink, MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_CHUNKS,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:38:
include/net/devlink.h:560:1: note: declared here
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:483:6: warning: passing argument 6 of 'devlink_resource_register' makes integer from pointer without a cast [-Wint-conversion]
&mlxsw_sp_kvdl_large_chunks_size_params,
^
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:38:
include/net/devlink.h:560:1: note: expected 'u64 {aka long long unsigned int}' but argument is of type 'struct devlink_resource_size_params *'
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:484:6: error: passing argument 7 of 'devlink_resource_register' from incompatible pointer type [-Werror=incompatible-pointer-types]
&mlxsw_sp_kvdl_chunks_large_ops);
^
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:38:
include/net/devlink.h:560:1: note: expected 'const struct devlink_resource_size_params *' but argument is of type 'struct devlink_resource_ops *'
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:479:8: error: too few arguments to function 'devlink_resource_register'
err = devlink_resource_register(devlink, MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_LARGE_CHUNKS,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/mellanox/mlxsw/core.h:47:0,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.h:54,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:38:
include/net/devlink.h:560:1: note: declared here
devlink_resource_register(struct devlink *devlink,
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/devlink_resource_register +3878 drivers/net/ethernet/mellanox/mlxsw/spectrum.c
ef3116e54 Arkadi Sharshevsky 2018-01-15 3856
ef3116e54 Arkadi Sharshevsky 2018-01-15 3857 static int mlxsw_sp_resources_register(struct mlxsw_core *mlxsw_core)
ef3116e54 Arkadi Sharshevsky 2018-01-15 3858 {
ef3116e54 Arkadi Sharshevsky 2018-01-15 3859 struct devlink *devlink = priv_to_devlink(mlxsw_core);
77d270967 Jiri Pirko 2018-02-28 3860 struct devlink_resource_size_params hash_single_size_params;
77d270967 Jiri Pirko 2018-02-28 3861 struct devlink_resource_size_params hash_double_size_params;
77d270967 Jiri Pirko 2018-02-28 3862 struct devlink_resource_size_params linear_size_params;
77d270967 Jiri Pirko 2018-02-28 3863 struct devlink_resource_size_params kvd_size_params;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3864 u32 kvd_size, single_size, double_size, linear_size;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3865 const struct mlxsw_config_profile *profile;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3866 int err;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3867
ef3116e54 Arkadi Sharshevsky 2018-01-15 3868 profile = &mlxsw_sp_config_profile;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3869 if (!MLXSW_CORE_RES_VALID(mlxsw_core, KVD_SIZE))
ef3116e54 Arkadi Sharshevsky 2018-01-15 3870 return -EIO;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3871
77d270967 Jiri Pirko 2018-02-28 3872 mlxsw_sp_resource_size_params_prepare(mlxsw_core, &kvd_size_params,
77d270967 Jiri Pirko 2018-02-28 3873 &linear_size_params,
77d270967 Jiri Pirko 2018-02-28 3874 &hash_double_size_params,
77d270967 Jiri Pirko 2018-02-28 3875 &hash_single_size_params);
77d270967 Jiri Pirko 2018-02-28 3876
ef3116e54 Arkadi Sharshevsky 2018-01-15 3877 kvd_size = MLXSW_CORE_RES_GET(mlxsw_core, KVD_SIZE);
ef3116e54 Arkadi Sharshevsky 2018-01-15 @3878 err = devlink_resource_register(devlink, MLXSW_SP_RESOURCE_NAME_KVD,
145307460 David Ahern 2018-03-20 3879 kvd_size, MLXSW_SP_RESOURCE_KVD,
ef3116e54 Arkadi Sharshevsky 2018-01-15 3880 DEVLINK_RESOURCE_ID_PARENT_TOP,
77d270967 Jiri Pirko 2018-02-28 @3881 &kvd_size_params,
4f4bbf7c4 Arkadi Sharshevsky 2018-02-20 3882 NULL);
ef3116e54 Arkadi Sharshevsky 2018-01-15 3883 if (err)
ef3116e54 Arkadi Sharshevsky 2018-01-15 3884 return err;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3885
ef3116e54 Arkadi Sharshevsky 2018-01-15 3886 linear_size = profile->kvd_linear_size;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3887 err = devlink_resource_register(devlink, MLXSW_SP_RESOURCE_NAME_KVD_LINEAR,
145307460 David Ahern 2018-03-20 3888 linear_size,
ef3116e54 Arkadi Sharshevsky 2018-01-15 3889 MLXSW_SP_RESOURCE_KVD_LINEAR,
ef3116e54 Arkadi Sharshevsky 2018-01-15 3890 MLXSW_SP_RESOURCE_KVD,
77d270967 Jiri Pirko 2018-02-28 @3891 &linear_size_params,
ef3116e54 Arkadi Sharshevsky 2018-01-15 @3892 &mlxsw_sp_resource_kvd_linear_ops);
ef3116e54 Arkadi Sharshevsky 2018-01-15 3893 if (err)
ef3116e54 Arkadi Sharshevsky 2018-01-15 3894 return err;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3895
51d3c08e3 Arkadi Sharshevsky 2018-02-20 3896 err = mlxsw_sp_kvdl_resources_register(devlink);
51d3c08e3 Arkadi Sharshevsky 2018-02-20 3897 if (err)
51d3c08e3 Arkadi Sharshevsky 2018-02-20 3898 return err;
51d3c08e3 Arkadi Sharshevsky 2018-02-20 3899
ef3116e54 Arkadi Sharshevsky 2018-01-15 3900 double_size = kvd_size - linear_size;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3901 double_size *= profile->kvd_hash_double_parts;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3902 double_size /= profile->kvd_hash_double_parts +
ef3116e54 Arkadi Sharshevsky 2018-01-15 3903 profile->kvd_hash_single_parts;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3904 double_size = rounddown(double_size, profile->kvd_hash_granularity);
ef3116e54 Arkadi Sharshevsky 2018-01-15 3905 err = devlink_resource_register(devlink, MLXSW_SP_RESOURCE_NAME_KVD_HASH_DOUBLE,
145307460 David Ahern 2018-03-20 3906 double_size,
ef3116e54 Arkadi Sharshevsky 2018-01-15 3907 MLXSW_SP_RESOURCE_KVD_HASH_DOUBLE,
ef3116e54 Arkadi Sharshevsky 2018-01-15 3908 MLXSW_SP_RESOURCE_KVD,
77d270967 Jiri Pirko 2018-02-28 3909 &hash_double_size_params,
4f4bbf7c4 Arkadi Sharshevsky 2018-02-20 3910 NULL);
ef3116e54 Arkadi Sharshevsky 2018-01-15 3911 if (err)
ef3116e54 Arkadi Sharshevsky 2018-01-15 3912 return err;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3913
ef3116e54 Arkadi Sharshevsky 2018-01-15 3914 single_size = kvd_size - double_size - linear_size;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3915 err = devlink_resource_register(devlink, MLXSW_SP_RESOURCE_NAME_KVD_HASH_SINGLE,
145307460 David Ahern 2018-03-20 3916 single_size,
ef3116e54 Arkadi Sharshevsky 2018-01-15 3917 MLXSW_SP_RESOURCE_KVD_HASH_SINGLE,
ef3116e54 Arkadi Sharshevsky 2018-01-15 3918 MLXSW_SP_RESOURCE_KVD,
77d270967 Jiri Pirko 2018-02-28 3919 &hash_single_size_params,
4f4bbf7c4 Arkadi Sharshevsky 2018-02-20 3920 NULL);
ef3116e54 Arkadi Sharshevsky 2018-01-15 3921 if (err)
ef3116e54 Arkadi Sharshevsky 2018-01-15 3922 return err;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3923
ef3116e54 Arkadi Sharshevsky 2018-01-15 3924 return 0;
ef3116e54 Arkadi Sharshevsky 2018-01-15 3925 }
ef3116e54 Arkadi Sharshevsky 2018-01-15 3926
:::::: The code at line 3878 was first introduced by commit
:::::: ef3116e5403ecca1653eb5cb8fbd09e239855055 mlxsw: spectrum: Register KVD resources with devlink
:::::: TO: Arkadi Sharshevsky <arkadis@...lanox.com>
:::::: CC: David S. Miller <davem@...emloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (28898 bytes)
Powered by blists - more mailing lists