* [PATCH] FS: NTFS: fix whitespace and pointer issues in mst.c
@ 2010-03-07 11:50 Stewart Malik
2010-03-07 12:16 ` Al Viro
2010-03-07 19:48 ` Anton Altaparmakov
0 siblings, 2 replies; 4+ messages in thread
From: Stewart Malik @ 2010-03-07 11:50 UTC (permalink / raw)
To: aia21; +Cc: linux-ntfs-dev, linux-kernel, Stewart Malik
---
fs/ntfs/mst.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/fs/ntfs/mst.c b/fs/ntfs/mst.c
index 5a858d8..097a4c9 100644
--- a/fs/ntfs/mst.c
+++ b/fs/ntfs/mst.c
@@ -49,13 +49,13 @@ int post_read_mst_fixup(NTFS_RECORD *b, const u32 size)
/* Decrement usa_count to get number of fixups. */
usa_count = le16_to_cpu(b->usa_count) - 1;
/* Size and alignment checks. */
- if ( size & (NTFS_BLOCK_SIZE - 1) ||
+ if (size & (NTFS_BLOCK_SIZE - 1) ||
usa_ofs & 1 ||
usa_ofs + (usa_count * 2) > size ||
(size >> NTFS_BLOCK_SIZE_BITS) != usa_count)
return 0;
/* Position of usn in update sequence array. */
- usa_pos = (u16*)b + usa_ofs/sizeof(u16);
+ usa_pos = (u16 *)b + usa_ofs/sizeof(u16);
/*
* The update sequence number which has to be equal to each of the
* u16 values before they are fixed up. Note no need to care for
@@ -67,7 +67,7 @@ int post_read_mst_fixup(NTFS_RECORD *b, const u32 size)
/*
* Position in protected data of first u16 that needs fixing up.
*/
- data_pos = (u16*)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
+ data_pos = (u16 *)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
/*
* Check for incomplete multi sector transfer(s).
*/
@@ -85,7 +85,7 @@ int post_read_mst_fixup(NTFS_RECORD *b, const u32 size)
}
/* Re-setup the variables. */
usa_count = le16_to_cpu(b->usa_count) - 1;
- data_pos = (u16*)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
+ data_pos = (u16 *)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
/* Fixup all sectors. */
while (usa_count--) {
/*
@@ -135,13 +135,13 @@ int pre_write_mst_fixup(NTFS_RECORD *b, const u32 size)
/* Decrement usa_count to get number of fixups. */
usa_count = le16_to_cpu(b->usa_count) - 1;
/* Size and alignment checks. */
- if ( size & (NTFS_BLOCK_SIZE - 1) ||
+ if (size & (NTFS_BLOCK_SIZE - 1) ||
usa_ofs & 1 ||
usa_ofs + (usa_count * 2) > size ||
(size >> NTFS_BLOCK_SIZE_BITS) != usa_count)
return -EINVAL;
/* Position of usn in update sequence array. */
- usa_pos = (le16*)((u8*)b + usa_ofs);
+ usa_pos = (le16 *)((u8 *)b + usa_ofs);
/*
* Cyclically increment the update sequence number
* (skipping 0 and -1, i.e. 0xffff).
@@ -152,7 +152,7 @@ int pre_write_mst_fixup(NTFS_RECORD *b, const u32 size)
le_usn = cpu_to_le16(usn);
*usa_pos = le_usn;
/* Position in data of first u16 that needs fixing up. */
- data_pos = (le16*)b + NTFS_BLOCK_SIZE/sizeof(le16) - 1;
+ data_pos = (le16 *)b + NTFS_BLOCK_SIZE/sizeof(le16) - 1;
/* Fixup all sectors. */
while (usa_count--) {
/*
@@ -184,10 +184,10 @@ void post_write_mst_fixup(NTFS_RECORD *b)
u16 usa_count = le16_to_cpu(b->usa_count) - 1;
/* Position of usn in update sequence array. */
- usa_pos = (le16*)b + usa_ofs/sizeof(le16);
+ usa_pos = (le16 *)b + usa_ofs/sizeof(le16);
/* Position in protected data of first u16 that needs fixing up. */
- data_pos = (le16*)b + NTFS_BLOCK_SIZE/sizeof(le16) - 1;
+ data_pos = (le16 *)b + NTFS_BLOCK_SIZE/sizeof(le16) - 1;
/* Fixup all sectors. */
while (usa_count--) {
--
1.6.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] FS: NTFS: fix whitespace and pointer issues in mst.c
2010-03-07 11:50 [PATCH] FS: NTFS: fix whitespace and pointer issues in mst.c Stewart Malik
@ 2010-03-07 12:16 ` Al Viro
2010-03-07 13:25 ` Alexey Dobriyan
2010-03-07 19:48 ` Anton Altaparmakov
1 sibling, 1 reply; 4+ messages in thread
From: Al Viro @ 2010-03-07 12:16 UTC (permalink / raw)
To: Stewart Malik; +Cc: aia21, linux-ntfs-dev, linux-kernel
On Sun, Mar 07, 2010 at 10:20:51PM +1030, Stewart Malik wrote:
[whitespace noise]
Could we please stop using misleading subjects on that kind of patches?
"Pointer issues" generally doesn't mean "pure cosmetics".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] FS: NTFS: fix whitespace and pointer issues in mst.c
2010-03-07 12:16 ` Al Viro
@ 2010-03-07 13:25 ` Alexey Dobriyan
0 siblings, 0 replies; 4+ messages in thread
From: Alexey Dobriyan @ 2010-03-07 13:25 UTC (permalink / raw)
To: Al Viro; +Cc: Stewart Malik, aia21, linux-ntfs-dev, linux-kernel
On Sun, Mar 07, 2010 at 12:16:01PM +0000, Al Viro wrote:
> On Sun, Mar 07, 2010 at 10:20:51PM +1030, Stewart Malik wrote:
>
> [whitespace noise]
>
> Could we please stop using misleading subjects on that kind of patches?
More, could we please stop making git-blame output useless.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] FS: NTFS: fix whitespace and pointer issues in mst.c
2010-03-07 11:50 [PATCH] FS: NTFS: fix whitespace and pointer issues in mst.c Stewart Malik
2010-03-07 12:16 ` Al Viro
@ 2010-03-07 19:48 ` Anton Altaparmakov
1 sibling, 0 replies; 4+ messages in thread
From: Anton Altaparmakov @ 2010-03-07 19:48 UTC (permalink / raw)
To: Stewart Malik; +Cc: ntfs-dev, LKML
NAK.
What pointer issues are you talking about?!? Your patch only changes the whitespace in the type casts and I like it how it is at the moment, I don't like type casts with a space in them.
The "if ( size..." change to "if (size..." is fine. No idea how that happened. I never put space after a bracket normally!
Best regards,
Anton
On 7 Mar 2010, at 11:50, Stewart Malik wrote:
> ---
> fs/ntfs/mst.c | 18 +++++++++---------
> 1 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/fs/ntfs/mst.c b/fs/ntfs/mst.c
> index 5a858d8..097a4c9 100644
> --- a/fs/ntfs/mst.c
> +++ b/fs/ntfs/mst.c
> @@ -49,13 +49,13 @@ int post_read_mst_fixup(NTFS_RECORD *b, const u32 size)
> /* Decrement usa_count to get number of fixups. */
> usa_count = le16_to_cpu(b->usa_count) - 1;
> /* Size and alignment checks. */
> - if ( size & (NTFS_BLOCK_SIZE - 1) ||
> + if (size & (NTFS_BLOCK_SIZE - 1) ||
> usa_ofs & 1 ||
> usa_ofs + (usa_count * 2) > size ||
> (size >> NTFS_BLOCK_SIZE_BITS) != usa_count)
> return 0;
> /* Position of usn in update sequence array. */
> - usa_pos = (u16*)b + usa_ofs/sizeof(u16);
> + usa_pos = (u16 *)b + usa_ofs/sizeof(u16);
> /*
> * The update sequence number which has to be equal to each of the
> * u16 values before they are fixed up. Note no need to care for
> @@ -67,7 +67,7 @@ int post_read_mst_fixup(NTFS_RECORD *b, const u32 size)
> /*
> * Position in protected data of first u16 that needs fixing up.
> */
> - data_pos = (u16*)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
> + data_pos = (u16 *)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
> /*
> * Check for incomplete multi sector transfer(s).
> */
> @@ -85,7 +85,7 @@ int post_read_mst_fixup(NTFS_RECORD *b, const u32 size)
> }
> /* Re-setup the variables. */
> usa_count = le16_to_cpu(b->usa_count) - 1;
> - data_pos = (u16*)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
> + data_pos = (u16 *)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
> /* Fixup all sectors. */
> while (usa_count--) {
> /*
> @@ -135,13 +135,13 @@ int pre_write_mst_fixup(NTFS_RECORD *b, const u32 size)
> /* Decrement usa_count to get number of fixups. */
> usa_count = le16_to_cpu(b->usa_count) - 1;
> /* Size and alignment checks. */
> - if ( size & (NTFS_BLOCK_SIZE - 1) ||
> + if (size & (NTFS_BLOCK_SIZE - 1) ||
> usa_ofs & 1 ||
> usa_ofs + (usa_count * 2) > size ||
> (size >> NTFS_BLOCK_SIZE_BITS) != usa_count)
> return -EINVAL;
> /* Position of usn in update sequence array. */
> - usa_pos = (le16*)((u8*)b + usa_ofs);
> + usa_pos = (le16 *)((u8 *)b + usa_ofs);
> /*
> * Cyclically increment the update sequence number
> * (skipping 0 and -1, i.e. 0xffff).
> @@ -152,7 +152,7 @@ int pre_write_mst_fixup(NTFS_RECORD *b, const u32 size)
> le_usn = cpu_to_le16(usn);
> *usa_pos = le_usn;
> /* Position in data of first u16 that needs fixing up. */
> - data_pos = (le16*)b + NTFS_BLOCK_SIZE/sizeof(le16) - 1;
> + data_pos = (le16 *)b + NTFS_BLOCK_SIZE/sizeof(le16) - 1;
> /* Fixup all sectors. */
> while (usa_count--) {
> /*
> @@ -184,10 +184,10 @@ void post_write_mst_fixup(NTFS_RECORD *b)
> u16 usa_count = le16_to_cpu(b->usa_count) - 1;
>
> /* Position of usn in update sequence array. */
> - usa_pos = (le16*)b + usa_ofs/sizeof(le16);
> + usa_pos = (le16 *)b + usa_ofs/sizeof(le16);
>
> /* Position in protected data of first u16 that needs fixing up. */
> - data_pos = (le16*)b + NTFS_BLOCK_SIZE/sizeof(le16) - 1;
> + data_pos = (le16 *)b + NTFS_BLOCK_SIZE/sizeof(le16) - 1;
>
> /* Fixup all sectors. */
> while (usa_count--) {
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-07 19:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-07 11:50 [PATCH] FS: NTFS: fix whitespace and pointer issues in mst.c Stewart Malik
2010-03-07 12:16 ` Al Viro
2010-03-07 13:25 ` Alexey Dobriyan
2010-03-07 19:48 ` Anton Altaparmakov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.