From: Souptick Joarder <jrdr.linux@gmail.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
sergey.senozhatsky.work@gmail.com, Linux-MM <linux-mm@kvack.org>
Subject: Re: [PATCH v2] mm: zsmalloc: Replace return type int with bool
Date: Wed, 21 Feb 2018 16:48:50 +0530 [thread overview]
Message-ID: <CAFqt6za=iGsXKa=2dfjOq=7fKy+BxAq_=08=OYPmAy8GwugXAA@mail.gmail.com> (raw)
In-Reply-To: <20180221102237.GB14384@dhcp22.suse.cz>
On Wed, Feb 21, 2018 at 3:52 PM, Michal Hocko <mhocko@kernel.org> wrote:
> 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?
The original code was returning 0 on success and return value was handled
accordingly in zs_create_pool(). So returning false on success.
Shall I change it ?
> --
> Michal Hocko
> SUSE Labs
-Souptick
--
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 11:18 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
2018-02-21 11:18 ` Souptick Joarder [this message]
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='CAFqt6za=iGsXKa=2dfjOq=7fKy+BxAq_=08=OYPmAy8GwugXAA@mail.gmail.com' \
--to=jrdr.linux@gmail.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.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