[PATCH] mm/swapfile.c: fix debugging information problem

2021-01-22 Thread Stephen Zhang
Once the function name is changed, it may be easy to forget to modify the corresponding code here. Signed-off-by: Stephen Zhang --- mm/swapfile.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index 9fffc5a..12a18b8 100644 --- a/mm

[PATCH] mm/early_ioremap.c: Use __func__ instead of function name

2021-01-22 Thread Stephen Zhang
It is better to use __func__ instead of function name. Signed-off-by: Stephen Zhang --- mm/early_ioremap.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/early_ioremap.c b/mm/early_ioremap.c index a0018ad..164607c 100644 --- a/mm/early_ioremap.c +++ b/mm

[PATCH] genirq/irqdomain: Fix debugging information in irq_create_mapping_affinity()

2021-01-23 Thread Stephen Zhang
Replace the function name with __func__ in case of changes. Signed-off-by: Stephen Zhang --- kernel/irq/irqdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 6aacd34..2cad63e 100644 --- a/kernel/irq/irqdomain.c

[PATCH] torture: replace the function name with %s

2021-01-23 Thread Stephen Zhang
Better to replace the function name with %s. Signed-off-by: Stephen Zhang --- kernel/torture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/torture.c b/kernel/torture.c index 01e336f..0a315c3 100644 --- a/kernel/torture.c +++ b/kernel/torture.c @@ -816,9

[PATCH] workqueue: Use %s instead of function name

2021-01-23 Thread Stephen Zhang
It is better to replace the function name with %s, in case the function name changes. Signed-off-by: Stephen Zhang --- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 9880b6c..8b1b616 100644 --- a/kernel

[PATCH] rcutorture: replace the function name with %s

2021-01-23 Thread Stephen Zhang
Better to replace the function name with %s in case of changes. Signed-off-by: Stephen Zhang --- kernel/rcu/rcutorture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 2440f89..e561641 100644 --- a/kernel/rcu

[PATCH] KVM: x86/mmu: improve robustness of some functions

2021-01-22 Thread Stephen Zhang
If the name of this function changes, you can easily forget to modify the code in the corresponding place. In fact, such errors already exist in spte_write_protect and spte_clear_dirty. Signed-off-by: Stephen Zhang --- arch/x86/kvm/mmu/mmu.c | 16 1 file changed, 8 insertions

[PATCH] mm/memfd: replace strcpy() by strscpy()

2021-01-23 Thread Stephen Zhang
The strcpy() function is being deprecated. Replace it by the safer strscpy(). Signed-off-by: Stephen Zhang --- mm/memfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memfd.c b/mm/memfd.c index 2647c89..bb90862 100644 --- a/mm/memfd.c +++ b/mm/memfd.c @@ -278,7 +278,7

[PATCH] kvm:vmx:changes in handle_io() for code cleanup.

2020-12-10 Thread Stephen Zhang
Signed-off-by: Stephen Zhang --- arch/x86/kvm/vmx/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 47b8357..e1954df 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -4899,15 +4899,15 @@ static

[PATCH] kvm:vmx:code changes in handle_io() to save some CPU cycles.

2020-12-10 Thread Stephen Zhang
code changes in handle_io() to save some CPU cycles. Signed-off-by: Stephen Zhang --- arch/x86/kvm/vmx/vmx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 47b8357..109bcf64 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b

[PATCH] KVM: x86: change in pv_eoi_get_pending() to make code more readable

2020-12-17 Thread Stephen Zhang
Signed-off-by: Stephen Zhang --- arch/x86/kvm/lapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 3136e05..7882322 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -674,7 +674,7 @@ static bool

[PATCH v4] kdb: kdb_support: Fix debugging information problem

2021-02-04 Thread Stephen Zhang
if (KDB_DEBUG(mask)) \ kdb_func_printf(format, ## args); \ } while (0) In additon, we changed the format code of size_t to %zu. Signed-off-by: Stephen Zhang --- v1->v2 Changelog: - Add 'mask' parameter in kdb_dbg_printf() Thanks to Daniel

[PATCH] kdb: kdb_support: Fix debugging information problem

2021-01-27 Thread Stephen Zhang
if (KDB_DEBUG(mask)) \ kdb_func_printf(format, ## args); \ } while (0) In additon, we changed the format code of size_t to %zu. Signed-off-by: Stephen Zhang --- kernel/debug/kdb/kdb_private.h | 10 +

[PATCH v2] kdb: kdb_support: Fix debugging information problem

2021-01-27 Thread Stephen Zhang
if (KDB_DEBUG(mask)) \ kdb_func_printf(format, ## args); \ } while (0) In additon, we changed the format code of size_t to %zu. Signed-off-by: Stephen Zhang --- v1->v2 Changelog: - Add 'mask' parameter in kdb_dbg_printf() Thanks to Daniel

[PATCH v3] kdb: kdb_support: Fix debugging information problem

2021-01-30 Thread Stephen Zhang
if (KDB_DEBUG(mask)) \ kdb_func_printf(format, ## args); \ } while (0) In additon, we changed the format code of size_t to %zu. Signed-off-by: Stephen Zhang --- v1->v2 Changelog: - Add 'mask' parameter in kdb_dbg_printf() Thanks to Daniel

[PATCH] KVM: x86/mmu: Add '__func__' in rmap_printk()

2021-01-26 Thread Stephen Zhang
Given the common pattern: rmap_printk("%s:"..., __func__,...) we could improve this by adding '__func__' in rmap_printk(). Signed-off-by: Stephen Zhang --- arch/x86/kvm/mmu/mmu.c | 20 ++-- arch/x86/kvm/mmu/mmu_internal.h | 2 +- 2 files changed, 11 inserti

[PATCH v1] clang_tools:gen_compile_commands: Change the default source directory

2021-02-08 Thread Stephen Zhang
The default source directory is set equal to build directory which specified by "-d".But it is designed to be set to the current working directoy by default, as the help messge says.It makes a differece when source directory and build directory are in separted directorys. Signed-off-b

Re: [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory

2021-02-11 Thread Stephen Zhang
Nathan Chancellor 于2021年2月11日周四 上午2:24写道: > > On Wed, Feb 10, 2021 at 08:15:27PM +0800, Stephen Zhang wrote: > > Nathan Chancellor 于2021年2月10日周三 上午3:27写道: > > > > > Just as an FYI, your email was HTML, which means it won't hit LKML. > > > > > >

Re: [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory

2021-02-12 Thread Stephen Zhang
not do this correctly > without terribly messing up the code. > > Please do not try to support tools/. > > > > -- > Best Regards > Masahiro Yamada Thanks for the suggestion.But what we try to support is scripts/ instead of tools/. 'tools/' here is to help explaining the problem. Or am I just misunderstanding your words? -- Best Regards Stephen Zhang

Re: [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory

2021-02-14 Thread Stephen Zhang
at is not a subpath of the source > directory. In other words, this script would not work for > > $ make O=/tmp/build > > because '-d /tmp/build' needs to be used to find the .cmd files but then > the relative path of the source files is messed up, as you point out. This may help you reproduce the problem. So you shoud try: >masahiro@oscar:~/ref/linux$ make O=/tmp/build defconfig all -j24 where the build directory is not a subpath of the source directory. -- Best Regards Stephen Zhang

Re: [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory

2021-02-15 Thread Stephen Zhang
Nathan Chancellor 于2021年2月15日周一 上午7:28写道: > > This will actually work for the regular build system as it uses the full > path to the files when O= is outside of the source tree. My comment > applies only to the tools/ build system, which Masahiro has explicitly > said he does not want this script

Re: [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory

2021-02-15 Thread Stephen Zhang
Masahiro Yamada 于2021年2月15日周一 上午1:10写道: > > So, what is the problem? > > > > > -- > Best Regards > Masahiro Yamada Okay,it seems that I misunderstood what you said before. -- Best Regards Stephen Zhang

[tip: core/rcu] torture: Replace torture_init_begin string with %s

2021-04-11 Thread tip-bot2 for Stephen Zhang
The following commit has been merged into the core/rcu branch of tip: Commit-ID: 4ac9de07b24f93a87ad38c497ad00fe2451203e7 Gitweb: https://git.kernel.org/tip/4ac9de07b24f93a87ad38c497ad00fe2451203e7 Author:Stephen Zhang AuthorDate:Sat, 23 Jan 2021 16:34:01 +08:00 Committer

[tip: core/rcu] rcutorture: Replace rcu_torture_stall string with %s

2021-04-11 Thread tip-bot2 for Stephen Zhang
The following commit has been merged into the core/rcu branch of tip: Commit-ID: 0a27fff30a5e561dc77e9cb1bf9cf462e1735179 Gitweb: https://git.kernel.org/tip/0a27fff30a5e561dc77e9cb1bf9cf462e1735179 Author:Stephen Zhang AuthorDate:Sat, 23 Jan 2021 17:54:17 +08:00 Committer