* [PATCH] btrfs: Fixed declaration of old_len
@ 2015-08-24 21:56 Alexandru Moise
2015-08-25 15:12 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Moise @ 2015-08-24 21:56 UTC (permalink / raw)
To: clm; +Cc: jbacik, dsterba, linux-btrfs, linux-kernel
old_len is used to store the return value of btrfs_item_size_nr().
The return value of btrfs_item_size_nr() is of type u32.
To improve code correctness and avoid mixing signed and unsigned
integers I've changed old_len to be of type u32 as well.
Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
---
fs/btrfs/root-tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c
index 360a728..024ea4f 100644
--- a/fs/btrfs/root-tree.c
+++ b/fs/btrfs/root-tree.c
@@ -141,7 +141,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
int ret;
int slot;
unsigned long ptr;
- int old_len;
+ u32 old_len;
path = btrfs_alloc_path();
if (!path)
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: Fixed declaration of old_len
2015-08-24 21:56 [PATCH] btrfs: Fixed declaration of old_len Alexandru Moise
@ 2015-08-25 15:12 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2015-08-25 15:12 UTC (permalink / raw)
To: Alexandru Moise; +Cc: clm, jbacik, linux-btrfs, linux-kernel
On Mon, Aug 24, 2015 at 09:56:28PM +0000, Alexandru Moise wrote:
> old_len is used to store the return value of btrfs_item_size_nr().
> The return value of btrfs_item_size_nr() is of type u32.
> To improve code correctness and avoid mixing signed and unsigned
> integers I've changed old_len to be of type u32 as well.
>
> Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-25 15:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-24 21:56 [PATCH] btrfs: Fixed declaration of old_len Alexandru Moise
2015-08-25 15:12 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).