]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/lightnvm/pblk-sysfs.c
lightnvm: pblk: add SPDX license tag
[linux.git] / drivers / lightnvm / pblk-sysfs.c
index 9fc3dfa168b4bb40f3b43043c02200c4aa6a1b9d..cba83ac43e62de5555b551589f9f468b8121c1c8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2016 CNEX Labs
  * Initial release: Javier Gonzalez <javier@cnexlabs.com>
@@ -337,7 +338,6 @@ static ssize_t pblk_get_write_amp(u64 user, u64 gc, u64 pad,
 {
        int sz;
 
-
        sz = snprintf(page, PAGE_SIZE,
                        "user:%lld gc:%lld pad:%lld WA:",
                        user, gc, pad);
@@ -349,7 +349,7 @@ static ssize_t pblk_get_write_amp(u64 user, u64 gc, u64 pad,
                u32 wa_frac;
 
                wa_int = (user + gc + pad) * 100000;
-               wa_int = div_u64(wa_int, user);
+               wa_int = div64_u64(wa_int, user);
                wa_int = div_u64_rem(wa_int, 100000, &wa_frac);
 
                sz += snprintf(page + sz, PAGE_SIZE - sz, "%llu.%05u\n",