diff mbox

[Raring] dm-raid45: Fix incompatible ptr assignments

Message ID 1364378368-6988-1-git-send-email-stefan.bader@canonical.com
State New
Headers show

Commit Message

Stefan Bader March 27, 2013, 9:59 a.m. UTC
Seem luckily the return type of the status function did not matter
when being used. Same goes for the additional argument to the map
function which was not used by the function.

-Stefan

--

From 3ad60179d7960c66c38bda4539c76b460b271b61 Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader@canonical.com>
Date: Wed, 27 Mar 2013 10:19:32 +0100
Subject: [PATCH] UBUNTU: SAUCE: dm-raid45: Fix incompatible ptr assignments

Fixing two incorrect assignments reported by Intel kbuild test.

dm-raid4-5.c:4501:2: warning: initialization from incompatible
                     pointer type [enabled by default]
                     (near initialization for 'raid_target.map')
dm-raid4-5.c:4505:2: warning: initialization from incompatible
                     pointer type
                     (near initialization for 'raid_target.status')

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 ubuntu/dm-raid4-5/dm-raid4-5.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Tim Gardner March 27, 2013, 12:22 p.m. UTC | #1

diff mbox

Patch

diff --git a/ubuntu/dm-raid4-5/dm-raid4-5.c b/ubuntu/dm-raid4-5/dm-raid4-5.c
index 9f55f58..e87eac4 100644
--- a/ubuntu/dm-raid4-5/dm-raid4-5.c
+++ b/ubuntu/dm-raid4-5/dm-raid4-5.c
@@ -4101,8 +4101,7 @@  static void raid_dtr(struct dm_target *ti)
 }
 
 /* Raid mapping function. */
-static int raid_map(struct dm_target *ti, struct bio *bio,
-		    union map_info *map_context)
+static int raid_map(struct dm_target *ti, struct bio *bio)
 {
 	/* I don't want to waste stripe cache capacity. */
 	if (bio_rw(bio) == READA)
@@ -4245,7 +4244,7 @@  static void raid_devel_stats(struct dm_target *ti, char *result,
 	*size = sz;
 }
 
-static int raid_status(struct dm_target *ti, status_type_t type,
+static void raid_status(struct dm_target *ti, status_type_t type,
 		       unsigned status_flags, char *result, unsigned maxlen)
 {
 	unsigned p, sz = 0;
@@ -4306,8 +4305,6 @@  static int raid_status(struct dm_target *ti, status_type_t type,
 			       format_dev_t(buf, rs->dev[p].dev->bdev->bd_dev),
 			       (unsigned long long) rs->dev[p].start);
 	}
-
-	return 0;
 }
 
 /*