lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdV_eyMhWS6+CFc--i_KBcyb31u11tEO3OkDQsB4HbYpfA@mail.gmail.com>
Date:	Wed, 14 Dec 2011 08:52:42 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Ajeet Yadav <ajeet.yadav.77@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...e.de>,
	Jerome Marchand <jmarchan@...hat.com>,
	Nitin Gupta <ngupta@...are.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] Staging: zram: print the disk size in KB

On Tue, Dec 13, 2011 at 06:16, Ajeet Yadav <ajeet.yadav.77@...il.com> wrote:
> From a5d5ba92b5af9134e617986884856334c377e1d0 Mon Sep 17 00:00:00 2001
> From: Ajeet Yadav <ajeet.yadav.77@...il.com>
> Date: Mon, 12 Dec 2011 18:42:30 +0530
> Subject: [PATCH 1/1] Staging: zram: print the disk size in KB
>
> Total memory size is in KB, but the zram disk size was not
> printed in KB, correct the figure in KB units.

Kelvin bytes?

> Signed-off-by: Ajeet Yadav <ajeet.yadav.77@...il.com>
> ---
>  drivers/staging/zram/zram_drv.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
> index 09de99f..ff591e3 100644
> --- a/drivers/staging/zram/zram_drv.c
> +++ b/drivers/staging/zram/zram_drv.c
> @@ -126,7 +126,7 @@ static void zram_set_disksize(struct zram *zram,
> size_t totalram_bytes)
>                "\tMemory Size: %zu kB\n"

kilobytes? Either this ...

>                "\tSize you selected: %llu kB\n"

... and this should be KiB ...

>                "Continuing anyway ...\n",
> -               totalram_bytes >> 10, zram->disksize
> +               totalram_bytes >> 10, zram->disksize >> 10

... or these should be / 1000 instead of >> 10.

>                );
>        }

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ