Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1226049 > unrolled thread

[PATCH] Staging: lustre: lustre: mdc: lproc_mdc.c: declared file_operations struct as const

Started bySakshi Vaid <sakshivaid95@gmail.com>
First post2015-09-16 14:40 +0200
Last post2015-09-17 06:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Staging: lustre: lustre: mdc: lproc_mdc.c: declared file_operations struct as const Sakshi Vaid <sakshivaid95@gmail.com> - 2015-09-16 14:40 +0200
    Re: [PATCH] Staging: lustre: lustre: mdc: lproc_mdc.c: declared  file_operations struct as const Greg KH <gregkh@linuxfoundation.org> - 2015-09-17 06:30 +0200

#1226049 — [PATCH] Staging: lustre: lustre: mdc: lproc_mdc.c: declared file_operations struct as const

FromSakshi Vaid <sakshivaid95@gmail.com>
Date2015-09-16 14:40 +0200
Subject[PATCH] Staging: lustre: lustre: mdc: lproc_mdc.c: declared file_operations struct as const
Message-ID<q9kae-4xl-5@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1226653 — Re: [PATCH] Staging: lustre: lustre: mdc: lproc_mdc.c: declared file_operations struct as const

FromGreg KH <gregkh@linuxfoundation.org>
Date2015-09-17 06:30 +0200
SubjectRe: [PATCH] Staging: lustre: lustre: mdc: lproc_mdc.c: declared file_operations struct as const
Message-ID<q9yZz-Oq-3@gated-at.bofh.it>
In reply to#1226049
On Wed, Sep 16, 2015 at 06:01:01PM +0530, Sakshi Vaid wrote:
> 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,

This doesn't apply to my tree at all, what are you making it against?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web