linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] capabilities:: annotate implicit fall through
@ 2019-01-14 20:28 Mathieu Malaterre
  2019-01-14 21:15 ` Gustavo A. R. Silva
  2019-01-23  3:43 ` James Morris
  0 siblings, 2 replies; 3+ messages in thread
From: Mathieu Malaterre @ 2019-01-14 20:28 UTC (permalink / raw)
  To: Serge Hallyn; +Cc: Mathieu Malaterre, linux-security-module, linux-kernel

There is a plan to build the kernel with -Wimplicit-fallthrough and
this place in the code produced a warning (W=1).

In this particular case change put the fall through comment on a single
line so as to match the regular expression expected by GCC.

This commit remove the following warning:

  kernel/capability.c:95:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 kernel/capability.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/capability.c b/kernel/capability.c
index 1e1c0236f55b..e60be18b98e2 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -93,9 +93,7 @@ static int cap_validate_magic(cap_user_header_t header, unsigned *tocopy)
 		break;
 	case _LINUX_CAPABILITY_VERSION_2:
 		warn_deprecated_v2();
-		/*
-		 * fall through - v3 is otherwise equivalent to v2.
-		 */
+		/* fall through - v3 is otherwise equivalent to v2. */
 	case _LINUX_CAPABILITY_VERSION_3:
 		*tocopy = _LINUX_CAPABILITY_U32S_3;
 		break;
-- 
2.19.2


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

* Re: [PATCH] capabilities:: annotate implicit fall through
  2019-01-14 20:28 [PATCH] capabilities:: annotate implicit fall through Mathieu Malaterre
@ 2019-01-14 21:15 ` Gustavo A. R. Silva
  2019-01-23  3:43 ` James Morris
  1 sibling, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-14 21:15 UTC (permalink / raw)
  To: Mathieu Malaterre, Serge Hallyn; +Cc: linux-security-module, linux-kernel



On 1/14/19 2:28 PM, Mathieu Malaterre wrote:
> There is a plan to build the kernel with -Wimplicit-fallthrough and
> this place in the code produced a warning (W=1).
> 
> In this particular case change put the fall through comment on a single
> line so as to match the regular expression expected by GCC.
> 
> This commit remove the following warning:
> 
>    kernel/capability.c:95:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Acked-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Thanks

> ---
>   kernel/capability.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/kernel/capability.c b/kernel/capability.c
> index 1e1c0236f55b..e60be18b98e2 100644
> --- a/kernel/capability.c
> +++ b/kernel/capability.c
> @@ -93,9 +93,7 @@ static int cap_validate_magic(cap_user_header_t header, unsigned *tocopy)
>   		break;
>   	case _LINUX_CAPABILITY_VERSION_2:
>   		warn_deprecated_v2();
> -		/*
> -		 * fall through - v3 is otherwise equivalent to v2.
> -		 */
> +		/* fall through - v3 is otherwise equivalent to v2. */
>   	case _LINUX_CAPABILITY_VERSION_3:
>   		*tocopy = _LINUX_CAPABILITY_U32S_3;
>   		break;
> 

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

* Re: [PATCH] capabilities:: annotate implicit fall through
  2019-01-14 20:28 [PATCH] capabilities:: annotate implicit fall through Mathieu Malaterre
  2019-01-14 21:15 ` Gustavo A. R. Silva
@ 2019-01-23  3:43 ` James Morris
  1 sibling, 0 replies; 3+ messages in thread
From: James Morris @ 2019-01-23  3:43 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: Serge Hallyn, linux-security-module, linux-kernel

On Mon, 14 Jan 2019, Mathieu Malaterre wrote:

> There is a plan to build the kernel with -Wimplicit-fallthrough and
> this place in the code produced a warning (W=1).
> 
> In this particular case change put the fall through comment on a single
> line so as to match the regular expression expected by GCC.
> 
> This commit remove the following warning:
> 
>   kernel/capability.c:95:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general

-- 
James Morris
<jmorris@namei.org>


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

end of thread, other threads:[~2019-01-23  3:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 20:28 [PATCH] capabilities:: annotate implicit fall through Mathieu Malaterre
2019-01-14 21:15 ` Gustavo A. R. Silva
2019-01-23  3:43 ` James Morris

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).