Re: [PATCH net-next 2/3] net: dsa: mv88e6xxx: return error instead of lane in .serdes_get_lane
by kernel test robot
Hi "Marek,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Marek-Beh-n/net-dsa-mv88e6xxx-Ad...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git e3ec1e8ca02b7e6c935bba3f9b6da86c2e57d2eb
config: x86_64-randconfig-a006-20200818 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b34b1e38381fa4d1b1d9751a6b5233b68e734cfe)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/dsa/mv88e6xxx/serdes.c:428:15: warning: result of comparison of constant -1 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
return *lane == -1 ? -ENODEV : 0;
~~~~~ ^ ~~
drivers/net/dsa/mv88e6xxx/serdes.c:451:15: warning: result of comparison of constant -1 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
return *lane == -1 ? -ENODEV : 0;
~~~~~ ^ ~~
drivers/net/dsa/mv88e6xxx/serdes.c:526:15: warning: result of comparison of constant -1 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
return *lane == -1 ? -ENODEV : 0;
~~~~~ ^ ~~
3 warnings generated.
# https://github.com/0day-ci/linux/commit/a63db5e9b7db608109e7a315dfde9e57d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Marek-Beh-n/net-dsa-mv88e6xxx-Add-Amethyst-88E6393X/20200819-234008
git checkout a63db5e9b7db608109e7a315dfde9e57df682a20
vim +428 drivers/net/dsa/mv88e6xxx/serdes.c
413
414 int mv88e6341_serdes_get_lane(struct mv88e6xxx_chip *chip, int port, u8 *lane)
415 {
416 u8 cmode = chip->ports[port].cmode;
417
418 *lane = -1;
419 switch (port) {
420 case 5:
421 if (cmode == MV88E6XXX_PORT_STS_CMODE_1000BASEX ||
422 cmode == MV88E6XXX_PORT_STS_CMODE_SGMII ||
423 cmode == MV88E6XXX_PORT_STS_CMODE_2500BASEX)
424 *lane = MV88E6341_PORT5_LANE;
425 break;
426 }
427
> 428 return *lane == -1 ? -ENODEV : 0;
429 }
430
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v2 2/2] Show /proc/self/net only for CAP_NET_ADMIN
by kernel test robot
Hi Alexey,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on kees/for-next/pstore linus/master v5.9-rc1 next-20200819]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Alexey-Gladkov/proc-Relax-check-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bcf876870b95592b52519ed4aafcf9d95999bc9c
config: m68k-randconfig-s032-20200819 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-183-gaa6ede3b-dirty
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/proc/root.c:187:31: sparse: sparse: incorrect type in assignment (different modifiers) @@ expected struct cred *mounter_cred @@ got struct cred const * @@
>> fs/proc/root.c:187:31: sparse: expected struct cred *mounter_cred
>> fs/proc/root.c:187:31: sparse: got struct cred const *
fs/proc/root.c:229:31: sparse: sparse: incorrect type in assignment (different modifiers) @@ expected struct cred *mounter_cred @@ got struct cred const * @@
fs/proc/root.c:229:31: sparse: expected struct cred *mounter_cred
fs/proc/root.c:229:31: sparse: got struct cred const *
# https://github.com/0day-ci/linux/commit/9c2a0eea7f38b1a4e201b8f2da0c5fd7b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexey-Gladkov/proc-Relax-check-of-mount-visibility/20200820-031542
git checkout 9c2a0eea7f38b1a4e201b8f2da0c5fd7b423daf9
vim +187 fs/proc/root.c
164
165 static int proc_fill_super(struct super_block *s, struct fs_context *fc)
166 {
167 struct proc_fs_context *ctx = fc->fs_private;
168 struct inode *root_inode;
169 struct proc_fs_info *fs_info;
170 int ret;
171
172 fs_info = kzalloc(sizeof(*fs_info), GFP_KERNEL);
173 if (!fs_info)
174 return -ENOMEM;
175
176 /* User space would break if executables or devices appear on proc */
177 s->s_iflags |= SB_I_USERNS_VISIBLE | SB_I_NOEXEC | SB_I_NODEV;
178 s->s_flags |= SB_NODIRATIME | SB_NOSUID | SB_NOEXEC;
179 s->s_blocksize = 1024;
180 s->s_blocksize_bits = 10;
181 s->s_magic = PROC_SUPER_MAGIC;
182 s->s_op = &proc_sops;
183 s->s_time_gran = 1;
184 s->s_fs_info = fs_info;
185
186 fs_info->pid_ns = get_pid_ns(ctx->pid_ns);
> 187 fs_info->mounter_cred = get_cred(fc->cred);
188
189 proc_apply_options(s, fc, current_user_ns());
190
191 /*
192 * procfs isn't actually a stacking filesystem; however, there is
193 * too much magic going on inside it to permit stacking things on
194 * top of it
195 */
196 s->s_stack_depth = FILESYSTEM_MAX_STACK_DEPTH;
197
198 /* procfs dentries and inodes don't require IO to create */
199 s->s_shrink.seeks = 0;
200
201 pde_get(&proc_root);
202 root_inode = proc_get_inode(s, &proc_root);
203 if (!root_inode) {
204 pr_err("proc_fill_super: get root inode failed\n");
205 return -ENOMEM;
206 }
207
208 s->s_root = d_make_root(root_inode);
209 if (!s->s_root) {
210 pr_err("proc_fill_super: allocate dentry failed\n");
211 return -ENOMEM;
212 }
213
214 ret = proc_setup_self(s);
215 if (ret) {
216 return ret;
217 }
218 return proc_setup_thread_self(s);
219 }
220
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[jpirko-mlxsw:petrm_8021qaz 18/18] drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:34: error: 'struct mlxsw_sp_port' has no member named 'span'
by kernel test robot
tree: https://github.com/jpirko/linux_mlxsw petrm_8021qaz
head: 9695d59b85070316a2336212a26addeff39f3c56
commit: 9695d59b85070316a2336212a26addeff39f3c56 [18/18] more wip
config: powerpc64-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.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
git checkout 9695d59b85070316a2336212a26addeff39f3c56
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/srcu.h:21,
from include/linux/notifier.h:16,
from arch/powerpc/include/asm/uprobes.h:12,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.c:5:
drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function 'mlxsw_sp_port_create':
>> drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:34: error: 'struct mlxsw_sp_port' has no member named 'span'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~
include/linux/workqueue.h:233:16: note: in definition of macro '__INIT_WORK'
233 | __init_work((_work), _onstack); \
| ^~~~~
include/linux/workqueue.h:257:3: note: in expansion of macro 'INIT_WORK'
257 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:2: note: in expansion of macro 'INIT_DELAYED_WORK'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:34: error: 'struct mlxsw_sp_port' has no member named 'span'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~
include/linux/workqueue.h:234:4: note: in definition of macro '__INIT_WORK'
234 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
| ^~~~~
include/linux/workqueue.h:257:3: note: in expansion of macro 'INIT_WORK'
257 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:2: note: in expansion of macro 'INIT_DELAYED_WORK'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:34: error: 'struct mlxsw_sp_port' has no member named 'span'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~
include/linux/workqueue.h:235:22: note: in definition of macro '__INIT_WORK'
235 | lockdep_init_map(&(_work)->lockdep_map, "(work_completion)"#_work, &__key, 0); \
| ^~~~~
include/linux/workqueue.h:257:3: note: in expansion of macro 'INIT_WORK'
257 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:2: note: in expansion of macro 'INIT_DELAYED_WORK'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:34: error: 'struct mlxsw_sp_port' has no member named 'span'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~
include/linux/workqueue.h:236:20: note: in definition of macro '__INIT_WORK'
236 | INIT_LIST_HEAD(&(_work)->entry); \
| ^~~~~
include/linux/workqueue.h:257:3: note: in expansion of macro 'INIT_WORK'
257 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:2: note: in expansion of macro 'INIT_DELAYED_WORK'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:34: error: 'struct mlxsw_sp_port' has no member named 'span'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~
include/linux/workqueue.h:237:4: note: in definition of macro '__INIT_WORK'
237 | (_work)->func = (_func); \
| ^~~~~
include/linux/workqueue.h:257:3: note: in expansion of macro 'INIT_WORK'
257 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:2: note: in expansion of macro 'INIT_DELAYED_WORK'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1568:6: error: 'mlxsw_sp_pb_speed_update_work' undeclared (first use in this function); did you mean 'mlxsw_sp_span_speed_update_work'?
1568 | mlxsw_sp_pb_speed_update_work);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/workqueue.h:237:20: note: in definition of macro '__INIT_WORK'
237 | (_work)->func = (_func); \
| ^~~~~
include/linux/workqueue.h:257:3: note: in expansion of macro 'INIT_WORK'
257 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:2: note: in expansion of macro 'INIT_DELAYED_WORK'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1568:6: note: each undeclared identifier is reported only once for each function it appears in
1568 | mlxsw_sp_pb_speed_update_work);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/workqueue.h:237:20: note: in definition of macro '__INIT_WORK'
237 | (_work)->func = (_func); \
| ^~~~~
include/linux/workqueue.h:257:3: note: in expansion of macro 'INIT_WORK'
257 | INIT_WORK(&(_work)->work, (_func)); \
| ^~~~~~~~~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:2: note: in expansion of macro 'INIT_DELAYED_WORK'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/workqueue.h:9,
from include/linux/srcu.h:21,
from include/linux/notifier.h:16,
from arch/powerpc/include/asm/uprobes.h:12,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/net/ethernet/mellanox/mlxsw/spectrum.c:5:
>> drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:34: error: 'struct mlxsw_sp_port' has no member named 'span'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~
include/linux/timer.h:114:19: note: in definition of macro '__init_timer'
114 | init_timer_key((_timer), (_fn), (_flags), #_timer, &__key);\
| ^~~~~~
include/linux/workqueue.h:272:2: note: in expansion of macro '__INIT_DELAYED_WORK'
272 | __INIT_DELAYED_WORK(_work, _func, 0)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1567:2: note: in expansion of macro 'INIT_DELAYED_WORK'
1567 | INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
| ^~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function 'mlxsw_sp_port_remove':
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:1624:41: error: 'struct mlxsw_sp_port' has no member named 'span'
1624 | cancel_delayed_work_sync(&mlxsw_sp_port->span.speed_update_dw);
| ^~
drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function 'mlxsw_sp_pude_event_func':
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:2029:40: error: 'struct mlxsw_sp_port' has no member named 'span'
2029 | mlxsw_core_schedule_dw(&mlxsw_sp_port->span.speed_update_dw, 0);
| ^~
--
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c:564:6: warning: no previous prototype for 'mlxsw_sp_pb_speed_update_work' [-Wmissing-prototypes]
564 | void mlxsw_sp_pb_speed_update_work(struct work_struct *work)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c: In function 'mlxsw_sp_pb_speed_update_work':
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c:575:2: error: 'err' undeclared (first use in this function)
575 | err = mlxsw_sp_port_speed_get(mlxsw_sp_port, &speed);
| ^~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c:575:2: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c:577:10: warning: 'return' with a value, in function returning void [-Wreturn-type]
577 | return err;
| ^~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c:564:6: note: declared here
564 | void mlxsw_sp_pb_speed_update_work(struct work_struct *work)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/seqlock.h:19,
from include/linux/mmzone.h:16,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/bvec.h:13,
from include/linux/skbuff.h:17,
from include/linux/if_ether.h:19,
from drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c:7:
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c:595:28: error: dereferencing pointer to incomplete type 'struct mlxsw_sp_span'
595 | mutex_lock(&mlxsw_sp->span->analyzed_ports_lock);
| ^~
include/linux/mutex.h:167:44: note: in definition of macro 'mutex_lock'
167 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
| ^~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c:597:6: error: implicit declaration of function 'mlxsw_sp_span_analyzed_port_find' [-Werror=implicit-function-declaration]
597 | if (mlxsw_sp_span_analyzed_port_find(mlxsw_sp->span,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c:599:3: error: implicit declaration of function 'mlxsw_sp_span_port_buffer_update'; did you mean 'mlxsw_sp_port_buffers_init'? [-Werror=implicit-function-declaration]
599 | mlxsw_sp_span_port_buffer_update(mlxsw_sp_port,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mlxsw_sp_port_buffers_init
cc1: some warnings being treated as errors
--
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c: In function 'mlxsw_sp_span_port_buffer_update':
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c:988:13: error: implicit declaration of function 'mlxsw_sp_span_buffsize_get'; did you mean 'mlxsw_reg_sbib_buff_size_get'? [-Werror=implicit-function-declaration]
988 | buffsize = mlxsw_sp_span_buffsize_get(mlxsw_sp, speed, mtu);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| mlxsw_reg_sbib_buff_size_get
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c: At top level:
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c:1743:3: error: 'const struct mlxsw_sp_span_ops' has no member named 'buffsize_get'
1743 | .buffsize_get = mlxsw_sp3_span_buffsize_get,
| ^~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c:1743:18: error: 'mlxsw_sp3_span_buffsize_get' undeclared here (not in a function); did you mean 'mlxsw_reg_sbib_buff_size_get'?
1743 | .buffsize_get = mlxsw_sp3_span_buffsize_get,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| mlxsw_reg_sbib_buff_size_get
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c:1743:18: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c:1743:18: note: (near initialization for 'mlxsw_sp3_span_ops')
cc1: some warnings being treated as errors
--
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1238:3: error: 'const struct mlxsw_sp_port_type_speed_ops' has no member named 'ptys_max_speed'
1238 | .ptys_max_speed = mlxsw_sp1_ptys_max_speed,
| ^~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1238:22: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
1238 | .ptys_max_speed = mlxsw_sp1_ptys_max_speed,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1238:22: note: (near initialization for 'mlxsw_sp1_port_type_speed_ops')
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1238:22: error: initialization of 'u32 (*)(struct mlxsw_sp *, u8, const struct ethtool_link_ksettings *)' {aka 'unsigned int (*)(struct mlxsw_sp *, unsigned char, const struct ethtool_link_ksettings *)'} from incompatible pointer type 'u32 (*)(struct mlxsw_sp *, u8)' {aka 'unsigned int (*)(struct mlxsw_sp *, unsigned char)'} [-Werror=incompatible-pointer-types]
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1238:22: note: (near initialization for 'mlxsw_sp1_port_type_speed_ops.to_ptys_advert_link')
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1239:26: warning: initialized field overwritten [-Woverride-init]
1239 | .to_ptys_advert_link = mlxsw_sp1_to_ptys_advert_link,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1239:26: note: (near initialization for 'mlxsw_sp1_port_type_speed_ops.to_ptys_advert_link')
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1660:3: error: 'const struct mlxsw_sp_port_type_speed_ops' has no member named 'ptys_max_speed'
1660 | .ptys_max_speed = mlxsw_sp2_ptys_max_speed,
| ^~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1660:22: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
1660 | .ptys_max_speed = mlxsw_sp2_ptys_max_speed,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1660:22: note: (near initialization for 'mlxsw_sp2_port_type_speed_ops')
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1660:22: error: initialization of 'u32 (*)(struct mlxsw_sp *, u8, const struct ethtool_link_ksettings *)' {aka 'unsigned int (*)(struct mlxsw_sp *, unsigned char, const struct ethtool_link_ksettings *)'} from incompatible pointer type 'u32 (*)(struct mlxsw_sp *, u8)' {aka 'unsigned int (*)(struct mlxsw_sp *, unsigned char)'} [-Werror=incompatible-pointer-types]
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1660:22: note: (near initialization for 'mlxsw_sp2_port_type_speed_ops.to_ptys_advert_link')
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1661:26: warning: initialized field overwritten [-Woverride-init]
1661 | .to_ptys_advert_link = mlxsw_sp2_to_ptys_advert_link,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c:1661:26: note: (near initialization for 'mlxsw_sp2_port_type_speed_ops.to_ptys_advert_link')
cc1: some warnings being treated as errors
# https://github.com/jpirko/linux_mlxsw/commit/9695d59b85070316a2336212a26a...
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw petrm_8021qaz
git checkout 9695d59b85070316a2336212a26addeff39f3c56
vim +1567 drivers/net/ethernet/mellanox/mlxsw/spectrum.c
7b819530669458 Petr Machata 2018-08-05 1370
5b15385964fab6 Ido Schimmel 2017-06-08 1371 static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u8 local_port,
49185277cc451e Jiri Pirko 2019-10-31 1372 u8 split_base_local_port,
35896d9641db1a Jiri Pirko 2019-10-31 1373 struct mlxsw_sp_port_mapping *port_mapping)
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1374 {
c57529e1d5d882 Ido Schimmel 2017-05-26 1375 struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan;
49185277cc451e Jiri Pirko 2019-10-31 1376 bool split = !!split_base_local_port;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1377 struct mlxsw_sp_port *mlxsw_sp_port;
622d3e9201072a Danielle Ratson 2020-07-09 1378 u32 lanes = port_mapping->width;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1379 struct net_device *dev;
1b604efb6c2890 Danielle Ratson 2020-07-09 1380 bool splittable;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1381 int err;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1382
1b604efb6c2890 Danielle Ratson 2020-07-09 1383 splittable = lanes > 1 && !split;
e519418f8992b0 Jiri Pirko 2019-03-24 1384 err = mlxsw_core_port_init(mlxsw_sp->core, local_port,
35896d9641db1a Jiri Pirko 2019-10-31 1385 port_mapping->module + 1, split,
622d3e9201072a Danielle Ratson 2020-07-09 1386 port_mapping->lane / lanes,
1b604efb6c2890 Danielle Ratson 2020-07-09 1387 splittable, lanes,
cdf29f4a262527 Jiri Pirko 2019-04-03 1388 mlxsw_sp->base_mac,
cdf29f4a262527 Jiri Pirko 2019-04-03 1389 sizeof(mlxsw_sp->base_mac));
5b15385964fab6 Ido Schimmel 2017-06-08 1390 if (err) {
5b15385964fab6 Ido Schimmel 2017-06-08 1391 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to init core port\n",
5b15385964fab6 Ido Schimmel 2017-06-08 1392 local_port);
5b15385964fab6 Ido Schimmel 2017-06-08 1393 return err;
5b15385964fab6 Ido Schimmel 2017-06-08 1394 }
5b15385964fab6 Ido Schimmel 2017-06-08 1395
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1396 dev = alloc_etherdev(sizeof(struct mlxsw_sp_port));
5b15385964fab6 Ido Schimmel 2017-06-08 1397 if (!dev) {
5b15385964fab6 Ido Schimmel 2017-06-08 1398 err = -ENOMEM;
5b15385964fab6 Ido Schimmel 2017-06-08 1399 goto err_alloc_etherdev;
5b15385964fab6 Ido Schimmel 2017-06-08 1400 }
f20a91f1cc7010 Jiri Pirko 2016-10-27 1401 SET_NETDEV_DEV(dev, mlxsw_sp->bus_info->dev);
6b2a880f9dd1c8 Jiri Pirko 2019-10-03 1402 dev_net_set(dev, mlxsw_sp_net(mlxsw_sp));
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1403 mlxsw_sp_port = netdev_priv(dev);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1404 mlxsw_sp_port->dev = dev;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1405 mlxsw_sp_port->mlxsw_sp = mlxsw_sp;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1406 mlxsw_sp_port->local_port = local_port;
a2d2a20553f0b7 Ido Schimmel 2018-12-20 1407 mlxsw_sp_port->pvid = MLXSW_SP_DEFAULT_VID;
18f1e70c413713 Ido Schimmel 2016-02-26 1408 mlxsw_sp_port->split = split;
49185277cc451e Jiri Pirko 2019-10-31 1409 mlxsw_sp_port->split_base_local_port = split_base_local_port;
35896d9641db1a Jiri Pirko 2019-10-31 1410 mlxsw_sp_port->mapping = *port_mapping;
0c83f88c02085a Ido Schimmel 2016-09-12 1411 mlxsw_sp_port->link.autoneg = 1;
31a08a523ae453 Ido Schimmel 2017-05-26 1412 INIT_LIST_HEAD(&mlxsw_sp_port->vlans_list);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1413
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1414 mlxsw_sp_port->pcpu_stats =
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1415 netdev_alloc_pcpu_stats(struct mlxsw_sp_port_pcpu_stats);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1416 if (!mlxsw_sp_port->pcpu_stats) {
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1417 err = -ENOMEM;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1418 goto err_alloc_stats;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1419 }
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1420
9deef43ddfb1df Nogah Frankel 2017-10-26 1421 INIT_DELAYED_WORK(&mlxsw_sp_port->periodic_hw_stats.update_dw,
fc1bbb0f1831cc Nogah Frankel 2016-09-16 1422 &update_stats_cache);
fc1bbb0f1831cc Nogah Frankel 2016-09-16 1423
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1424 dev->netdev_ops = &mlxsw_sp_port_netdev_ops;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1425 dev->ethtool_ops = &mlxsw_sp_port_ethtool_ops;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1426
35896d9641db1a Jiri Pirko 2019-10-31 1427 err = mlxsw_sp_port_module_map(mlxsw_sp_port);
5b15385964fab6 Ido Schimmel 2017-06-08 1428 if (err) {
5b15385964fab6 Ido Schimmel 2017-06-08 1429 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to map module\n",
5b15385964fab6 Ido Schimmel 2017-06-08 1430 mlxsw_sp_port->local_port);
5b15385964fab6 Ido Schimmel 2017-06-08 1431 goto err_port_module_map;
5b15385964fab6 Ido Schimmel 2017-06-08 1432 }
5b15385964fab6 Ido Schimmel 2017-06-08 1433
3247ff2b318f3e Ido Schimmel 2016-09-08 1434 err = mlxsw_sp_port_swid_set(mlxsw_sp_port, 0);
3247ff2b318f3e Ido Schimmel 2016-09-08 1435 if (err) {
3247ff2b318f3e Ido Schimmel 2016-09-08 1436 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to set SWID\n",
3247ff2b318f3e Ido Schimmel 2016-09-08 1437 mlxsw_sp_port->local_port);
3247ff2b318f3e Ido Schimmel 2016-09-08 1438 goto err_port_swid_set;
3247ff2b318f3e Ido Schimmel 2016-09-08 1439 }
3247ff2b318f3e Ido Schimmel 2016-09-08 1440
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1441 err = mlxsw_sp_port_dev_addr_init(mlxsw_sp_port);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1442 if (err) {
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1443 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Unable to init port mac address\n",
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1444 mlxsw_sp_port->local_port);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1445 goto err_dev_addr_init;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1446 }
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1447
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1448 netif_carrier_off(dev);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1449
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1450 dev->features |= NETIF_F_NETNS_LOCAL | NETIF_F_LLTX | NETIF_F_SG |
763b4b70afcd32 Yotam Gigi 2016-07-21 1451 NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_TC;
8e44c0ce599191 Jiri Pirko 2019-05-05 1452 dev->hw_features |= NETIF_F_HW_TC | NETIF_F_LOOPBACK;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1453
d894be57ca92c8 Jarod Wilson 2016-10-20 1454 dev->min_mtu = 0;
d894be57ca92c8 Jarod Wilson 2016-10-20 1455 dev->max_mtu = ETH_MAX_MTU;
d894be57ca92c8 Jarod Wilson 2016-10-20 1456
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1457 /* Each packet needs to have a Tx header (metadata) on top all other
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1458 * headers.
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1459 */
feb7d387a6cf6c Yotam Gigi 2016-10-04 1460 dev->needed_headroom = MLXSW_TXHDR_LEN;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1461
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1462 err = mlxsw_sp_port_system_port_mapping_set(mlxsw_sp_port);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1463 if (err) {
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1464 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to set system port mapping\n",
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1465 mlxsw_sp_port->local_port);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1466 goto err_port_system_port_mapping_set;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1467 }
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1468
35896d9641db1a Jiri Pirko 2019-10-31 1469 err = mlxsw_sp_port_speed_by_width_set(mlxsw_sp_port);
18f1e70c413713 Ido Schimmel 2016-02-26 1470 if (err) {
18f1e70c413713 Ido Schimmel 2016-02-26 1471 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to enable speeds\n",
18f1e70c413713 Ido Schimmel 2016-02-26 1472 mlxsw_sp_port->local_port);
18f1e70c413713 Ido Schimmel 2016-02-26 1473 goto err_port_speed_by_width_set;
18f1e70c413713 Ido Schimmel 2016-02-26 1474 }
18f1e70c413713 Ido Schimmel 2016-02-26 1475
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1476 err = mlxsw_sp_port_mtu_set(mlxsw_sp_port, ETH_DATA_LEN);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1477 if (err) {
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1478 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to set MTU\n",
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1479 mlxsw_sp_port->local_port);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1480 goto err_port_mtu_set;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1481 }
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1482
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1483 err = mlxsw_sp_port_admin_status_set(mlxsw_sp_port, false);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1484 if (err)
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1485 goto err_port_admin_status_set;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1486
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1487 err = mlxsw_sp_port_buffers_init(mlxsw_sp_port);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1488 if (err) {
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1489 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize buffers\n",
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1490 mlxsw_sp_port->local_port);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1491 goto err_port_buffers_init;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1492 }
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1493
90183b980d0af7 Ido Schimmel 2016-04-06 1494 err = mlxsw_sp_port_ets_init(mlxsw_sp_port);
90183b980d0af7 Ido Schimmel 2016-04-06 1495 if (err) {
90183b980d0af7 Ido Schimmel 2016-04-06 1496 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize ETS\n",
90183b980d0af7 Ido Schimmel 2016-04-06 1497 mlxsw_sp_port->local_port);
90183b980d0af7 Ido Schimmel 2016-04-06 1498 goto err_port_ets_init;
90183b980d0af7 Ido Schimmel 2016-04-06 1499 }
90183b980d0af7 Ido Schimmel 2016-04-06 1500
7b819530669458 Petr Machata 2018-08-05 1501 err = mlxsw_sp_port_tc_mc_mode_set(mlxsw_sp_port, true);
7b819530669458 Petr Machata 2018-08-05 1502 if (err) {
7b819530669458 Petr Machata 2018-08-05 1503 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize TC MC mode\n",
7b819530669458 Petr Machata 2018-08-05 1504 mlxsw_sp_port->local_port);
7b819530669458 Petr Machata 2018-08-05 1505 goto err_port_tc_mc_mode;
7b819530669458 Petr Machata 2018-08-05 1506 }
7b819530669458 Petr Machata 2018-08-05 1507
f00817df2b428e Ido Schimmel 2016-04-06 1508 /* ETS and buffers must be initialized before DCB. */
f00817df2b428e Ido Schimmel 2016-04-06 1509 err = mlxsw_sp_port_dcb_init(mlxsw_sp_port);
f00817df2b428e Ido Schimmel 2016-04-06 1510 if (err) {
f00817df2b428e Ido Schimmel 2016-04-06 1511 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize DCB\n",
f00817df2b428e Ido Schimmel 2016-04-06 1512 mlxsw_sp_port->local_port);
f00817df2b428e Ido Schimmel 2016-04-06 1513 goto err_port_dcb_init;
f00817df2b428e Ido Schimmel 2016-04-06 1514 }
f00817df2b428e Ido Schimmel 2016-04-06 1515
a110748725450a Ido Schimmel 2017-05-26 1516 err = mlxsw_sp_port_fids_init(mlxsw_sp_port);
45a4a16cdb0332 Ido Schimmel 2017-05-16 1517 if (err) {
a110748725450a Ido Schimmel 2017-05-26 1518 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize FIDs\n",
45a4a16cdb0332 Ido Schimmel 2017-05-16 1519 mlxsw_sp_port->local_port);
a110748725450a Ido Schimmel 2017-05-26 1520 goto err_port_fids_init;
45a4a16cdb0332 Ido Schimmel 2017-05-16 1521 }
45a4a16cdb0332 Ido Schimmel 2017-05-16 1522
371b437a325172 Nogah Frankel 2018-01-10 1523 err = mlxsw_sp_tc_qdisc_init(mlxsw_sp_port);
371b437a325172 Nogah Frankel 2018-01-10 1524 if (err) {
371b437a325172 Nogah Frankel 2018-01-10 1525 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize TC qdiscs\n",
371b437a325172 Nogah Frankel 2018-01-10 1526 mlxsw_sp_port->local_port);
371b437a325172 Nogah Frankel 2018-01-10 1527 goto err_port_qdiscs_init;
371b437a325172 Nogah Frankel 2018-01-10 1528 }
371b437a325172 Nogah Frankel 2018-01-10 1529
ff285d6847ce66 Petr Machata 2020-08-10 1530 if (mlxsw_sp->span_ops->fix_momte)
ff285d6847ce66 Petr Machata 2020-08-10 1531 mlxsw_sp->span_ops->fix_momte(mlxsw_sp_port);
ff285d6847ce66 Petr Machata 2020-08-10 1532
979b9b251ae06e Ido Schimmel 2019-09-26 1533 err = mlxsw_sp_port_vlan_set(mlxsw_sp_port, 0, VLAN_N_VID - 1, false,
979b9b251ae06e Ido Schimmel 2019-09-26 1534 false);
979b9b251ae06e Ido Schimmel 2019-09-26 1535 if (err) {
979b9b251ae06e Ido Schimmel 2019-09-26 1536 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to clear VLAN filter\n",
979b9b251ae06e Ido Schimmel 2019-09-26 1537 mlxsw_sp_port->local_port);
979b9b251ae06e Ido Schimmel 2019-09-26 1538 goto err_port_vlan_clear;
979b9b251ae06e Ido Schimmel 2019-09-26 1539 }
979b9b251ae06e Ido Schimmel 2019-09-26 1540
6e6030bd541218 Ido Schimmel 2018-10-17 1541 err = mlxsw_sp_port_nve_init(mlxsw_sp_port);
6e6030bd541218 Ido Schimmel 2018-10-17 1542 if (err) {
6e6030bd541218 Ido Schimmel 2018-10-17 1543 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize NVE\n",
6e6030bd541218 Ido Schimmel 2018-10-17 1544 mlxsw_sp_port->local_port);
6e6030bd541218 Ido Schimmel 2018-10-17 1545 goto err_port_nve_init;
6e6030bd541218 Ido Schimmel 2018-10-17 1546 }
6e6030bd541218 Ido Schimmel 2018-10-17 1547
262e1ff91c3bc9 Ido Schimmel 2018-12-20 1548 err = mlxsw_sp_port_pvid_set(mlxsw_sp_port, MLXSW_SP_DEFAULT_VID);
262e1ff91c3bc9 Ido Schimmel 2018-12-20 1549 if (err) {
262e1ff91c3bc9 Ido Schimmel 2018-12-20 1550 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to set PVID\n",
262e1ff91c3bc9 Ido Schimmel 2018-12-20 1551 mlxsw_sp_port->local_port);
262e1ff91c3bc9 Ido Schimmel 2018-12-20 1552 goto err_port_pvid_set;
262e1ff91c3bc9 Ido Schimmel 2018-12-20 1553 }
262e1ff91c3bc9 Ido Schimmel 2018-12-20 1554
a2d2a20553f0b7 Ido Schimmel 2018-12-20 1555 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_create(mlxsw_sp_port,
a2d2a20553f0b7 Ido Schimmel 2018-12-20 1556 MLXSW_SP_DEFAULT_VID);
c57529e1d5d882 Ido Schimmel 2017-05-26 1557 if (IS_ERR(mlxsw_sp_port_vlan)) {
c57529e1d5d882 Ido Schimmel 2017-05-26 1558 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to create VID 1\n",
05978481e77e47 Ido Schimmel 2016-08-17 1559 mlxsw_sp_port->local_port);
d86fd113ebbb37 Wei Yongjun 2017-11-06 1560 err = PTR_ERR(mlxsw_sp_port_vlan);
635c8c8bba670d Ido Schimmel 2018-12-19 1561 goto err_port_vlan_create;
05978481e77e47 Ido Schimmel 2016-08-17 1562 }
346fca3b58cbe0 Ido Schimmel 2018-12-20 1563 mlxsw_sp_port->default_vlan = mlxsw_sp_port_vlan;
05978481e77e47 Ido Schimmel 2016-08-17 1564
5fc1733897bff1 Shalom Toledo 2019-07-04 1565 INIT_DELAYED_WORK(&mlxsw_sp_port->ptp.shaper_dw,
5fc1733897bff1 Shalom Toledo 2019-07-04 1566 mlxsw_sp->ptp_ops->shaper_work);
3a3e627ce0ac0f Jiri Pirko 2020-01-20 @1567 INIT_DELAYED_WORK(&mlxsw_sp_port->span.speed_update_dw,
9695d59b850703 Petr Machata 2020-08-19 @1568 mlxsw_sp_pb_speed_update_work);
5fc1733897bff1 Shalom Toledo 2019-07-04 1569
2f25844c233650 Ido Schimmel 2016-08-17 1570 mlxsw_sp->ports[local_port] = mlxsw_sp_port;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1571 err = register_netdev(dev);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1572 if (err) {
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1573 dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to register netdev\n",
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1574 mlxsw_sp_port->local_port);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1575 goto err_register_netdev;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1576 }
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1577
d808c7e490350c Elad Raz 2016-10-28 1578 mlxsw_core_port_eth_set(mlxsw_sp->core, mlxsw_sp_port->local_port,
e519418f8992b0 Jiri Pirko 2019-03-24 1579 mlxsw_sp_port, dev);
9deef43ddfb1df Nogah Frankel 2017-10-26 1580 mlxsw_core_schedule_dw(&mlxsw_sp_port->periodic_hw_stats.update_dw, 0);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1581 return 0;
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1582
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1583 err_register_netdev:
2f25844c233650 Ido Schimmel 2016-08-17 1584 mlxsw_sp->ports[local_port] = NULL;
635c8c8bba670d Ido Schimmel 2018-12-19 1585 mlxsw_sp_port_vlan_destroy(mlxsw_sp_port_vlan);
635c8c8bba670d Ido Schimmel 2018-12-19 1586 err_port_vlan_create:
262e1ff91c3bc9 Ido Schimmel 2018-12-20 1587 err_port_pvid_set:
6e6030bd541218 Ido Schimmel 2018-10-17 1588 mlxsw_sp_port_nve_fini(mlxsw_sp_port);
6e6030bd541218 Ido Schimmel 2018-10-17 1589 err_port_nve_init:
979b9b251ae06e Ido Schimmel 2019-09-26 1590 err_port_vlan_clear:
371b437a325172 Nogah Frankel 2018-01-10 1591 mlxsw_sp_tc_qdisc_fini(mlxsw_sp_port);
371b437a325172 Nogah Frankel 2018-01-10 1592 err_port_qdiscs_init:
a110748725450a Ido Schimmel 2017-05-26 1593 mlxsw_sp_port_fids_fini(mlxsw_sp_port);
a110748725450a Ido Schimmel 2017-05-26 1594 err_port_fids_init:
4de34eb5743f72 Ido Schimmel 2016-08-04 1595 mlxsw_sp_port_dcb_fini(mlxsw_sp_port);
f00817df2b428e Ido Schimmel 2016-04-06 1596 err_port_dcb_init:
7b819530669458 Petr Machata 2018-08-05 1597 mlxsw_sp_port_tc_mc_mode_set(mlxsw_sp_port, false);
7b819530669458 Petr Machata 2018-08-05 1598 err_port_tc_mc_mode:
90183b980d0af7 Ido Schimmel 2016-04-06 1599 err_port_ets_init:
4f02d302f11226 Petr Machata 2020-08-14 1600 mlxsw_sp_port_buffers_fini(mlxsw_sp_port);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1601 err_port_buffers_init:
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1602 err_port_admin_status_set:
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1603 err_port_mtu_set:
18f1e70c413713 Ido Schimmel 2016-02-26 1604 err_port_speed_by_width_set:
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1605 err_port_system_port_mapping_set:
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1606 err_dev_addr_init:
3247ff2b318f3e Ido Schimmel 2016-09-08 1607 mlxsw_sp_port_swid_set(mlxsw_sp_port, MLXSW_PORT_SWID_DISABLED_PORT);
3247ff2b318f3e Ido Schimmel 2016-09-08 1608 err_port_swid_set:
2e915e0b68c921 Ido Schimmel 2017-06-08 1609 mlxsw_sp_port_module_unmap(mlxsw_sp_port);
5b15385964fab6 Ido Schimmel 2017-06-08 1610 err_port_module_map:
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1611 free_percpu(mlxsw_sp_port->pcpu_stats);
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1612 err_alloc_stats:
56ade8fe3fe1e1 Jiri Pirko 2015-10-16 1613 free_netdev(dev);
5b15385964fab6 Ido Schimmel 2017-06-08 1614 err_alloc_etherdev:
67963a33b4fde8 Jiri Pirko 2016-10-28 1615 mlxsw_core_port_fini(mlxsw_sp->core, local_port);
67963a33b4fde8 Jiri Pirko 2016-10-28 1616 return err;
67963a33b4fde8 Jiri Pirko 2016-10-28 1617 }
67963a33b4fde8 Jiri Pirko 2016-10-28 1618
:::::: The code at line 1567 was first introduced by commit
:::::: 3a3e627ce0ac0fe15e0a011540a1f7c96bf8a07b spectrum: Add a delayed work to update SPAN buffsize according to speed
:::::: TO: Jiri Pirko <jiri(a)mellanox.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[peterz-queue:locking/wip 6/7] include/linux/irqflags.h:177:31: error: implicit declaration of function 'arch_irqs_disabled'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/wip
head: a76254f60dc69826643c45a19418b3e4c67d68f4
commit: 8e0c3933252fff31aaf97b37f660b1a3107debd2 [6/7] lockdep: Only trace IRQ edges
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.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
git checkout 8e0c3933252fff31aaf97b37f660b1a3107debd2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/asm-generic/bitops.h:14,
from ./arch/nds32/include/generated/asm/bitops.h:1,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/nds32/kernel/asm-offsets.c:4:
include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_irq':
>> include/linux/irqflags.h:177:31: error: implicit declaration of function 'arch_irqs_disabled'; did you mean 'raw_irqs_disabled'? [-Werror=implicit-function-declaration]
177 | #define raw_irqs_disabled() (arch_irqs_disabled())
| ^~~~~~~~~~~~~~~~~~
include/linux/irqflags.h:194:23: note: in expansion of macro 'raw_irqs_disabled'
194 | bool was_disabled = raw_irqs_disabled();\
| ^~~~~~~~~~~~~~~~~
include/linux/spinlock_api_smp.h:126:2: note: in expansion of macro 'local_irq_disable'
126 | local_irq_disable();
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/nds32/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1203: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/wip
git checkout 8e0c3933252fff31aaf97b37f660b1a3107debd2
vim +177 include/linux/irqflags.h
81d68a96a398448 Steven Rostedt 2008-05-12 151
df9ee29270c11db David Howells 2010-10-07 152 /*
df9ee29270c11db David Howells 2010-10-07 153 * Wrap the arch provided IRQ routines to provide appropriate checks.
df9ee29270c11db David Howells 2010-10-07 154 */
df9ee29270c11db David Howells 2010-10-07 155 #define raw_local_irq_disable() arch_local_irq_disable()
df9ee29270c11db David Howells 2010-10-07 156 #define raw_local_irq_enable() arch_local_irq_enable()
df9ee29270c11db David Howells 2010-10-07 157 #define raw_local_irq_save(flags) \
df9ee29270c11db David Howells 2010-10-07 158 do { \
df9ee29270c11db David Howells 2010-10-07 159 typecheck(unsigned long, flags); \
df9ee29270c11db David Howells 2010-10-07 160 flags = arch_local_irq_save(); \
df9ee29270c11db David Howells 2010-10-07 161 } while (0)
df9ee29270c11db David Howells 2010-10-07 162 #define raw_local_irq_restore(flags) \
df9ee29270c11db David Howells 2010-10-07 163 do { \
df9ee29270c11db David Howells 2010-10-07 164 typecheck(unsigned long, flags); \
df9ee29270c11db David Howells 2010-10-07 165 arch_local_irq_restore(flags); \
df9ee29270c11db David Howells 2010-10-07 166 } while (0)
df9ee29270c11db David Howells 2010-10-07 167 #define raw_local_save_flags(flags) \
df9ee29270c11db David Howells 2010-10-07 168 do { \
df9ee29270c11db David Howells 2010-10-07 169 typecheck(unsigned long, flags); \
df9ee29270c11db David Howells 2010-10-07 170 flags = arch_local_save_flags(); \
df9ee29270c11db David Howells 2010-10-07 171 } while (0)
df9ee29270c11db David Howells 2010-10-07 172 #define raw_irqs_disabled_flags(flags) \
df9ee29270c11db David Howells 2010-10-07 173 ({ \
df9ee29270c11db David Howells 2010-10-07 174 typecheck(unsigned long, flags); \
df9ee29270c11db David Howells 2010-10-07 175 arch_irqs_disabled_flags(flags); \
df9ee29270c11db David Howells 2010-10-07 176 })
df9ee29270c11db David Howells 2010-10-07 @177 #define raw_irqs_disabled() (arch_irqs_disabled())
df9ee29270c11db David Howells 2010-10-07 178 #define raw_safe_halt() arch_safe_halt()
de30a2b355ea853 Ingo Molnar 2006-07-03 179
:::::: The code at line 177 was first introduced by commit
:::::: df9ee29270c11dba7d0fe0b83ce47a4d8e8d2101 Fix IRQ flag handling naming
:::::: TO: David Howells <dhowells(a)redhat.com>
:::::: CC: David Howells <dhowells(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v2 2/2] Show /proc/self/net only for CAP_NET_ADMIN
by kernel test robot
Hi Alexey,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on kees/for-next/pstore linus/master v5.9-rc1 next-20200819]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Alexey-Gladkov/proc-Relax-check-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bcf876870b95592b52519ed4aafcf9d95999bc9c
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
fs/proc/root.c: In function 'proc_fill_super':
>> fs/proc/root.c:187:24: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
187 | fs_info->mounter_cred = get_cred(fc->cred);
| ^
fs/proc/root.c: In function 'proc_reconfigure':
fs/proc/root.c:229:24: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
229 | fs_info->mounter_cred = get_cred(fc->cred);
| ^
# https://github.com/0day-ci/linux/commit/9c2a0eea7f38b1a4e201b8f2da0c5fd7b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexey-Gladkov/proc-Relax-check-of-mount-visibility/20200820-031542
git checkout 9c2a0eea7f38b1a4e201b8f2da0c5fd7b423daf9
vim +/const +187 fs/proc/root.c
164
165 static int proc_fill_super(struct super_block *s, struct fs_context *fc)
166 {
167 struct proc_fs_context *ctx = fc->fs_private;
168 struct inode *root_inode;
169 struct proc_fs_info *fs_info;
170 int ret;
171
172 fs_info = kzalloc(sizeof(*fs_info), GFP_KERNEL);
173 if (!fs_info)
174 return -ENOMEM;
175
176 /* User space would break if executables or devices appear on proc */
177 s->s_iflags |= SB_I_USERNS_VISIBLE | SB_I_NOEXEC | SB_I_NODEV;
178 s->s_flags |= SB_NODIRATIME | SB_NOSUID | SB_NOEXEC;
179 s->s_blocksize = 1024;
180 s->s_blocksize_bits = 10;
181 s->s_magic = PROC_SUPER_MAGIC;
182 s->s_op = &proc_sops;
183 s->s_time_gran = 1;
184 s->s_fs_info = fs_info;
185
186 fs_info->pid_ns = get_pid_ns(ctx->pid_ns);
> 187 fs_info->mounter_cred = get_cred(fc->cred);
188
189 proc_apply_options(s, fc, current_user_ns());
190
191 /*
192 * procfs isn't actually a stacking filesystem; however, there is
193 * too much magic going on inside it to permit stacking things on
194 * top of it
195 */
196 s->s_stack_depth = FILESYSTEM_MAX_STACK_DEPTH;
197
198 /* procfs dentries and inodes don't require IO to create */
199 s->s_shrink.seeks = 0;
200
201 pde_get(&proc_root);
202 root_inode = proc_get_inode(s, &proc_root);
203 if (!root_inode) {
204 pr_err("proc_fill_super: get root inode failed\n");
205 return -ENOMEM;
206 }
207
208 s->s_root = d_make_root(root_inode);
209 if (!s->s_root) {
210 pr_err("proc_fill_super: allocate dentry failed\n");
211 return -ENOMEM;
212 }
213
214 ret = proc_setup_self(s);
215 if (ret) {
216 return ret;
217 }
218 return proc_setup_thread_self(s);
219 }
220
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH] PCI: Add pci_iounmap
by kernel test robot
In-Reply-To: <20200819162208.1965707-1-george.cherian(a)marvell.com>
References: <20200819162208.1965707-1-george.cherian(a)marvell.com>
TO: George Cherian <george.cherian(a)marvell.com>
TO: linux-kernel(a)vger.kernel.org
TO: linux-arch(a)vger.kernel.org
TO: linux-pci(a)vger.kernel.org
CC: bhelgaas(a)google.com
CC: arnd(a)arndb.de
CC: George Cherian <george.cherian(a)marvell.com>
Hi George,
I love your patch! Yet something to improve:
[auto build test ERROR on pci/next]
[also build test ERROR on linux/master linus/master v5.9-rc1 next-20200819]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/George-Cherian/PCI-Add-pci_iounm...
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: powerpc64-randconfig-r001-20200818 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b34b1e38381fa4d1b1d9751a6b5233b68e734cfe)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> ld.lld: error: duplicate symbol: pci_iounmap
>>> defined at iomap.c:188 (arch/powerpc/kernel/iomap.c:188)
>>> kernel/iomap.o:(pci_iounmap) in archive arch/powerpc/built-in.a
>>> defined at pci_iomap.c:141 (lib/pci_iomap.c:141)
>>> pci_iomap.o:(.text.pci_iounmap+0x0) in archive lib/built-in.a
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[ti:ti-rt-linux-5.4.y 9148/9607] net//core/sock.c:3092:28: error: 'SCM_REDUNDANT' undeclared
by kernel test robot
Hi WingMan,
FYI, the error/warning still remains.
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.4.y
head: 872a510b1bbcab3969980f7fdaa664d7818c0210
commit: 37ab3ad1acdc652a6694e6f45e67767a8a80592b [9148/9607] net: socket: pass on redundant net info to sock_recv_errqueue
config: sparc-defconfig (attached as .config)
compiler: sparc-linux-gcc (GCC) 9.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
git checkout 37ab3ad1acdc652a6694e6f45e67767a8a80592b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/net/inet_sock.h:22,
from include/net/ip.h:27,
from include/linux/errqueue.h:6,
from net//core/sock.c:91:
include/net/sock.h: In function 'sock_recv_redundant_info':
include/net/sock.h:2457:29: error: 'SCM_REDUNDANT' undeclared (first use in this function)
2457 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
include/net/sock.h:2457:29: note: each undeclared identifier is reported only once for each function it appears in
net//core/sock.c: In function 'sock_recv_errqueue':
>> net//core/sock.c:3092:28: error: 'SCM_REDUNDANT' undeclared (first use in this function)
3092 | put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
| ^~~~~~~~~~~~~
git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.4.y
git checkout 37ab3ad1acdc652a6694e6f45e67767a8a80592b
vim +/SCM_REDUNDANT +3092 net//core/sock.c
3066
3067 int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
3068 int level, int type)
3069 {
3070 struct sock_exterr_skb *serr;
3071 struct sk_buff *skb;
3072 int copied, err;
3073 struct skb_redundant_info *sred;
3074
3075 err = -EAGAIN;
3076 skb = sock_dequeue_err_skb(sk);
3077 if (skb == NULL)
3078 goto out;
3079
3080 copied = skb->len;
3081 if (copied > len) {
3082 msg->msg_flags |= MSG_TRUNC;
3083 copied = len;
3084 }
3085 err = skb_copy_datagram_msg(skb, 0, msg, copied);
3086 if (err)
3087 goto out_free_skb;
3088
3089 sock_recv_timestamp(msg, sk, skb);
3090
3091 sred = skb_redinfo(skb);
> 3092 put_cmsg(msg, SOL_SOCKET, SCM_REDUNDANT, sizeof(*sred), sred);
3093
3094 serr = SKB_EXT_ERR(skb);
3095 put_cmsg(msg, level, type, sizeof(serr->ee), &serr->ee);
3096
3097 msg->msg_flags |= MSG_ERRQUEUE;
3098 err = copied;
3099
3100 out_free_skb:
3101 kfree_skb(skb);
3102 out:
3103 return err;
3104 }
3105 EXPORT_SYMBOL(sock_recv_errqueue);
3106
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[peterz-queue:locking/wip 6/7] arch/microblaze/include/asm/irqflags.h:109:28: sparse: sparse: context imbalance in 'ring_buffer_peek' - different lock contexts for basic block
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/wip
head: a76254f60dc69826643c45a19418b3e4c67d68f4
commit: 8e0c3933252fff31aaf97b37f660b1a3107debd2 [6/7] lockdep: Only trace IRQ edges
config: microblaze-randconfig-s031-20200818 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-183-gaa6ede3b-dirty
git checkout 8e0c3933252fff31aaf97b37f660b1a3107debd2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
kernel/trace/ring_buffer.c:923:32: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __poll_t @@ got int @@
kernel/trace/ring_buffer.c:923:32: sparse: expected restricted __poll_t
kernel/trace/ring_buffer.c:923:32: sparse: got int
kernel/trace/ring_buffer.c: note: in included file (through include/linux/irqflags.h, include/asm-generic/bitops.h, arch/microblaze/include/generated/asm/bitops.h, ...):
>> arch/microblaze/include/asm/irqflags.h:109:28: sparse: sparse: context imbalance in 'ring_buffer_peek' - different lock contexts for basic block
>> arch/microblaze/include/asm/irqflags.h:109:28: sparse: sparse: context imbalance in 'ring_buffer_consume' - different lock contexts for basic block
>> arch/microblaze/include/asm/irqflags.h:109:28: sparse: sparse: context imbalance in 'ring_buffer_empty' - different lock contexts for basic block
>> arch/microblaze/include/asm/irqflags.h:109:28: sparse: sparse: context imbalance in 'ring_buffer_empty_cpu' - different lock contexts for basic block
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/wip
git checkout 8e0c3933252fff31aaf97b37f660b1a3107debd2
vim +/ring_buffer_peek +109 arch/microblaze/include/asm/irqflags.h
df9ee29270c11db David Howells 2010-10-07 108
a2f526994e92ea5 Steven Rostedt 2011-07-01 @109 static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
df9ee29270c11db David Howells 2010-10-07 110 {
df9ee29270c11db David Howells 2010-10-07 111 return (flags & MSR_IE) == 0;
df9ee29270c11db David Howells 2010-10-07 112 }
df9ee29270c11db David Howells 2010-10-07 113
:::::: The code at line 109 was first introduced by commit
:::::: a2f526994e92ea54be181efccda261c4b1a6ae8d microblaze/irqs: Do not trace arch_local_{*,irq_*} functions
:::::: TO: Steven Rostedt <srostedt(a)redhat.com>
:::::: CC: Michal Simek <monstr(a)monstr.eu>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month