Re: [PATCH] omfs: convert to use beXX_add_cpu()

2012-09-28 Thread Bob Copeland
On Fri, Sep 28, 2012 at 12:51:01PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun 
> 
> Convert cpu_to_beXX(beXX_to_cpu(E1) + E2) to use beXX_add_cpu().
> 
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)
> 
> Signed-off-by: Wei Yongjun 

Thanks,

Acked-by: Bob Copeland 

-- 
Bob Copeland %% www.bobcopeland.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] omfs: convert to use beXX_add_cpu()

2012-09-28 Thread Bob Copeland
On Fri, Sep 28, 2012 at 12:51:01PM +0800, Wei Yongjun wrote:
 From: Wei Yongjun yongjun_...@trendmicro.com.cn
 
 Convert cpu_to_beXX(beXX_to_cpu(E1) + E2) to use beXX_add_cpu().
 
 dpatch engine is used to auto generate this patch.
 (https://github.com/weiyj/dpatch)
 
 Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn

Thanks,

Acked-by: Bob Copeland m...@bobcopeland.com

-- 
Bob Copeland %% www.bobcopeland.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] omfs: convert to use beXX_add_cpu()

2012-09-27 Thread Wei Yongjun
From: Wei Yongjun 

Convert cpu_to_beXX(beXX_to_cpu(E1) + E2) to use beXX_add_cpu().

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun 
---
 fs/omfs/file.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/omfs/file.c b/fs/omfs/file.c
index 2c6d952..77e3cb2 100644
--- a/fs/omfs/file.c
+++ b/fs/omfs/file.c
@@ -146,8 +146,7 @@ static int omfs_grow_extent(struct inode *inode, struct 
omfs_extent *oe,
be64_to_cpu(entry->e_blocks);
 
if (omfs_allocate_block(inode->i_sb, new_block)) {
-   entry->e_blocks =
-   cpu_to_be64(be64_to_cpu(entry->e_blocks) + 1);
+   be64_add_cpu(>e_blocks, 1);
terminator->e_blocks = ~(cpu_to_be64(
be64_to_cpu(~terminator->e_blocks) + 1));
goto out;
@@ -177,7 +176,7 @@ static int omfs_grow_extent(struct inode *inode, struct 
omfs_extent *oe,
be64_to_cpu(~terminator->e_blocks) + (u64) new_count));
 
/* write in new entry */
-   oe->e_extent_count = cpu_to_be32(1 + be32_to_cpu(oe->e_extent_count));
+   be32_add_cpu(>e_extent_count, 1);
 
 out:
*ret_block = new_block;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] omfs: convert to use beXX_add_cpu()

2012-09-27 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn

Convert cpu_to_beXX(beXX_to_cpu(E1) + E2) to use beXX_add_cpu().

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn
---
 fs/omfs/file.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/omfs/file.c b/fs/omfs/file.c
index 2c6d952..77e3cb2 100644
--- a/fs/omfs/file.c
+++ b/fs/omfs/file.c
@@ -146,8 +146,7 @@ static int omfs_grow_extent(struct inode *inode, struct 
omfs_extent *oe,
be64_to_cpu(entry-e_blocks);
 
if (omfs_allocate_block(inode-i_sb, new_block)) {
-   entry-e_blocks =
-   cpu_to_be64(be64_to_cpu(entry-e_blocks) + 1);
+   be64_add_cpu(entry-e_blocks, 1);
terminator-e_blocks = ~(cpu_to_be64(
be64_to_cpu(~terminator-e_blocks) + 1));
goto out;
@@ -177,7 +176,7 @@ static int omfs_grow_extent(struct inode *inode, struct 
omfs_extent *oe,
be64_to_cpu(~terminator-e_blocks) + (u64) new_count));
 
/* write in new entry */
-   oe-e_extent_count = cpu_to_be32(1 + be32_to_cpu(oe-e_extent_count));
+   be32_add_cpu(oe-e_extent_count, 1);
 
 out:
*ret_block = new_block;


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/