On Mon, Apr 12, 2021 at 11:21:18PM -0700, Vipin Sharma wrote: > On Tue, Apr 13, 2021 at 12:30:50PM +0800, kernel test robot wrote: > > smatch warnings: > > kernel/cgroup/misc.c:61 valid_type() warn: unsigned 'type' is never less than zero. > > kernel/cgroup/misc.c:210 misc_cg_max_show() warn: we never enter this loop > > kernel/cgroup/misc.c:257 misc_cg_max_write() warn: we never enter this loop > > kernel/cgroup/misc.c:299 misc_cg_current_show() warn: we never enter this loop > > kernel/cgroup/misc.c:323 misc_cg_capacity_show() warn: we never enter this loop > > kernel/cgroup/misc.c:376 misc_cg_alloc() warn: we never enter this loop > > kernel/cgroup/misc.c:376 misc_cg_alloc() warn: unsigned 'i' is never less than zero. > > kernel/cgroup/misc.c:376 misc_cg_alloc() warn: unsigned 'i' is never less than zero. > > > > Tejun, > > Should this be ignored because MISC_CG_RES_TYPES is 0 as no resource is > defined but the code has 'for' loops and condition checks which are valid? > > If there is a way to fix these let me know, I will make the change. Can't think of a pretty way to slience this, so ignoring sounds good to me for now. Maybe smatch folks have better ideas? Thanks. -- tejun