[PATCH] staging: android: ashmem: used const keyword
Joe Perches
joe at perches.com
Tue Jul 28 18:04:20 UTC 2020
On Tue, 2020-07-28 at 23:29 +0530, Dhiraj Sharma wrote:
> I ran checkpatch.pl script which reported a warning to use const keyword
> on line 370.Therefore I made this change.
checkpatch is a brainless script.
Not everything it suggests is appropriate.
> diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
[]
> @@ -367,7 +367,7 @@ ashmem_vmfile_get_unmapped_area(struct file *file, unsigned long addr,
>
> static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
> {
> - static struct file_operations vmfile_fops;
> + static const struct file_operations vmfile_fops;
This can't work.
Please make sure to compile your proposed changes
_before_ you post them.
More information about the devel
mailing list