Skip to content

Commit

Permalink
libnvdimm, btt: sparse fix
Browse files Browse the repository at this point in the history
Fix:
drivers/nvdimm/btt.c:635:29: warning: restricted __le64 degrades to integer

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Dan Williams committed Jul 28, 2015
1 parent cbfe8fa commit 5e32940
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/nvdimm/btt.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,9 @@ static void parse_arena_meta(struct arena_info *arena, struct btt_sb *super,
arena->logoff = arena_off + le64_to_cpu(super->logoff);
arena->info2off = arena_off + le64_to_cpu(super->info2off);

arena->size = (super->nextoff > 0) ? (le64_to_cpu(super->nextoff)) :
(arena->info2off - arena->infooff + BTT_PG_SIZE);
arena->size = (le64_to_cpu(super->nextoff) > 0)
? (le64_to_cpu(super->nextoff))
: (arena->info2off - arena->infooff + BTT_PG_SIZE);

arena->flags = le32_to_cpu(super->flags);
}
Expand Down

0 comments on commit 5e32940

Please sign in to comment.