]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hugetlbfs-add-memcg-control-files-for-hugetlbfs-use-scnprintf-instead-of-sprintf-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 3 May 2012 05:43:40 +0000 (15:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:25 +0000 (15:46 +1000)
s/scnprintf/snprintf/

Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c

index 7c34429a88af27c0fba65bbbc851d28c9062741c..11642849c8e068b6e929c38fcc9fab291d549746 100644 (file)
@@ -4041,7 +4041,7 @@ static ssize_t mem_cgroup_read(struct cgroup *cont, struct cftype *cft,
                BUG();
        }
 
-       len = scnprintf(str, sizeof(str), "%llu\n", (unsigned long long)val);
+       len = snprintf(str, sizeof(str), "%llu\n", (unsigned long long)val);
        return simple_read_from_buffer(buf, nbytes, ppos, str, len);
 }
 /*
@@ -5209,11 +5209,11 @@ static void mem_cgroup_destroy(struct cgroup *cont)
 static char *mem_fmt(char *buf, int size, unsigned long hsize)
 {
        if (hsize >= (1UL << 30))
-               scnprintf(buf, size, "%luGB", hsize >> 30);
+               snprintf(buf, size, "%luGB", hsize >> 30);
        else if (hsize >= (1UL << 20))
-               scnprintf(buf, size, "%luMB", hsize >> 20);
+               snprintf(buf, size, "%luMB", hsize >> 20);
        else
-               scnprintf(buf, size, "%luKB", hsize >> 10);
+               snprintf(buf, size, "%luKB", hsize >> 10);
        return buf;
 }