Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1384542 > unrolled thread
| Started by | Kees Cook <keescook@chromium.org> |
|---|---|
| First post | 2016-04-21 22:00 +0200 |
| Last post | 2016-04-27 09:10 +0200 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH] fs: fix over-zealous use of "const" Kees Cook <keescook@chromium.org> - 2016-04-21 22:00 +0200
Re: [PATCH] fs: fix over-zealous use of "const" Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-04-22 00:20 +0200
Re: [PATCH] fs: fix over-zealous use of "const" Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-04-25 11:10 +0200
Re: [PATCH] fs: fix over-zealous use of "const" James Morris <jmorris@namei.org> - 2016-04-27 09:10 +0200
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Date | 2016-04-21 22:00 +0200 |
| Subject | [PATCH] fs: fix over-zealous use of "const" |
| Message-ID | <rqsVA-6gR-15@gated-at.bofh.it> |
When I was fixing up const recommendations from checkpatch.pl, I went
overboard. This fixes the warning (during a W=1 build):
include/linux/fs.h:2627:74: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
static inline const char * const kernel_read_file_id_str(enum kernel_read_file_id id)
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
This is for linux-security next
---
include/linux/fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 518716b4834e..82f9a2db3b1a 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2610,7 +2610,7 @@ static const char * const kernel_read_file_str[] = {
__kernel_read_file_id(__fid_stringify)
};
-static inline const char * const kernel_read_file_id_str(enum kernel_read_file_id id)
+static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id)
{
if (id < 0 || id >= READING_MAX_ID)
return kernel_read_file_str[READING_UNKNOWN];
--
2.6.3
--
Kees Cook
Chrome OS & Brillo Security
[toc] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2016-04-22 00:20 +0200 |
| Message-ID | <rqv74-8cm-21@gated-at.bofh.it> |
| In reply to | #1384542 |
On Thu, Apr 21, 2016 at 10:53 PM, Kees Cook <keescook@chromium.org> wrote:
> When I was fixing up const recommendations from checkpatch.pl, I went
> overboard. This fixes the warning (during a W=1 build):
>
> include/linux/fs.h:2627:74: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
> static inline const char * const kernel_read_file_id_str(enum kernel_read_file_id id)
>
> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Kees Cook <keescook@chromium.org>
Will test next week if someone don't do that before.
Thanks.
> ---
> This is for linux-security next
> ---
> include/linux/fs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 518716b4834e..82f9a2db3b1a 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -2610,7 +2610,7 @@ static const char * const kernel_read_file_str[] = {
> __kernel_read_file_id(__fid_stringify)
> };
>
> -static inline const char * const kernel_read_file_id_str(enum kernel_read_file_id id)
> +static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id)
> {
> if (id < 0 || id >= READING_MAX_ID)
> return kernel_read_file_str[READING_UNKNOWN];
> --
> 2.6.3
>
>
> --
> Kees Cook
> Chrome OS & Brillo Security
--
With Best Regards,
Andy Shevchenko
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2016-04-25 11:10 +0200 |
| Message-ID | <rrKGM-381-35@gated-at.bofh.it> |
| In reply to | #1384542 |
On Thu, 2016-04-21 at 12:53 -0700, Kees Cook wrote:
> When I was fixing up const recommendations from checkpatch.pl, I went
> overboard. This fixes the warning (during a W=1 build):
>
> include/linux/fs.h:2627:74: warning: type qualifiers ignored on
> function return type [-Wignored-qualifiers]
> static inline const char * const kernel_read_file_id_str(enum
> kernel_read_file_id id)
>
> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> This is for linux-security next
> ---
> include/linux/fs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 518716b4834e..82f9a2db3b1a 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -2610,7 +2610,7 @@ static const char * const kernel_read_file_str[]
> = {
> __kernel_read_file_id(__fid_stringify)
> };
>
> -static inline const char * const kernel_read_file_id_str(enum
> kernel_read_file_id id)
> +static inline const char *kernel_read_file_id_str(enum
> kernel_read_file_id id)
> {
> if (id < 0 || id >= READING_MAX_ID)
> return kernel_read_file_str[READING_UNKNOWN];
> --
> 2.6.3
>
>
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
[toc] | [prev] | [next] | [standalone]
| From | James Morris <jmorris@namei.org> |
|---|---|
| Date | 2016-04-27 09:10 +0200 |
| Message-ID | <rsrLH-5uN-11@gated-at.bofh.it> |
| In reply to | #1384542 |
On Thu, 21 Apr 2016, Kees Cook wrote: > When I was fixing up const recommendations from checkpatch.pl, I went > overboard. This fixes the warning (during a W=1 build): > > include/linux/fs.h:2627:74: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] > static inline const char * const kernel_read_file_id_str(enum kernel_read_file_id id) > > Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Signed-off-by: Kees Cook <keescook@chromium.org> > --- > This is for linux-security next > --- Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next -- James Morris <jmorris@namei.org>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web