Skip to contentSkip to conversation

: Remove incompatible pointer assignment warning in ext4 quota operations

PATCH In review Manish Katiyar 3 participants 7 messages Jan 28, 2009 – Feb 12, 2009 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Remove incompatible pointer assignment warning in ext4 quota operations

Below patch removes the following warning during compilation :

CC [M] fs/ext4/super.o
fs/ext4/super.c:949: warning: initialization from incompatible pointer type
LD [M] fs/ext4/ext4.o

---
 fs/ext4/ext4.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext4/ext4.h +0 -0
index 3ab1a41..0164866 100644
@@ -1088,7 +1088,7 @@ extern int ext4_chunk_trans_blocks(struct inode

*, int nrblocks);
extern int ext4_block_truncate_page(handle_t *handle,
struct address_space *mapping, loff_t from);
extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page);
-extern unsigned long long ext4_get_reserved_space(struct inode *inode); +extern qsize_t ext4_get_reserved_space(struct inode *inode);

/* ioctl.c */
extern long ext4_ioctl(struct file *, unsigned int, unsigned long);

Signature · 5 lines
1.5.4.3


Thanks -
Manish
#1 lore raw
Quoted 5 lines · Manish Katiyar

Below patch removes the following warning during compilation :

CC [M] fs/ext4/super.o
fs/ext4/super.c:949: warning: initialization from incompatible pointer type
LD [M] fs/ext4/ext4.o

Sorry,

Tha correct patch is here.

---
 fs/ext4/ext4.h  |    2 +-
 fs/ext4/inode.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
fs/ext4/ext4.h +0 -0
index 3ab1a41..0164866 100644
@@ -1088,7 +1088,7 @@ extern int ext4_chunk_trans_blocks(struct inode

*, int nrblocks);
extern int ext4_block_truncate_page(handle_t *handle,
struct address_space *mapping, loff_t from);
extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page);
-extern unsigned long long ext4_get_reserved_space(struct inode *inode); +extern qsize_t ext4_get_reserved_space(struct inode *inode);

/* ioctl.c */
extern long ext4_ioctl(struct file *, unsigned int, unsigned long);

fs/ext4/inode.c +2 -2
index 6a316ec..6be09be 100644
@@ -973,9 +973,9 @@ out:
 	return err;
 }
 
-unsigned long long ext4_get_reserved_space(struct inode *inode)
+qsize_t ext4_get_reserved_space(struct inode *inode)
 {
-	unsigned long long total;
+	qsize_t total;
 
 	spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
 	total = EXT4_I(inode)->i_reserved_data_blocks +
Signature · 4 lines
1.5.4.3

Thanks -
Manish
Quoted 28 lines
---
 fs/ext4/ext4.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext4/ext4.h +1 -1
index 3ab1a41..0164866 100644
@@ -1088,7 +1088,7 @@ extern int ext4_chunk_trans_blocks(struct inode
 *, int nrblocks);
 extern int ext4_block_truncate_page(handle_t *handle,
               struct address_space *mapping, loff_t from);
 extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page);
-extern unsigned long long ext4_get_reserved_space(struct inode *inode);
+extern qsize_t ext4_get_reserved_space(struct inode *inode);
 
 /* ioctl.c */

extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
--
1.5.4.3

Thanks -
Manish

#2 lore raw
Quoted 6 lines · Manish Katiyar
Quoted 5 lines · Manish Katiyar

Below patch removes the following warning during compilation :

CC [M] fs/ext4/super.o
fs/ext4/super.c:949: warning: initialization from incompatible pointer type
LD [M] fs/ext4/ext4.o

Hi Ted,

Any feedback on this ?

Thanks -
Manish

Quoted 76 lines

Sorry,

Tha correct patch is here.

---
 fs/ext4/ext4.h  |    2 +-
 fs/ext4/inode.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
fs/ext4/ext4.h +1 -1
index 3ab1a41..0164866 100644
@@ -1088,7 +1088,7 @@ extern int ext4_chunk_trans_blocks(struct inode
 *, int nrblocks);
 extern int ext4_block_truncate_page(handle_t *handle,
               struct address_space *mapping, loff_t from);
 extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page);
-extern unsigned long long ext4_get_reserved_space(struct inode *inode);
+extern qsize_t ext4_get_reserved_space(struct inode *inode);
 
 /* ioctl.c */

extern long ext4_ioctl(struct file *, unsigned int, unsigned long);

fs/ext4/inode.c +2 -3
index 6a316ec..6be09be 100644
@@ -973,9 +973,9 @@ out:
       return err;
 }
 
-unsigned long long ext4_get_reserved_space(struct inode *inode)
+qsize_t ext4_get_reserved_space(struct inode *inode)
 {
-       unsigned long long total;
+       qsize_t total;
 
       spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
       total = EXT4_I(inode)->i_reserved_data_blocks +
--

1.5.4.3

Thanks -
Manish

Quoted 28 lines
---
 fs/ext4/ext4.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext4/ext4.h +1 -1
index 3ab1a41..0164866 100644
@@ -1088,7 +1088,7 @@ extern int ext4_chunk_trans_blocks(struct inode
 *, int nrblocks);
 extern int ext4_block_truncate_page(handle_t *handle,
               struct address_space *mapping, loff_t from);
 extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page);
-extern unsigned long long ext4_get_reserved_space(struct inode *inode);
+extern qsize_t ext4_get_reserved_space(struct inode *inode);
 
 /* ioctl.c */

extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
--
1.5.4.3

Thanks -
Manish

reviewer Acked-by
#3 lore raw
In reply to Manish Katiyar
Quoted 7 lines · Manish Katiyar
Quoted 5 lines

Below patch removes the following warning during compilation :

CC [M] fs/ext4/super.o
fs/ext4/super.c:949: warning: initialization from incompatible pointer type
LD [M] fs/ext4/ext4.o

Quoted 5 lines

Sorry,

Tha correct patch is here.

Looks fine to me.

Honza

Quoted 73 lines
---
 fs/ext4/ext4.h  |    2 +-
 fs/ext4/inode.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
fs/ext4/ext4.h +1 -1
index 3ab1a41..0164866 100644
@@ -1088,7 +1088,7 @@ extern int ext4_chunk_trans_blocks(struct inode
 *, int nrblocks);
 extern int ext4_block_truncate_page(handle_t *handle,
 		struct address_space *mapping, loff_t from);
 extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page);
-extern unsigned long long ext4_get_reserved_space(struct inode *inode);
+extern qsize_t ext4_get_reserved_space(struct inode *inode);
 
 /* ioctl.c */

extern long ext4_ioctl(struct file *, unsigned int, unsigned long);

fs/ext4/inode.c +2 -2
index 6a316ec..6be09be 100644
@@ -973,9 +973,9 @@ out:
 	return err;
 }
 
-unsigned long long ext4_get_reserved_space(struct inode *inode)
+qsize_t ext4_get_reserved_space(struct inode *inode)
 {
-	unsigned long long total;
+	qsize_t total;
 
 	spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
 	total = EXT4_I(inode)->i_reserved_data_blocks +
Signature · 4 lines
1.5.4.3

Thanks -
Manish
Quoted 25 lines
---
 fs/ext4/ext4.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext4/ext4.h +1 -1
index 3ab1a41..0164866 100644
@@ -1088,7 +1088,7 @@ extern int ext4_chunk_trans_blocks(struct inode
 *, int nrblocks);
 extern int ext4_block_truncate_page(handle_t *handle,
               struct address_space *mapping, loff_t from);
 extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page);
-extern unsigned long long ext4_get_reserved_space(struct inode *inode);
+extern qsize_t ext4_get_reserved_space(struct inode *inode);
 
 /* ioctl.c */

extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
--
1.5.4.3

Quoted 3 lines

Thanks -
Manish

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
Jan Kara <[email protected]>
SuSE CR Labs
#4 lore raw
Quoted 7 lines · Jan Kara
Quoted 7 lines · Manish Katiyar
Quoted 5 lines

Below patch removes the following warning during compilation :

CC [M] fs/ext4/super.o
fs/ext4/super.c:949: warning: initialization from incompatible pointer type
LD [M] fs/ext4/ext4.o

Quoted 7 lines
Quoted 5 lines

Sorry,

Tha correct patch is here.

Looks fine to me.

Hi Jan,

A simple doubt. Patches acked by you will be automatically picked up or will I have to resend it with your ack added ??

Thanks -
Manish

Quoted 80 lines

Honza

Quoted 66 lines
---
 fs/ext4/ext4.h  |    2 +-
 fs/ext4/inode.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
fs/ext4/ext4.h +1 -1
index 3ab1a41..0164866 100644
@@ -1088,7 +1088,7 @@ extern int ext4_chunk_trans_blocks(struct inode
 *, int nrblocks);
 extern int ext4_block_truncate_page(handle_t *handle,
              struct address_space *mapping, loff_t from);
 extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page);
-extern unsigned long long ext4_get_reserved_space(struct inode *inode);
+extern qsize_t ext4_get_reserved_space(struct inode *inode);
 
 /* ioctl.c */

extern long ext4_ioctl(struct file *, unsigned int, unsigned long);

fs/ext4/inode.c +2 -3
index 6a316ec..6be09be 100644
@@ -973,9 +973,9 @@ out:
      return err;
 }
 
-unsigned long long ext4_get_reserved_space(struct inode *inode)
+qsize_t ext4_get_reserved_space(struct inode *inode)
 {
-     unsigned long long total;
+     qsize_t total;
 
      spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
      total = EXT4_I(inode)->i_reserved_data_blocks +
--

1.5.4.3

Thanks -
Manish

Quoted 25 lines
---
 fs/ext4/ext4.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext4/ext4.h +1 -1
index 3ab1a41..0164866 100644
@@ -1088,7 +1088,7 @@ extern int ext4_chunk_trans_blocks(struct inode
 *, int nrblocks);
 extern int ext4_block_truncate_page(handle_t *handle,
               struct address_space *mapping, loff_t from);
 extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page);
-extern unsigned long long ext4_get_reserved_space(struct inode *inode);
+extern qsize_t ext4_get_reserved_space(struct inode *inode);
 
 /* ioctl.c */

extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
--
1.5.4.3

Quoted 7 lines
Quoted 3 lines

Thanks -
Manish

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Jan Kara <[email protected]>
SuSE CR Labs

reviewer
#5 lore raw
Quoted 12 lines · Manish Katiyar
Quoted 11 lines · Jan Kara
Quoted 11 lines · Manish Katiyar
Quoted 5 lines

Below patch removes the following warning during compilation :

CC [M] fs/ext4/super.o
fs/ext4/super.c:949: warning: initialization from incompatible pointer type
LD [M] fs/ext4/ext4.o

Sorry,

Tha correct patch is here.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Looks fine to me.

Hi Jan,

A simple doubt. Patches acked by you will be automatically picked up or will I have to resend it with your ack added ??

Ah, I realized that probably I should merge this patch since I carry the
ext4 quota reservation patch... Thanks for the reminder. But when I tried to merge your patch I've found that the warning is already fixed in my tree by some other patch. I'm sorry. Thanks for your work.

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
maintainer
#6 lore raw
In reply to Manish Katiyar
Quoted 12 lines · Manish Katiyar
Quoted 11 lines · Jan Kara
Quoted 11 lines · Manish Katiyar
Quoted 5 lines

Below patch removes the following warning during compilation :

CC [M] fs/ext4/super.o
fs/ext4/super.c:949: warning: initialization from incompatible pointer type
LD [M] fs/ext4/ext4.o

Sorry,

Tha correct patch is here.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Looks fine to me.

Hi Jan,

A simple doubt. Patches acked by you will be automatically picked up or will I have to resend it with your ack added ??

Actually, in this case Jan should pick up the patch and merge it with Mingming's ext4 quota patch which is being carried in his tree. The current ext4 code doesn't have ext4_get_reserved_space() at all.

- Ted