linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Brian Geffon <bgeffon@google.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Richard Chang <richardycc@google.com>,
	 Minchan Kim <minchan@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 sawlani@google.com
Subject: Re: [PATCHv2] zram: modernize writeback interface
Date: Fri, 4 Apr 2025 10:50:43 +0900	[thread overview]
Message-ID: <6555ksohyt2qvigdxpcdg3holtxurmoot4ocdahdtyunaaxx4b@jwlzy65jm5ob> (raw)
In-Reply-To: <Z-7yAWG3IE7dnOKi@google.com>

On (25/04/03 20:39), Brian Geffon wrote:
[..]
> > +static int parse_page_index(char *val, unsigned long nr_pages,
> > +			    unsigned long *lo, unsigned long *hi)
> > +{
> > +	int ret;
> > +
> > +	ret = kstrtoul(val, 10, lo);
> > +	if (ret)
> > +		return ret;
> > +	*hi = *lo + 1;
> > +	if (*lo >= nr_pages || *hi > nr_pages)
> 
> I think you can do just:
> if (*lo >= nr_pages)
> 
> The *hi > nr_pages check seems superfluous given the
> assignment directly above this.

Ack, thanks.


      reply	other threads:[~2025-04-04  1:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-27  1:58 Sergey Senozhatsky
2025-04-03 20:39 ` Brian Geffon
2025-04-04  1:50   ` Sergey Senozhatsky [this message]

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=6555ksohyt2qvigdxpcdg3holtxurmoot4ocdahdtyunaaxx4b@jwlzy65jm5ob \
    --to=senozhatsky@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=bgeffon@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=richardycc@google.com \
    --cc=sawlani@google.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