All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Btrfs: fix gcc warnings by adding third argument
@ 2013-03-25 13:02 ` Emil Goode
  0 siblings, 0 replies; 2+ messages in thread
From: Emil Goode @ 2013-03-25 12:59 UTC (permalink / raw)
  To: chris.mason; +Cc: linux-btrfs, linux-kernel, kernel-janitors, Emil Goode

The function pointer bi_end_io expects three arguments of the
function it points to. This patch adds a struct batch_complete
pointer as a third argument to the raid_write_end_io,
raid_rmw_end_io and raid_recover_end_io functions.

GCC is warning about this:
fs/btrfs/raid56.c: In function ‘finish_rmw’:
fs/btrfs/raid56.c:1258:18: warning:
	assignment from incompatible pointer type [enabled by default]
fs/btrfs/raid56.c: In function ‘raid56_rmw_stripe’:
fs/btrfs/raid56.c:1514:18: warning:
	assignment from incompatible pointer type [enabled by default]
fs/btrfs/raid56.c: In function ‘__raid56_parity_recover’:
fs/btrfs/raid56.c:2013:18: warning:
	assignment from incompatible pointer type [enabled by default]

Signed-off-by: Emil Goode <emilgoode@gmail.com>
---
 fs/btrfs/raid56.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 9a79fb7..6df1ac8 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -850,7 +850,8 @@ static void rbio_orig_end_io(struct btrfs_raid_bio *rbio, int err, int uptodate)
  * end io function used by finish_rmw.  When we finally
  * get here, we've written a full stripe
  */
-static void raid_write_end_io(struct bio *bio, int err)
+static void raid_write_end_io(struct bio *bio, int err,
+			      struct batch_complete *batch)
 {
 	struct btrfs_raid_bio *rbio = bio->bi_private;
 
@@ -1384,7 +1385,8 @@ static void set_bio_pages_uptodate(struct bio *bio)
  * This will usually kick off finish_rmw once all the bios are read in, but it
  * may trigger parity reconstruction if we had any errors along the way
  */
-static void raid_rmw_end_io(struct bio *bio, int err)
+static void raid_rmw_end_io(struct bio *bio, int err,
+			    struct batch_complete *batch)
 {
 	struct btrfs_raid_bio *rbio = bio->bi_private;
 
@@ -1905,7 +1907,8 @@ cleanup_io:
  * This is called only for stripes we've read from disk to
  * reconstruct the parity.
  */
-static void raid_recover_end_io(struct bio *bio, int err)
+static void raid_recover_end_io(struct bio *bio, int err,
+				struct batch_complete *batch)
 {
 	struct btrfs_raid_bio *rbio = bio->bi_private;
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] Btrfs: fix gcc warnings by adding third argument
@ 2013-03-25 13:02 ` Emil Goode
  0 siblings, 0 replies; 2+ messages in thread
From: Emil Goode @ 2013-03-25 13:02 UTC (permalink / raw)
  To: chris.mason; +Cc: linux-btrfs, linux-kernel, kernel-janitors, Emil Goode

The function pointer bi_end_io expects three arguments of the
function it points to. This patch adds a struct batch_complete
pointer as a third argument to the raid_write_end_io,
raid_rmw_end_io and raid_recover_end_io functions.

GCC is warning about this:
fs/btrfs/raid56.c: In function ‘finish_rmw’:
fs/btrfs/raid56.c:1258:18: warning:
	assignment from incompatible pointer type [enabled by default]
fs/btrfs/raid56.c: In function ‘raid56_rmw_stripe’:
fs/btrfs/raid56.c:1514:18: warning:
	assignment from incompatible pointer type [enabled by default]
fs/btrfs/raid56.c: In function ‘__raid56_parity_recover’:
fs/btrfs/raid56.c:2013:18: warning:
	assignment from incompatible pointer type [enabled by default]

Signed-off-by: Emil Goode <emilgoode@gmail.com>
---
 fs/btrfs/raid56.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 9a79fb7..6df1ac8 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -850,7 +850,8 @@ static void rbio_orig_end_io(struct btrfs_raid_bio *rbio, int err, int uptodate)
  * end io function used by finish_rmw.  When we finally
  * get here, we've written a full stripe
  */
-static void raid_write_end_io(struct bio *bio, int err)
+static void raid_write_end_io(struct bio *bio, int err,
+			      struct batch_complete *batch)
 {
 	struct btrfs_raid_bio *rbio = bio->bi_private;
 
@@ -1384,7 +1385,8 @@ static void set_bio_pages_uptodate(struct bio *bio)
  * This will usually kick off finish_rmw once all the bios are read in, but it
  * may trigger parity reconstruction if we had any errors along the way
  */
-static void raid_rmw_end_io(struct bio *bio, int err)
+static void raid_rmw_end_io(struct bio *bio, int err,
+			    struct batch_complete *batch)
 {
 	struct btrfs_raid_bio *rbio = bio->bi_private;
 
@@ -1905,7 +1907,8 @@ cleanup_io:
  * This is called only for stripes we've read from disk to
  * reconstruct the parity.
  */
-static void raid_recover_end_io(struct bio *bio, int err)
+static void raid_recover_end_io(struct bio *bio, int err,
+				struct batch_complete *batch)
 {
 	struct btrfs_raid_bio *rbio = bio->bi_private;
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-25 12:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-25 12:59 [PATCH] Btrfs: fix gcc warnings by adding third argument Emil Goode
2013-03-25 13:02 ` Emil Goode

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.