All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: kbuild-all@lists.01.org
Subject: Re: [cgroup:for-next 1/5] kernel/cgroup/misc.c:61 valid_type() warn: unsigned 'type' is never less than zero.
Date: Fri, 16 Apr 2021 16:42:04 -0400	[thread overview]
Message-ID: <YHn2nDHqakJLG3di@slm.duckdns.org> (raw)
In-Reply-To: <YHU4XrOW1dBIZfVl@google.com>

[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]

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

WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Vipin Sharma <vipinsh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: kbuild-all-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	David Rientjes <rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: [cgroup:for-next 1/5] kernel/cgroup/misc.c:61 valid_type() warn: unsigned 'type' is never less than zero.
Date: Fri, 16 Apr 2021 16:42:04 -0400	[thread overview]
Message-ID: <YHn2nDHqakJLG3di@slm.duckdns.org> (raw)
In-Reply-To: <YHU4XrOW1dBIZfVl-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

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

  reply	other threads:[~2021-04-16 20:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13  4:30 [cgroup:for-next 1/5] kernel/cgroup/misc.c:61 valid_type() warn: unsigned 'type' is never less than zero kernel test robot
2021-04-13  4:30 ` kernel test robot
2021-04-13  6:21 ` Vipin Sharma
2021-04-13  6:21   ` Vipin Sharma
2021-04-16 20:42   ` Tejun Heo [this message]
2021-04-16 20:42     ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YHn2nDHqakJLG3di@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.