lkml.org 
[lkml]   [2021]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] init: init_task.c: fixed two spaces coding style issue
On Sat, Feb 27, 2021 at 06:01:18PM +0100, Javier Contreras wrote:
> Fixed two spaces coding style issue.
>
> Signed-off-by: Javier Contreras <contreras.javi.0@gmail.com>

I am not maintainer for this code, and also wangjingyu beat you to this
one. But one question: Given that this patch would cause "git blame"
to list you as the immediate point of contact for each line changed,
are you ready to answer all questions about each of those lines of code?
For example, given C's default initialization to zero, why is the "mm"
field explicitly set to NULL?

Thanx, Paul

> ---
> init/init_task.c | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/init/init_task.c b/init/init_task.c
> index 3711cdaafed2..85d6b045ef7a 100644
> --- a/init/init_task.c
> +++ b/init/init_task.c
> @@ -71,24 +71,24 @@ struct task_struct init_task
> .thread_info = INIT_THREAD_INFO(init_task),
> .stack_refcount = REFCOUNT_INIT(1),
> #endif
> - .state = 0,
> - .stack = init_stack,
> - .usage = REFCOUNT_INIT(2),
> - .flags = PF_KTHREAD,
> - .prio = MAX_PRIO - 20,
> - .static_prio = MAX_PRIO - 20,
> - .normal_prio = MAX_PRIO - 20,
> - .policy = SCHED_NORMAL,
> - .cpus_ptr = &init_task.cpus_mask,
> - .cpus_mask = CPU_MASK_ALL,
> - .nr_cpus_allowed= NR_CPUS,
> - .mm = NULL,
> - .active_mm = &init_mm,
> - .restart_block = {
> + .state = 0,
> + .stack = init_stack,
> + .usage = REFCOUNT_INIT(2),
> + .flags = PF_KTHREAD,
> + .prio = MAX_PRIO - 20,
> + .static_prio = MAX_PRIO - 20,
> + .normal_prio = MAX_PRIO - 20,
> + .policy = SCHED_NORMAL,
> + .cpus_ptr = &init_task.cpus_mask,
> + .cpus_mask = CPU_MASK_ALL,
> + .nr_cpus_allowed = NR_CPUS,
> + .mm = NULL,
> + .active_mm = &init_mm,
> + .restart_block = {
> .fn = do_no_restart_syscall,
> },
> .se = {
> - .group_node = LIST_HEAD_INIT(init_task.se.group_node),
> + .group_node = LIST_HEAD_INIT(init_task.se.group_node),
> },
> .rt = {
> .run_list = LIST_HEAD_INIT(init_task.rt.run_list),
> --
> 2.30.1
>

\
 
 \ /
  Last update: 2021-02-27 19:04    [W:0.041 / U:7.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site