public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: lustre: lustre: mdc: lproc_mdc.c: declared file_operations struct as const
@ 2015-09-16 12:31 Sakshi Vaid
  2015-09-17  4:25 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Sakshi Vaid @ 2015-09-16 12:31 UTC (permalink / raw)
  To: oleg.drokin; +Cc: andreas.dilger, gregkh, devel, linux-kernel, Sakshi Vaid

Declared the file_operations structure as const as done elsewhere in the
kernel, as there are no modifiactions to this field.

Following warning found by checkpatch
WARNING: struct file_operations should normally be const

Signed-off-by: Sakshi Vaid <sakshivaid95@gmail.com>
---
 drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
index c791941..c62c0ac 100644
--- a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
+++ b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
@@ -146,7 +146,7 @@ static ssize_t mdc_kuc_write(struct file *file,
 	return count;
 }
 
-struct file_operations mdc_kuc_fops = {
+const struct file_operations mdc_kuc_fops = {
 	.open		= mdc_kuc_open,
 	.write		= mdc_kuc_write,
 	.release	= single_release,
-- 
1.9.1


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

end of thread, other threads:[~2015-09-17  4:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16 12:31 [PATCH] Staging: lustre: lustre: mdc: lproc_mdc.c: declared file_operations struct as const Sakshi Vaid
2015-09-17  4:25 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox