Re: [PATCH 35/56] ntfs: Remove void casts

From: Bert Wesarg
Date: Wed Apr 08 2009 - 08:23:21 EST


On Wed, Apr 8, 2009 at 13:22, Jack Stone <jwjstone@xxxxxxxxxxx> wrote:
> Remove uneeded void casts
>
> Signed-Off-By: Jack Stone <jwjstone@xxxxxxxxxxx>
> ---
> Âfs/ntfs/compress.c | Â Â2 +-
> Âfs/ntfs/dir.c   Â|  Â8 ++++----
> Âfs/ntfs/index.c  Â|  Â2 +-
> Âfs/ntfs/logfile.c Â| Â Â2 +-
> Âfs/ntfs/mft.c   Â|  Â4 ++--
> Âfs/ntfs/super.c  Â|  Â8 ++++----
> Âfs/ntfs/usnjrnl.c Â| Â Â2 +-
> Â7 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c
> index 9669541..12297ee 100644
> --- a/fs/ntfs/compress.c
> +++ b/fs/ntfs/compress.c
> @@ -280,7 +280,7 @@ return_error:
> Â Â Â Â}
>
> Â Â Â Â/* We have a valid destination page. Setup the destination pointers. */
> - Â Â Â dp_addr = (u8*)page_address(dp) + do_sb_start;
> + Â Â Â dp_addr = page_address(dp) + do_sb_start;
Pointer arithmetic.

>
> Â Â Â Â/* Now, we are ready to process the current sub-block (sb). */
> Â Â Â Âif (!(le16_to_cpup((le16*)cb) & NTFS_SB_IS_COMPRESSED)) {
> diff --git a/fs/ntfs/logfile.c b/fs/ntfs/logfile.c
> index d7932e9..b6be7c4 100644
> --- a/fs/ntfs/logfile.c
> +++ b/fs/ntfs/logfile.c
> @@ -549,7 +549,7 @@ bool ntfs_check_logfile(struct inode *log_vi, RESTART_PAGE_HEADER **rp)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âgoto err_out;
> Â Â Â Â Â Â Â Â Â Â Â Â}
> Â Â Â Â Â Â Â Â}
> - Â Â Â Â Â Â Â kaddr = (u8*)page_address(page) + (pos & ~PAGE_CACHE_MASK);
> + Â Â Â Â Â Â Â kaddr = page_address(page) + (pos & ~PAGE_CACHE_MASK);
Pointer arithmetic.

> Â Â Â Â Â Â Â Â/*
> Â Â Â Â Â Â Â Â * A non-empty block means the logfile is not empty while an
> Â Â Â Â Â Â Â Â * empty block after a non-empty block has been encountered
> diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c
> index 23bf684..552f91b 100644
> --- a/fs/ntfs/mft.c
> +++ b/fs/ntfs/mft.c
> @@ -1196,7 +1196,7 @@ static int ntfs_mft_bitmap_find_and_alloc_free_rec_nolock(ntfs_volume *vol,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â"bitmap, aborting.");
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âreturn PTR_ERR(page);
> Â Â Â Â Â Â Â Â Â Â Â Â}
> - Â Â Â Â Â Â Â Â Â Â Â buf = (u8*)page_address(page) + page_ofs;
> + Â Â Â Â Â Â Â Â Â Â Â buf = page_address(page) + page_ofs;
Pointer arithmetic.

> Â Â Â Â Â Â Â Â Â Â Â Âbit = data_pos & 7;
> Â Â Â Â Â Â Â Â Â Â Â Âdata_pos &= ~7ull;
> Â Â Â Â Â Â Â Â Â Â Â Ântfs_debug("Before inner for loop: size 0x%x, "
> @@ -1334,7 +1334,7 @@ static int ntfs_mft_bitmap_extend_allocation_nolock(ntfs_volume *vol)
> Â Â Â Â Â Â Â Ântfs_error(vol->sb, "Failed to read from lcn bitmap.");
> Â Â Â Â Â Â Â Âreturn PTR_ERR(page);
> Â Â Â Â}
> - Â Â Â b = (u8*)page_address(page) + (ll & ~PAGE_CACHE_MASK);
> + Â Â Â b = page_address(page) + (ll & ~PAGE_CACHE_MASK);
Pointer arithmetic.

> Â Â Â Âtb = 1 << (lcn & 7ull);
> Â Â Â Âdown_write(&vol->lcnbmp_lock);
> Â Â Â Âif (*b != 0xff && !(*b & tb)) {
> --
Bert
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/