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: <AANLkTimrnj-xfS8_xGjAXk1Ee-vnOXrdj6vB163h60kw@mail.gmail.com>
Date:	Mon, 1 Nov 2010 21:01:39 +0200
From:	Pekka Enberg <penberg@...nel.org>
To:	Tracey Dent <tdent48227@...il.com>
Cc:	greg@...ah.com, manningc2@...rix.gen.nz,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 06/29] Staging: yaffs2: yaffs_bitmap: Add files

On Mon, Nov 1, 2010 at 8:40 PM, Tracey Dent <tdent48227@...il.com> wrote:
> Adding files to yaffs2 directory.
>
> Signed-off-by: Tracey Dent <tdent48227@...il.com>
> ---
>  drivers/staging/yaffs2/yaffs_bitmap.c |  105 +++++++++++++++++++++++++++++++++
>  drivers/staging/yaffs2/yaffs_bitmap.h |   33 ++++++++++
>  2 files changed, 138 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/staging/yaffs2/yaffs_bitmap.c
>  create mode 100644 drivers/staging/yaffs2/yaffs_bitmap.h
>
> diff --git a/drivers/staging/yaffs2/yaffs_bitmap.c b/drivers/staging/yaffs2/yaffs_bitmap.c
> new file mode 100644
> index 0000000..85c8c1d
> --- /dev/null
> +++ b/drivers/staging/yaffs2/yaffs_bitmap.c
> @@ -0,0 +1,105 @@
> +/*
> + * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
> + *
> + * Copyright (C) 2002-2010 Aleph One Ltd.
> + *   for Toby Churchill Ltd and Brightstar Engineering
> + *
> + * Created by Charles Manning <charles@...ph1.co.uk>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include "yaffs_bitmap.h"
> +#include "yaffs_trace.h"
> +/*
> + * Chunk bitmap manipulations
> + */
> +
> +static Y_INLINE __u8 *yaffs_block_bits(yaffs_dev_t *dev, int blk)
> +{
> +       if (blk < dev->internal_start_block || blk > dev->internal_end_block) {
> +               T(YAFFS_TRACE_ERROR,
> +                       (TSTR("**>> yaffs: BlockBits block %d is not valid" TENDSTR),
> +                       blk));
> +               YBUG();
> +       }
> +       return dev->chunk_bits +
> +               (dev->chunk_bit_stride * (blk - dev->internal_start_block));
> +}

We have <linux/bitmap.h>. You should probably use it.
--
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