linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: android: make file_operations struct const
@ 2021-05-05 16:10 Alexander Vorwerk
  2021-05-05 16:21 ` Greg KH
  2021-05-06  5:22 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Vorwerk @ 2021-05-05 16:10 UTC (permalink / raw)
  To: gregkh
  Cc: arve, tkjos, maco, joel, christian, hridya, surenb, linux-kernel,
	linux-staging, Alexander Vorwerk

Fix the following type of checkpatch warning:
"WARNING: struct file_operations should normally be const"

Signed-off-by: Alexander Vorwerk <alec@vc-celle.de>
---
 drivers/staging/android/ashmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index 8ee4320a5dc6..8ff2794b08e3 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -377,7 +377,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;
 	struct ashmem_area *asma = file->private_data;
 	int ret = 0;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-06  5:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 16:10 [PATCH] staging: android: make file_operations struct const Alexander Vorwerk
2021-05-05 16:21 ` Greg KH
2021-05-06  5:22 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).