staging: lustre: fix sparse warning about different address spaces
PATCH 1/1 staging: lustre: fix sparse warning about different address spaces
fixed the following sparse warning by adding proper cast:
drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74: warning: incorrect type in argument 2 (different address spaces)
drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74: expected char const [noderef] <asn:1>*<noident>
drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74: got char *[assigned] sval
--- drivers/staging/lustre/lustre/obdclass/obd_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdclass/obd_config.c +2 -1
@@ -1052,7 +1052,8 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, oldfs =get_fs ();set_fs (KERNEL_DS ); - rc = var->fops->write (&fakefile, sval, + rc = var->fops->write (&fakefile, + (const char __user *)sval, vallen,NULL );set_fs (oldfs); }
Signature · 1 line
2.1.4
Quoted 6 lines · Mario Bambagini
fixed the following sparse warning by adding proper cast:
drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74: warning: incorrect type in argument 2 (different address spaces)
drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74: expected char const [noderef] <asn:1>*<noident>
drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74: got char *[assigned] svalSigned-off-by Mario Bambagini <[email protected]>
The patch is fine, but just be advised this whole function is going away real soon now per Al Viro request (and also because it no longer does what it should).
Quoted 25 lines
---
drivers/staging/lustre/lustre/obdclass/obd_config.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)drivers/staging/lustre/lustre/obdclass/obd_config.c +2
-1@@ -1052,7 +1052,8 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, oldfs =get_fs ();set_fs (KERNEL_DS ); - rc = var->fops->write (&fakefile, sval, + rc = var->fops->write (&fakefile, + (const char __user *)sval, vallen,NULL );set_fs (oldfs); }Signature · 6 lines
2.1.4 _______________________________________________ lustre-devel mailing list lustre-devel at lists.lustre.org http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org