* [PATCH v2 0/3] Fix multiple checkpatch issues
@ 2017-03-27 19:45 Gargi Sharma
2017-03-27 19:45 ` [PATCH v2 1/3] kernel: pid_namespace: Fix line over 80 characters Gargi Sharma
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Gargi Sharma @ 2017-03-27 19:45 UTC (permalink / raw)
To: mawilcox; +Cc: outreachy-kernel, Gargi Sharma
This patchset fixes multiple checkpatch issues
in pid_namespace.c file.
---
Changes in v2:
Patch 1
- Fix splitting of line for better readablilty.
Gargi Sharma (3):
kernel: pid_namespace: Fix line over 80 characters
kernel: pid_namespace: Do not initialise statics to 0
kernel: pid_namespace: Remove return statement from void function
kernel/pid_namespace.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2 1/3] kernel: pid_namespace: Fix line over 80 characters
2017-03-27 19:45 [PATCH v2 0/3] Fix multiple checkpatch issues Gargi Sharma
@ 2017-03-27 19:45 ` Gargi Sharma
2017-03-27 19:45 ` [PATCH v2 2/3] kernel: pid_namespace: Do not initialise statics to 0 Gargi Sharma
2017-03-27 19:45 ` [PATCH v2 3/3] kernel: pid_namespace: Remove return statement from void function Gargi Sharma
2 siblings, 0 replies; 5+ messages in thread
From: Gargi Sharma @ 2017-03-27 19:45 UTC (permalink / raw)
To: mawilcox; +Cc: outreachy-kernel, Gargi Sharma
Line over 80 characters are split to fix the following checkpatch
issue:
WARNING: line over 80 characters
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
kernel/pid_namespace.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index a4f9a75..9315258 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -92,8 +92,9 @@ static void dec_pid_namespaces(struct ucounts *ucounts)
dec_ucount(ucounts, UCOUNT_PID_NAMESPACES);
}
-static struct pid_namespace *create_pid_namespace(struct user_namespace *user_ns,
- struct pid_namespace *parent_pid_ns)
+static struct pid_namespace *
+create_pid_namespace(struct user_namespace *user_ns,
+ struct pid_namespace *parent_pid_ns)
{
struct pid_namespace *ns;
unsigned int level = parent_pid_ns->level + 1;
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 2/3] kernel: pid_namespace: Do not initialise statics to 0
2017-03-27 19:45 [PATCH v2 0/3] Fix multiple checkpatch issues Gargi Sharma
2017-03-27 19:45 ` [PATCH v2 1/3] kernel: pid_namespace: Fix line over 80 characters Gargi Sharma
@ 2017-03-27 19:45 ` Gargi Sharma
2017-03-27 19:45 ` [PATCH v2 3/3] kernel: pid_namespace: Remove return statement from void function Gargi Sharma
2 siblings, 0 replies; 5+ messages in thread
From: Gargi Sharma @ 2017-03-27 19:45 UTC (permalink / raw)
To: mawilcox; +Cc: outreachy-kernel, Gargi Sharma
Static variables are initialised to 0 by GCC.
Fixes the following checkpatch error:
ERROR: do not initialise statics to 0 or NULL
Signed-off-by: Gargi Sharma <gs051095@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 9315258..9d4c53d 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -312,7 +312,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",
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 3/3] kernel: pid_namespace: Remove return statement from void function
2017-03-27 19:45 [PATCH v2 0/3] Fix multiple checkpatch issues Gargi Sharma
2017-03-27 19:45 ` [PATCH v2 1/3] kernel: pid_namespace: Fix line over 80 characters Gargi Sharma
2017-03-27 19:45 ` [PATCH v2 2/3] kernel: pid_namespace: Do not initialise statics to 0 Gargi Sharma
@ 2017-03-27 19:45 ` Gargi Sharma
2 siblings, 0 replies; 5+ messages in thread
From: Gargi Sharma @ 2017-03-27 19:45 UTC (permalink / raw)
To: mawilcox; +Cc: outreachy-kernel, Gargi Sharma
zap_pid_ns_processes is a void function and the return
statement at the end is not useful.
Found with checkpatch.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
kernel/pid_namespace.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index 9d4c53d..0afec4c 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -288,7 +288,6 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns)
current->signal->group_exit_code = pid_ns->reboot;
acct_exit_ns(pid_ns);
- return;
}
#ifdef CONFIG_CHECKPOINT_RESTORE
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 0/3] Fix multiple checkpatch issues
@ 2015-10-08 21:37 Amitoj Kaur Chawla
0 siblings, 0 replies; 5+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-08 21:37 UTC (permalink / raw)
To: outreachy-kernel
This patchset fixes multiple issues found using checkpatch.pl
Amitoj Kaur Chawla (3):
staging: sm750fb: Remove space after cast
staging: sm750fb: Remove space before closing brace
staging: sm750fb: Remove space after opening brace
drivers/staging/sm750fb/ddk750_chip.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-27 19:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-27 19:45 [PATCH v2 0/3] Fix multiple checkpatch issues Gargi Sharma
2017-03-27 19:45 ` [PATCH v2 1/3] kernel: pid_namespace: Fix line over 80 characters Gargi Sharma
2017-03-27 19:45 ` [PATCH v2 2/3] kernel: pid_namespace: Do not initialise statics to 0 Gargi Sharma
2017-03-27 19:45 ` [PATCH v2 3/3] kernel: pid_namespace: Remove return statement from void function Gargi Sharma
-- strict thread matches above, loose matches on Subject: below --
2015-10-08 21:37 [PATCH v2 0/3] Fix multiple checkpatch issues Amitoj Kaur Chawla
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.