From: Michal Hocko <mhocko@kernel.org>
To: Souptick Joarder <jrdr.linux@gmail.com>
Cc: minchan@kernel.org, ngupta@vflare.org,
sergey.senozhatsky.work@gmail.com, linux-mm@kvack.org
Subject: Re: [PATCH v2] mm: zsmalloc: Replace return type int with bool
Date: Wed, 21 Feb 2018 11:22:38 +0100 [thread overview]
Message-ID: <20180221102237.GB14384@dhcp22.suse.cz> (raw)
In-Reply-To: <20180220175811.GA28277@jordon-HP-15-Notebook-PC>
On Tue 20-02-18 23:28:11, Souptick Joarder wrote:
[...]
> -static int zs_register_migration(struct zs_pool *pool)
> +static bool zs_register_migration(struct zs_pool *pool)
> {
> pool->inode = alloc_anon_inode(zsmalloc_mnt->mnt_sb);
> if (IS_ERR(pool->inode)) {
> pool->inode = NULL;
> - return 1;
> + return true;
> }
>
> pool->inode->i_mapping->private_data = pool;
> pool->inode->i_mapping->a_ops = &zsmalloc_aops;
> - return 0;
> + return false;
> }
Don't you find it a bit strange that the function returns false on
success?
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2018-02-21 10:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 17:58 Souptick Joarder
2018-02-21 10:22 ` Michal Hocko [this message]
2018-02-21 11:18 ` Souptick Joarder
2018-02-21 12:04 ` Michal Hocko
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=20180221102237.GB14384@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=jrdr.linux@gmail.com \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky.work@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox