[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0e9fee846ac0fb28df4098e6d577e9090be38ed9.camel@perches.com>
Date: Tue, 28 Jul 2020 11:04:20 -0700
From: Joe Perches <joe@...ches.com>
To: Dhiraj Sharma <dhiraj.sharma0024@...il.com>,
gregkh@...uxfoundation.org, arve@...roid.com, tkjos@...roid.com,
maco@...roid.com, joel@...lfernandes.org, christian@...uner.io,
hridya@...gle.com, surenb@...gle.com
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: android: ashmem: used const keyword
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.
Powered by blists - more mailing lists