[PATCH] mm/filemap: minor coding style tweaks

2021-02-24 Thread Zhiyuan Dai
Delete whitespace to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/filemap.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 6ff2a3f..20f27b6 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -3111,7

[PATCH] mm/page_alloc: minor coding style tweaks

2021-02-24 Thread Zhiyuan Dai
Add whitespace to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index ef5070f..c7c4991 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c

[PATCH] mm/shmem: minor coding style tweaks

2021-02-24 Thread Zhiyuan Dai
Add whitespace to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index 1b254fb..e5fb90c 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3559,7 +3559,7 @@ static int

[PATCH] mm/oom_kill: minor coding style tweaks

2021-02-24 Thread Zhiyuan Dai
Add whitespace to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/oom_kill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index c9a33ff..dd12dad7 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -994,7 +994,7

[PATCH] mm/compaction: minor coding style tweaks

2021-02-24 Thread Zhiyuan Dai
Add whitespace to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index 190ccda..bd821e1 100644 --- a/mm/compaction.c +++ b/mm/compaction.c

[PATCH] mm/zswap: switch from strlcpy to strscpy

2021-02-24 Thread Zhiyuan Dai
strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. Signed-off-by: Zhiyuan Dai

[PATCH] mm/vmscan: minor coding style tweaks

2021-02-24 Thread Zhiyuan Dai
Add whitespace to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index b1b574a..333c43b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3872,7 +3872,7

[PATCH] mm/sparse: minor coding style tweaks

2021-02-24 Thread Zhiyuan Dai
Add whitespace to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/sparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/sparse.c b/mm/sparse.c index 7bd23f9..be66a62 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -257,7 +257,7 @@ static

[PATCH] mm/swapfile: minor coding style tweaks

2021-02-24 Thread Zhiyuan Dai
Add whitespace to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/swapfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index 96799a2..d261be4 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2767,7

[PATCH] mm/memremap: Fixes improper SPDX comment style

2021-02-24 Thread Zhiyuan Dai
Replace /* */ comment with //, fix SPDX comment style. see: Documentation/process/license-rules.rst Signed-off-by: Zhiyuan Dai --- mm/memremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memremap.c b/mm/memremap.c index 16b2fb4..ffafac0 100644 --- a/mm/memremap.c

[PATCH] mm/mempool: minor coding style tweaks

2021-02-24 Thread Zhiyuan Dai
Add whitespace to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mempool.c b/mm/mempool.c index 624ed51..fbf0513 100644 --- a/mm/mempool.c +++ b/mm/mempool.c @@ -251,7 +251,7

[PATCH] mm/mempolicy: minor coding style tweaks

2021-02-21 Thread Zhiyuan Dai
Add whitespace to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/mempolicy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 2c3a865..740633d 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c

[PATCH] mm/memory_hotplug: minor coding style tweaks

2021-02-21 Thread Zhiyuan Dai
This patch move the pointer location to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index f9d57b9..a46c297 100644 --- a/mm

[PATCH] mm/kasan: remove volatile keyword

2021-02-21 Thread Zhiyuan Dai
almost certainly a bug in the code somewhere. In properly-written kernel code, volatile can only serve to slow things down. see: Documentation/process/volatile-considered-harmful.rst Signed-off-by: Zhiyuan Dai --- mm/kasan/shadow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] mm/kasan: switch from strlcpy to strscpy

2021-02-21 Thread Zhiyuan Dai
strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. Signed-off-by: Zhiyuan Dai

[PATCH] mm/ioremap: remove volatile keyword in iounmap function

2021-02-21 Thread Zhiyuan Dai
almost certainly a bug in the code somewhere. In properly-written kernel code, volatile can only serve to slow things down. see: Documentation/process/volatile-considered-harmful.rst Signed-off-by: Zhiyuan Dai --- mm/ioremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm

[PATCH] mm/interval_tree: add comments to improve code reading

2021-02-21 Thread Zhiyuan Dai
Add a comment explain the value of the ISSTATIC parameter, Inform the reader that this is not a coding style issue. Signed-off-by: Zhiyuan Dai --- mm/interval_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/interval_tree.c b/mm/interval_tree.c index 11c75fb

[PATCH] mm/vmalloc: minor coding style tweaks

2021-02-21 Thread Zhiyuan Dai
Macros with complex values should be enclosed in parentheses. Signed-off-by: Zhiyuan Dai --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 4f5f8c9..82cfa39 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2739,7 +2739,7

[PATCH] mm/frontswap: minor coding style tweaks

2021-02-21 Thread Zhiyuan Dai
This patch move brace position to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/frontswap.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mm/frontswap.c b/mm/frontswap.c index 2183a56..ea6a3b4 100644 --- a/mm/frontswap.c

[PATCH] mm/dmapool: switch from strlcpy to strscpy

2021-02-21 Thread Zhiyuan Dai
strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. Signed-off-by: Zhiyuan Dai

[PATCH] arm64/mm: Fixed some coding style issues

2021-02-21 Thread Zhiyuan Dai
This patch move the pointer location to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- arch/arm64/mm/mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 25af183..9ce8641 100644 --- a/arch

[PATCH] mm/mlock: minor coding style tweaks

2021-02-21 Thread Zhiyuan Dai
This patch move the pointer location to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/mlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/mlock.c b/mm/mlock.c index 55b3b36..f6e26c2 100644 --- a/mm/mlock.c +++ b/mm/mlock.c

[PATCH] mm/mlock: minor coding style tweaks

2021-02-08 Thread Zhiyuan Dai
This patch move the pointer location to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/mlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/mlock.c b/mm/mlock.c index 55b3b36..f6e26c2 100644 --- a/mm/mlock.c +++ b/mm/mlock.c

[PATCH] mm/slub: minor coding style tweaks

2021-02-08 Thread Zhiyuan Dai
This patch adds whitespace to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index 7ecbbbe..3313897 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3266,7 +3266,7

[PATCH] mm/slab: minor coding style tweaks

2021-02-08 Thread Zhiyuan Dai
Fixed some coding style issues, improve code reading. This patch adds whitespace to clearly separate the parameters. Signed-off-by: Zhiyuan Dai --- mm/slab.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index d7c8da9..30bba30 100644

[PATCH] ceph: minor coding style tweaks

2021-02-03 Thread Zhiyuan Dai
Fixed some coding style issues, improve code reading. 1. Move the pointer location 2. Move brace position 3. Alignment to open parenthesis This patch adds whitespace to clearly separate the parameters. Signed-off-by: Zhiyuan Dai --- fs/ceph/addr.c | 3 +-- fs/ceph/cache.c | 14

[PATCH] ceph: minor coding style tweaks

2021-02-03 Thread Zhiyuan Dai
Fixed some coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- fs/ceph/addr.c | 3 +-- fs/ceph/cache.c | 14 +++--- fs/ceph/caps.c | 2 +- fs/ceph/dir.c| 6 +++--- fs/ceph/export.c | 2 +- fs/ceph/inode.c | 6 +++--- fs/ceph

[PATCH] arm64: improve whitespace

2021-02-03 Thread Zhiyuan Dai
space. Signed-off-by: Zhiyuan Dai --- arch/arm64/kernel/alternative.c | 2 +- arch/arm64/kernel/module-plts.c | 2 +- arch/arm64/kernel/perf_event.c | 2 +- arch/arm64/kernel/process.c | 4 ++-- arch/arm64/kernel/traps.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --

[PATCH 2/2] arm64/kernel: improve the coding style

2021-02-02 Thread Zhiyuan Dai
Just improve the coding style. Signed-off-by: Zhiyuan Dai --- arch/arm64/kernel/alternative.c | 2 +- arch/arm64/kernel/module-plts.c | 2 +- arch/arm64/kernel/perf_event.c | 2 +- arch/arm64/kernel/process.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch

[PATCH] arm64/kernel: minor coding style tweaks

2021-02-02 Thread Zhiyuan Dai
Fixed two coding style issues in kernel/trap.c 1. spaces required around that '=' 2. Missing a blank line after declarations Signed-off-by: Zhiyuan Dai --- arch/arm64/kernel/traps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/traps.c b/

[PATCH] mm/hugetlb.c: Fix typos in comments

2021-02-02 Thread Zhiyuan Dai
Fix typos in comments Signed-off-by: Zhiyuan Dai --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 18f6ee3..35db386 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3990,7 +3990,7 @@ void unmap_hugepage_range(struct

mm/hugetlb.c: Fix typos in comments

2021-02-02 Thread Zhiyuan Dai
Signed-off-by: Zhiyuan Dai --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 18f6ee3..35db386 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3990,7 +3990,7 @@ void unmap_hugepage_range(struct vm_area_struct *vma, unsigned

[PATCH] mm/hugetlb.c: Fix typos in comments

2021-02-02 Thread Zhiyuan Dai
Signed-off-by: Zhiyuan Dai --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 18f6ee3..35db386 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3990,7 +3990,7 @@ void unmap_hugepage_range(struct vm_area_struct *vma, unsigned

mm/hugetlb.c: Fix typos in comments

2021-02-02 Thread Zhiyuan Dai
mm/hugetlb.c: Fix typos in comments Signed-off-by: Zhiyuan Dai --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 18f6ee3..35db386 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3990,7 +3990,7 @@ void

mm/hugetlb.c: Fix typos in comments

2021-02-02 Thread Zhiyuan Dai
Fix typos in comments. Signed-off-by: Zhiyuan Dai --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 18f6ee3..35db386 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3990,7 +3990,7 @@ void unmap_hugepage_range(struct