[PATCH] kernel/hung_task: Add a whitelist and blacklist mechanism.

2021-04-17 Thread zhouchuangao
tate that need to be added to hung_state. Signed-off-by: zhouchuangao --- include/linux/sched.h | 1 + kernel/hung_task.c| 88 +-- 2 files changed, 87 insertions(+), 2 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 8d5264b..8ff

[PATCH] kernel/module: Use BUG_ON instead of if condition followed by BUG.

2021-04-17 Thread zhouchuangao
Usually, the condition in if () is not satisfied. For the multi-stage pipeline, we do not need to perform fetch decode and excute operation on brk instruction. In my opinion, this can improve the efficiency of the multi-stage pipeline. Signed-off-by: zhouchuangao --- kernel/module.c | 4 ++-- 1

[PATCH] riscv/mm: Use BUG_ON instead of if condition followed by BUG.

2021-03-30 Thread zhouchuangao
BUG_ON() uses unlikely in if(), which can be optimized at compile time. Signed-off-by: zhouchuangao --- arch/riscv/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 067583a..a7fa5e2 100644 --- a/arch/riscv/mm

[PATCH] message/fusion: Use BUG_ON instead of if condition followed by BUG.

2021-03-30 Thread zhouchuangao
BUG_ON() uses unlikely in if(), which can be optimized at compile time. Signed-off-by: zhouchuangao --- drivers/message/fusion/mptsas.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 5eb0b33

[PATCH] kernel/module: Use BUG_ON instead of if condition followed by BUG.

2021-03-30 Thread zhouchuangao
It can be optimized at compile time. Signed-off-by: zhouchuangao --- kernel/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index 3047935..f46fc4f 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1014,8 +1014,8 @@ void

[PATCH] arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG.

2021-03-30 Thread zhouchuangao
It can be optimized at compile time. Signed-off-by: zhouchuangao --- arch/arm64/kernel/probes/kprobes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c index 66aac28..ecf0f61 100644 --- a/arch/arm64

[PATCH] mm/zsmalloc: Use BUG_ON instead of if condition followed by BUG.

2021-03-25 Thread zhouchuangao
It can be optimized at compile time. Signed-off-by: zhouchuangao --- mm/zsmalloc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 30c358b..58697f7 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1987,8 +1987,7 @@ static int

[PATCH] fs/fuse/virtio_fs: Fix a potential memory allocation failure

2021-03-24 Thread zhouchuangao
Allocate memory for struct fuse_conn may fail, we should not jump to out_err to kfree(fc). Signed-off-by: zhouchuangao --- fs/fuse/virtio_fs.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index 4ee6f73..1f333c6 100644

[PATCH v2] kernel/signal: Modify the comment of function check_kill_permission()

2021-03-23 Thread zhouchuangao
Maybe it's easier for us to understand the function of check_kill_permission(). Signed-off-by: zhouchuangao --- kernel/signal.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index f2a1b89..e6b6277 100644 --- a/kernel/signal.c +++ b

[PATCH] kernel/signal: Modify the comment of function check_kill_permission

2021-03-23 Thread zhouchuangao
Maybe it's easier for us to understand the function of check_kill_permission. Signed-off-by: zhouchuangao --- kernel/signal.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index f2a1b89..2fbf68a 100644 --- a/kernel/signal.c +++ b

[PATCH] mm/page_alloc: Duplicate include linux/vmalloc.h

2021-03-22 Thread zhouchuangao
linux/vmalloc.h is repeatedly in the file page_alloc.c Signed-off-by: zhouchuangao --- mm/page_alloc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index c53fe4f..5adf9c1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -72,8 +72,6 @@ #include

[PATCH] arch/powerpc/kernel: Duplicate include asm/interrupt.h

2021-03-22 Thread zhouchuangao
asm/interrupt.h is repeatedly in the file interrupt.c. Signed-off-by: zhouchuangao --- arch/powerpc/kernel/interrupt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index c475a22..6deaccc 100644 --- a/arch/powerpc/kernel

[PATCH] proc/sysctl: Fix function name error in comments

2021-03-15 Thread zhouchuangao
The function name should be modified to register_sysctl_paths instead of register_sysctl_table_path. Signed-off-by: zhouchuangao --- fs/proc/proc_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 984e42f..f026a48

[PATCH] umh: fix some spelling mistakes

2021-03-13 Thread zhouchuangao
Fix some spelling mistakes, and modify the order of the parameter comments to be consistent with the order of the parameters passed to the function. Signed-off-by: zhouchuangao --- kernel/umh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/umh.c b/kernel/umh.c

[PATCH] x86/kernel/cpu/resctrl: replace 'of->kn->priv' with of_rft()

2021-01-04 Thread zhouchuangao
The use of 'of->kn->priv' to get rftype can be found in several places in arch/x86/kernel/cpu/resctrl/rdtgroup.c, which may reduce readability. So replace the direct use 'of->kn->priv' with inline function of_rft(), which is more readable. Signed-off-by: zhouchuangao --- arch/x8

[PATCH] init/do_mounts: fix a coding style error

2020-07-14 Thread zhouchuangao
Fix code style errors reported by scripts/checkpatch.pl. Signed-off-by: zhouchuangao --- init/do_mounts.c | 55 --- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/init/do_mounts.c b/init/do_mounts.c index 29d326b..89bf389

[PATCH] init/do_mounts: fix a coding style error

2020-05-20 Thread zhouchuangao
Fix code style errors reported by scripts/checkpatch.pl. Signed-off-by: zhouchuangao --- init/do_mounts.c | 52 ++-- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/init/do_mounts.c b/init/do_mounts.c index 29d326b..2f8bd41 100644

[PATCH] driver/hwmon/nct6775: Use kobj_to_dev() API

2020-05-10 Thread zhouchuangao
Use kobj_to_dev() API instead of container_of(). Signed-off-by: zhouchuangao --- drivers/hwmon/nct6775.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index 7efa6bf..e7e1ddc 100644 --- a/drivers/hwmon/nct6775.c