Skip to content

Commit

Permalink
ANDROID: dm: Minor cleanup
Browse files Browse the repository at this point in the history
Compacts the linear device arguments removing the
unnecessary variables.

Bug: 27175947
Change-Id: I157170eebe3c0f89a68ae05870a1060f188d0da0
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
  • Loading branch information
Badhri Jagan Sridharan authored and Dmitry Shmidt committed Jan 27, 2017
1 parent d0706bc commit 7e70218
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/md/dm-android-verity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions drivers/md/dm-android-verity.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e70218

Please sign in to comment.