linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel: removed unnecessary initialization of static variable
@ 2014-12-21  3:39 Gangadhar Vukkesala
  2014-12-21  7:21 ` Jeremiah Mahler
  0 siblings, 1 reply; 2+ messages in thread
From: Gangadhar Vukkesala @ 2014-12-21  3:39 UTC (permalink / raw)
  To: akpm, oleg, viro; +Cc: linux-kernel, Gangadhar Vukkesala

Removed unnecessary initialization of static variable "zero" to 0 
in pid_namespace.c as default value of static variable is 0.
This issue was found when running checkpatch.pl script on pid_namespace.c.

Signed-off-by: Gangadhar Vukkesala <gangs.freelancer@gmail.com>
---
 kernel/pid_namespace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index a65ba13..f21eb3f 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -290,7 +290,7 @@ static int pid_ns_ctl_handler(struct ctl_table *table, int write,
 }
 
 extern int pid_max;
-static int zero = 0;
+static int zero;
 static struct ctl_table pid_ns_ctl_table[] = {
 	{
 		.procname = "ns_last_pid",
-- 
Gangadhar Vukkesala


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

* Re: [PATCH] kernel: removed unnecessary initialization of static variable
  2014-12-21  3:39 [PATCH] kernel: removed unnecessary initialization of static variable Gangadhar Vukkesala
@ 2014-12-21  7:21 ` Jeremiah Mahler
  0 siblings, 0 replies; 2+ messages in thread
From: Jeremiah Mahler @ 2014-12-21  7:21 UTC (permalink / raw)
  To: Gangadhar Vukkesala; +Cc: akpm, oleg, viro, linux-kernel

Gangadhar,

On Sun, Dec 21, 2014 at 09:09:05AM +0530, Gangadhar Vukkesala wrote:
> Removed unnecessary initialization of static variable "zero" to 0 
> in pid_namespace.c as default value of static variable is 0.
> This issue was found when running checkpatch.pl script on pid_namespace.c.
> 
> Signed-off-by: Gangadhar Vukkesala <gangs.freelancer@gmail.com>
> ---
>  kernel/pid_namespace.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
> index a65ba13..f21eb3f 100644
> --- a/kernel/pid_namespace.c
> +++ b/kernel/pid_namespace.c
> @@ -290,7 +290,7 @@ static int pid_ns_ctl_handler(struct ctl_table *table, int write,
>  }
>  
>  extern int pid_max;
> -static int zero = 0;
> +static int zero;
>  static struct ctl_table pid_ns_ctl_table[] = {
>  	{
>  		.procname = "ns_last_pid",
> -- 
> Gangadhar Vukkesala
> 
> --
> 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/

Looks good.

Reviewed-by: Jeremiah Mahler <jmmahler@gmail.com>

-- 
- Jeremiah Mahler

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

end of thread, other threads:[~2014-12-21  7:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-21  3:39 [PATCH] kernel: removed unnecessary initialization of static variable Gangadhar Vukkesala
2014-12-21  7:21 ` Jeremiah Mahler

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