Re: [PATCH 11/13] Always define MAX_RAW_MINORS as 2**20 in userspace
Hi Palmer, [auto build test ERROR on v4.3-rc7] [also ERROR on: next-20151103] url: https://github.com/0day-ci/linux/commits/Palmer-Dabbelt/Remove-ifdef-CONFIG_64BIT-from-all-asm-generic-fcntl-h/20151104-035501 base: https://github.com/0day-ci/linux Palmer-Dabbelt/Remove-ifdef-CONFIG_64BIT-from-all-asm-generic-fcntl-h/20151104-035501 config: x86_64-randconfig-x014-11022153 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> drivers/char/raw.c:39:29: error: 'CONFIG_MAX_RAW_MINORS' undeclared here >> (not in a function) static int max_raw_minors = CONFIG_MAX_RAW_MINORS; ^ vim +/CONFIG_MAX_RAW_MINORS +39 drivers/char/raw.c 33 34 static struct class *raw_class; 35 static struct raw_device_data *raw_devices; 36 static DEFINE_MUTEX(raw_mutex); 37 static const struct file_operations raw_ctl_fops; /* forward declaration */ 38 > 39 static int max_raw_minors = CONFIG_MAX_RAW_MINORS; 40 41 module_param(max_raw_minors, int, 0); 42 MODULE_PARM_DESC(max_raw_minors, "Maximum number of raw devices (1-65536)"); --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
[PATCH 11/13] Always define MAX_RAW_MINORS as 2**20 in userspace
While I don't think this was ever meant to be exposed to userspace, if anyone is using it then this will at least provide a correct (if unlikely) definition. MAX_RAW_MINORS used to be used in the kernel, where it's been replaced with CONFIG_MAX_RAW_MINORS. Note that there's a checkpatch.pl warning about a split config string here, but I've left that alone. Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou --- drivers/char/raw.c | 7 --- include/uapi/linux/raw.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/char/raw.c b/drivers/char/raw.c index 60316fb..362d7a6 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c @@ -36,7 +36,7 @@ static struct raw_device_data *raw_devices; static DEFINE_MUTEX(raw_mutex); static const struct file_operations raw_ctl_fops; /* forward declaration */ -static int max_raw_minors = MAX_RAW_MINORS; +static int max_raw_minors = CONFIG_MAX_RAW_MINORS; module_param(max_raw_minors, int, 0); MODULE_PARM_DESC(max_raw_minors, "Maximum number of raw devices (1-65536)"); @@ -317,8 +317,9 @@ static int __init raw_init(void) if (max_raw_minors < 1 || max_raw_minors > 65536) { printk(KERN_WARNING "raw: invalid max_raw_minors (must be" - " between 1 and 65536), using %d\n", MAX_RAW_MINORS); - max_raw_minors = MAX_RAW_MINORS; + " between 1 and 65536), using %d\n", + CONFIG_MAX_RAW_MINORS); + max_raw_minors = CONFIG_MAX_RAW_MINORS; } raw_devices = vzalloc(sizeof(struct raw_device_data) * max_raw_minors); diff --git a/include/uapi/linux/raw.h b/include/uapi/linux/raw.h index 62d543e..f3d009b 100644 --- a/include/uapi/linux/raw.h +++ b/include/uapi/linux/raw.h @@ -13,6 +13,6 @@ struct raw_config_request __u64 block_minor; }; -#define MAX_RAW_MINORS CONFIG_MAX_RAW_DEVS +#define MAX_RAW_MINORS (1 << 20) #endif /* __LINUX_RAW_H */ -- 2.4.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 11/13] Always define MAX_RAW_MINORS as 2**20 in userspace
Hi Palmer, [auto build test ERROR on v4.3-rc7] [also ERROR on: next-20151103] url: https://github.com/0day-ci/linux/commits/Palmer-Dabbelt/Remove-ifdef-CONFIG_64BIT-from-all-asm-generic-fcntl-h/20151104-035501 base: https://github.com/0day-ci/linux Palmer-Dabbelt/Remove-ifdef-CONFIG_64BIT-from-all-asm-generic-fcntl-h/20151104-035501 config: x86_64-randconfig-x014-11022153 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> drivers/char/raw.c:39:29: error: 'CONFIG_MAX_RAW_MINORS' undeclared here >> (not in a function) static int max_raw_minors = CONFIG_MAX_RAW_MINORS; ^ vim +/CONFIG_MAX_RAW_MINORS +39 drivers/char/raw.c 33 34 static struct class *raw_class; 35 static struct raw_device_data *raw_devices; 36 static DEFINE_MUTEX(raw_mutex); 37 static const struct file_operations raw_ctl_fops; /* forward declaration */ 38 > 39 static int max_raw_minors = CONFIG_MAX_RAW_MINORS; 40 41 module_param(max_raw_minors, int, 0); 42 MODULE_PARM_DESC(max_raw_minors, "Maximum number of raw devices (1-65536)"); --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
[PATCH 11/13] Always define MAX_RAW_MINORS as 2**20 in userspace
While I don't think this was ever meant to be exposed to userspace, if anyone is using it then this will at least provide a correct (if unlikely) definition. MAX_RAW_MINORS used to be used in the kernel, where it's been replaced with CONFIG_MAX_RAW_MINORS. Note that there's a checkpatch.pl warning about a split config string here, but I've left that alone. Signed-off-by: Palmer DabbeltReviewed-by: Andrew Waterman Reviewed-by: Albert Ou --- drivers/char/raw.c | 7 --- include/uapi/linux/raw.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/char/raw.c b/drivers/char/raw.c index 60316fb..362d7a6 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c @@ -36,7 +36,7 @@ static struct raw_device_data *raw_devices; static DEFINE_MUTEX(raw_mutex); static const struct file_operations raw_ctl_fops; /* forward declaration */ -static int max_raw_minors = MAX_RAW_MINORS; +static int max_raw_minors = CONFIG_MAX_RAW_MINORS; module_param(max_raw_minors, int, 0); MODULE_PARM_DESC(max_raw_minors, "Maximum number of raw devices (1-65536)"); @@ -317,8 +317,9 @@ static int __init raw_init(void) if (max_raw_minors < 1 || max_raw_minors > 65536) { printk(KERN_WARNING "raw: invalid max_raw_minors (must be" - " between 1 and 65536), using %d\n", MAX_RAW_MINORS); - max_raw_minors = MAX_RAW_MINORS; + " between 1 and 65536), using %d\n", + CONFIG_MAX_RAW_MINORS); + max_raw_minors = CONFIG_MAX_RAW_MINORS; } raw_devices = vzalloc(sizeof(struct raw_device_data) * max_raw_minors); diff --git a/include/uapi/linux/raw.h b/include/uapi/linux/raw.h index 62d543e..f3d009b 100644 --- a/include/uapi/linux/raw.h +++ b/include/uapi/linux/raw.h @@ -13,6 +13,6 @@ struct raw_config_request __u64 block_minor; }; -#define MAX_RAW_MINORS CONFIG_MAX_RAW_DEVS +#define MAX_RAW_MINORS (1 << 20) #endif /* __LINUX_RAW_H */ -- 2.4.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/