From: Loïc Pellegrino Date: Thu, 4 Sep 2014 18:28:50 +0000 (+0100) Subject: staging/lustre: Different prototypes between the declaration and the definition X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8fa74ef2fc0b79c6ff15e6add51069b4ea14b1a9;p=linux-beck.git staging/lustre: Different prototypes between the declaration and the definition Align the prototype of lprocfs_wr_uint() in the declaration with the one used in the definition. The prototype is: int lprocfs_wr_uint(struct file *file, const char __user *buffer, unsigned long count, void *data) In obdclass/lprocfs_status.c But in lustre/include/lprocfs_status.h, the __user annotation is missing for the attribute buffer. The correct prototype is the first one (the definition) since: - This function is eventually called by the write() function pointer of an instance of struct file_operations - In this function, buffer is a parameter of copy_from_user() - Before the commit 73bb1da692d0dc3e93b9c9e29084d6a5dcbc37a6, the declaration and the definition had the same prototype, but only the .c has been updated. Correcting this will remove a sparse error and add sparse warnings. This is a task of the Eudyptula challenge. Signed-off-by: Loïc Pellegrino Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h b/drivers/staging/lustre/lustre/include/lprocfs_status.h index 05b52852e70e..ccb6cd42a67d 100644 --- a/drivers/staging/lustre/lustre/include/lprocfs_status.h +++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h @@ -611,7 +611,7 @@ extern int lprocfs_rd_atomic(struct seq_file *m, void *data); extern int lprocfs_wr_atomic(struct file *file, const char __user *buffer, unsigned long count, void *data); extern int lprocfs_rd_uint(struct seq_file *m, void *data); -extern int lprocfs_wr_uint(struct file *file, const char *buffer, +extern int lprocfs_wr_uint(struct file *file, const char __user *buffer, unsigned long count, void *data); extern int lprocfs_rd_uuid(struct seq_file *m, void *data); extern int lprocfs_rd_name(struct seq_file *m, void *data);