[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202206030514.RrhPomLx-lkp@intel.com>
Date: Fri, 3 Jun 2022 05:22:50 +0800
From: kernel test robot <lkp@...el.com>
To: Jiri Pirko <jiri@...dia.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [jpirko-mlxsw:jiri_devel_lc_dev 4/5]
drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c:67: undefined
reference to `auxiliary_device_init'
tree: https://github.com/jpirko/linux_mlxsw jiri_devel_lc_dev
head: ef34c1c33c0ae43a9ad3c0ed3708eb1880972de0
commit: 2d0852c5fa89a48c6fa1f860600b5e24e2faab4b [4/5] mlxsw: core_linecards: Introduce per line card auxiliary device
config: microblaze-randconfig-r011-20220531 (https://download.01.org/0day-ci/archive/20220603/202206030514.RrhPomLx-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/jpirko/linux_mlxsw/commit/2d0852c5fa89a48c6fa1f860600b5e24e2faab4b
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw jiri_devel_lc_dev
git checkout 2d0852c5fa89a48c6fa1f860600b5e24e2faab4b
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=microblaze SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
microblaze-linux-ld: drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.o: in function `mlxsw_linecard_dev_add':
>> drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c:67: undefined reference to `auxiliary_device_init'
>> microblaze-linux-ld: drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c:74: undefined reference to `__auxiliary_device_add'
microblaze-linux-ld: drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.o: in function `mlxsw_linecard_driver_register':
>> drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c:138: undefined reference to `__auxiliary_driver_register'
microblaze-linux-ld: drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.o: in function `mlxsw_linecard_driver_unregister':
>> drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c:143: undefined reference to `auxiliary_driver_unregister'
vim +67 drivers/net/ethernet/mellanox/mlxsw/core_linecard_dev.c
44
45 int mlxsw_linecard_dev_add(struct mlxsw_linecard *linecard)
46 {
47 struct mlxsw_linecard_dev *linecard_dev;
48 int err;
49 int id;
50
51 id = mlxsw_linecard_dev_id_alloc();
52 if (id < 0) {
53 return id;
54 }
55
56 linecard_dev = kzalloc(sizeof(*linecard_dev), GFP_KERNEL);
57 if (!linecard_dev) {
58 mlxsw_linecard_dev_id_free(id);
59 return -ENOMEM;
60 }
61 linecard_dev->adev.id = id;
62 linecard_dev->adev.name = MLXSW_LINECARD_DEV_ID_NAME;
63 linecard_dev->adev.dev.release = mlxsw_linecard_dev_release;
64 linecard_dev->adev.dev.parent = linecard->linecards->bus_info->dev;
65 linecard_dev->linecard = linecard;
66
> 67 err = auxiliary_device_init(&linecard_dev->adev);
68 if (err) {
69 mlxsw_linecard_dev_id_free(id);
70 kfree(linecard_dev);
71 return err;
72 }
73
> 74 err = auxiliary_device_add(&linecard_dev->adev);
75 if (err) {
76 auxiliary_device_uninit(&linecard_dev->adev);
77 return err;
78 }
79
80 linecard->dev = linecard_dev;
81 return 0;
82 }
83
84 void mlxsw_linecard_dev_del(struct mlxsw_linecard *linecard)
85 {
86 struct mlxsw_linecard_dev *linecard_dev = linecard->dev;
87
88 auxiliary_device_delete(&linecard_dev->adev);
89 auxiliary_device_uninit(&linecard_dev->adev);
90 }
91
92 static const struct devlink_ops mlxsw_linecard_dev_devlink_ops = {
93
94 };
95
96
97 static int mlxsw_linecard_dev_probe(struct auxiliary_device *adev,
98 const struct auxiliary_device_id *id)
99 {
100 struct mlxsw_linecard_dev *linecard_dev = container_of(adev, struct mlxsw_linecard_dev, adev);
101 struct devlink *devlink;
102
103 devlink = devlink_alloc(&mlxsw_linecard_dev_devlink_ops, 0, &adev->dev);
104 if (!devlink)
105 return -ENOMEM;
106
107 devlink_register(devlink);
108 linecard_dev->devlink = devlink;
109
110 return 0;
111 }
112
113 static void mlxsw_linecard_dev_remove(struct auxiliary_device *adev)
114 {
115 struct mlxsw_linecard_dev *linecard_dev = container_of(adev, struct mlxsw_linecard_dev, adev);
116 struct devlink *devlink = linecard_dev->devlink;
117
118 devlink_unregister(devlink);
119 devlink_free(devlink);
120 }
121
122 static const struct auxiliary_device_id mlxsw_linecard_dev_id_table[] = {
123 { .name = KBUILD_MODNAME "." MLXSW_LINECARD_DEV_ID_NAME },
124 {},
125 };
126
127 MODULE_DEVICE_TABLE(auxiliary, mlxsw_linecard_dev_id_table);
128
129 static struct auxiliary_driver mlxsw_linecard_driver = {
130 .name = MLXSW_LINECARD_DEV_ID_NAME,
131 .probe = mlxsw_linecard_dev_probe,
132 .remove = mlxsw_linecard_dev_remove,
133 .id_table = mlxsw_linecard_dev_id_table,
134 };
135
136 int mlxsw_linecard_driver_register(void)
137 {
> 138 return auxiliary_driver_register(&mlxsw_linecard_driver);
139 }
140
141 void mlxsw_linecard_driver_unregister(void)
142 {
> 143 auxiliary_driver_unregister(&mlxsw_linecard_driver);
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists