summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadhri Jagan Sridharan <Badhri@google.com>2016-03-28 14:41:21 -0700
committerBadhri Jagan Sridharan <Badhri@google.com>2016-08-10 13:25:06 -0700
commit438e162621ac7e80ec9c81bea3f0eaec0b801ff9 (patch)
treeb6c69fe8f488286dedba0b2e0d0298aede9364e0
parent67ce481897e0656404fe0af42d563101a5629bbe (diff)
ANDROID: dm: Minor cleanup
Compacts the linear device arguments removing the unnecessary variables. Bug: 27175947 Change-Id: I157170eebe3c0f89a68ae05870a1060f188d0da0 Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
-rw-r--r--drivers/md/dm-android-verity.c7
-rw-r--r--drivers/md/dm-android-verity.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/md/dm-android-verity.c b/drivers/md/dm-android-verity.c
index db4ddf789a39..f6ddbee5e2d3 100644
--- a/drivers/md/dm-android-verity.c
+++ b/drivers/md/dm-android-verity.c
@@ -572,13 +572,10 @@ static inline bool test_mult_overflow(sector_t a, u32 b)
static int add_as_linear_device(struct dm_target *ti, char *dev)
{
/*Move to linear mapping defines*/
- char *linear_table_args[DM_LINEAR_ARGS];
- char offset[] = "0";
+ char *linear_table_args[DM_LINEAR_ARGS] = {dev,
+ DM_LINEAR_TARGET_OFFSET};
int err = 0;
- linear_table_args[0] = dev;
- linear_table_args[1] = offset;
-
android_verity_target.dtr = linear_target.dtr,
android_verity_target.map = linear_target.map,
android_verity_target.status = linear_target.status,
diff --git a/drivers/md/dm-android-verity.h b/drivers/md/dm-android-verity.h
index 2cf7de1b7910..fe53863c664b 100644
--- a/drivers/md/dm-android-verity.h
+++ b/drivers/md/dm-android-verity.h
@@ -46,6 +46,8 @@
#define DM_MSG_PREFIX "android-verity"
#define DM_LINEAR_ARGS 2
+#define DM_LINEAR_TARGET_OFFSET "0"
+
/*
* There can be two formats.
* if fec is present