[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180410062211.GB38000@rodete-desktop-imager.corp.google.com>
Date: Tue, 10 Apr 2018 15:22:11 +0900
From: Minchan Kim <minchan@...nel.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Greg KH <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v3 4/4] zram: introduce zram memory tracking
On Tue, Apr 10, 2018 at 09:03:05AM +0900, Sergey Senozhatsky wrote:
> Hi Minchan,
>
> On (04/09/18 14:54), Minchan Kim wrote:
> > +static long long ns2usecs(u64 nsec)
> > +{
> > + nsec += 500;
> > + do_div(nsec, 1000);
> > + return nsec;
> > +}
>
> Sorry, I don't quite understand "nsec += 500".
Round-off
>
> > +static ssize_t read_block_state(struct file *file, char __user *buf,
> > + size_t count, loff_t *ppos)
> > +{
> [..]
> > +
> > + up_read(&zram->init_lock);
> > + copy_to_user(buf, kbuf, written);
>
> drivers/block/zram/zram_drv.c: In function ‘read_block_state’:
> drivers/block/zram/zram_drv.c:701:2: warning: ignoring return value of ‘copy_to_user’, declared with attribute warn_unused_result [-Wunused-result]
> copy_to_user(buf, kbuf, written);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Good catch.
>
> [..]
> > @@ -61,7 +61,9 @@ struct zram_table_entry {
> > unsigned long element;
> > };
> > unsigned long value;
> > +#ifdef CONFIG_ZRAM_MEMORY_TRACKING
>
> A silly nitpick, but since you are going to resend this one, could you
> remove TAB between ifdef and CONFIG_ZRAM_MEMORY_TRACKING?
Sure.
Powered by blists - more mailing lists