Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a93c50f authored by Susheel Khiani's avatar Susheel Khiani
Browse files

zram: Fix compilation warning due to print format mismatch



For 64 bit architecture atomic64_t is defined as
long while for 32 bit architecture atomic64_t is
defined as u64. This results in print format
mismatch when we try to print value using
atomic64_read. Fix this compile time warning by
putting required type casting.

Change-Id: I64aaf3936c71755ddbbfacb2bc997f4efba6d3c8
Signed-off-by: default avatarSusheel Khiani <skhiani@codeaurora.org>
parent 63ab3df5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -68,11 +68,13 @@ static int zram_show_mem_notifier(struct notifier_block *nb,

		if (zram->init_done) {
			u64 val;
			u64 data_size;

			val = zs_get_total_size_bytes(meta->mem_pool);
			data_size = atomic64_read(&zram->stats.compr_size);
			pr_info("Zram[%d] mem_used_total = %llu\n", i, val);
			pr_info("Zram[%d] compr_data_size = %llu\n", i,
				atomic64_read(&zram->stats.compr_size));
				(unsigned long long)data_size);
			pr_info("Zram[%d] orig_data_size = %u\n", i,
				zram->stats.pages_stored);
		}