From cac086b68bc1331a786a6619b3920fb85e390a06 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 26 Mar 2015 04:11:21 +0000 Subject: [PATCH] scst: Kernel 4.0 build fix Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6157 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_sysfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index 218d40ec9..7ac882963 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -1884,9 +1884,12 @@ static ssize_t __scst_acg_cpu_mask_show(struct scst_acg *acg, char *buf) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) res = cpumask_scnprintf(buf, SCST_SYSFS_BLOCK_SIZE, acg->acg_cpu_mask); -#else +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) res = cpumask_scnprintf(buf, SCST_SYSFS_BLOCK_SIZE, &acg->acg_cpu_mask); +#else + res = scnprintf(buf, SCST_SYSFS_BLOCK_SIZE, "%*pb", + cpumask_pr_args(&acg->acg_cpu_mask)); #endif if (!cpumask_equal(&acg->acg_cpu_mask, &default_cpu_mask)) res += sprintf(&buf[res], "\n%s\n", SCST_SYSFS_KEY_MARK);