Re: [PATCH 06/29] Staging: yaffs2: yaffs_bitmap: Add files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 1, 2010 at 8:40 PM, Tracey Dent <tdent48227@xxxxxxxxx> wrote:
> Adding files to yaffs2 directory.
>
> Signed-off-by: Tracey Dent <tdent48227@xxxxxxxxx>
> ---
>  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@xxxxxxxxxxxx>
> + *
> + * 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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux