All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Li Zetao <lizetao1@huawei.com>
Cc: lizefan.x@bytedance.com, hannes@cmpxchg.org, shuah@kernel.org,
	cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH -next] selftests: cgroup: Remove redundant if statements
Date: Mon, 31 Jul 2023 13:42:51 -1000	[thread overview]
Message-ID: <ZMhG-yPZttsOY7y9@slm.duckdns.org> (raw)
In-Reply-To: <20230731134205.2723657-1-lizetao1@huawei.com>

On Mon, Jul 31, 2023 at 09:42:05PM +0800, Li Zetao wrote:
> There is a warning reported by coccinelle:
> 
> ./tools/testing/selftests/cgroup/test_zswap.c:211:6-18: WARNING:
> 		Unsigned expression compared with zero: stored_pages     <     0
> 
> The type of "stored_pages" is size_t, which always be an unsigned type,
> so it is impossible less than zero. Drop the if statements to silence
> the warning.
> 
> Signed-off-by: Li Zetao <lizetao1@huawei.com>

Looks fine to me but the zswap test addition is going through akpm's tree, I
think, so probably best to repost it to Andrew.

Thanks.

-- 
tejun

WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Li Zetao <lizetao1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org,
	hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org,
	shuah-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kselftest-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH -next] selftests: cgroup: Remove redundant if statements
Date: Mon, 31 Jul 2023 13:42:51 -1000	[thread overview]
Message-ID: <ZMhG-yPZttsOY7y9@slm.duckdns.org> (raw)
In-Reply-To: <20230731134205.2723657-1-lizetao1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

On Mon, Jul 31, 2023 at 09:42:05PM +0800, Li Zetao wrote:
> There is a warning reported by coccinelle:
> 
> ./tools/testing/selftests/cgroup/test_zswap.c:211:6-18: WARNING:
> 		Unsigned expression compared with zero: stored_pages     <     0
> 
> The type of "stored_pages" is size_t, which always be an unsigned type,
> so it is impossible less than zero. Drop the if statements to silence
> the warning.
> 
> Signed-off-by: Li Zetao <lizetao1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

Looks fine to me but the zswap test addition is going through akpm's tree, I
think, so probably best to repost it to Andrew.

Thanks.

-- 
tejun

  reply	other threads:[~2023-07-31 23:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31 13:42 [PATCH -next] selftests: cgroup: Remove redundant if statements Li Zetao
2023-07-31 13:42 ` Li Zetao
2023-07-31 23:42 ` Tejun Heo [this message]
2023-07-31 23: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=ZMhG-yPZttsOY7y9@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=lizetao1@huawei.com \
    --cc=shuah@kernel.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.