From: Oleg Drokin Date: Thu, 25 Aug 2016 17:50:59 +0000 (-0400) Subject: staging/lustre: Fix max_dirty_mb output in sysfs X-Git-Tag: v4.9-rc1~119^2~873 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=44fae22b36e218ed30d3f4debba9b0c1d3d6fdf1;p=karo-tx-linux.git staging/lustre: Fix max_dirty_mb output in sysfs %ul definitely was supposed to be %lu in the format string, so we print long unsigned int value, not just unsigned int with a letter l added at the end. Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c index 8f70dd2686f9..bcf005dee36e 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c @@ -95,8 +95,9 @@ LUSTRE_STATIC_UINT_ATTR(timeout, &obd_timeout); static ssize_t max_dirty_mb_show(struct kobject *kobj, struct attribute *attr, char *buf) { - return sprintf(buf, "%ul\n", - obd_max_dirty_pages / (1 << (20 - PAGE_SHIFT))); + return sprintf(buf, "%lu\n", + (unsigned long)obd_max_dirty_pages / + (1 << (20 - PAGE_SHIFT))); } static ssize_t max_dirty_mb_store(struct kobject *kobj, struct attribute *attr,