Re: [PATCH] powerpc: Move a dereference below a NULL test

2018-09-26 Thread zhong jiang
On 2018/9/26 22:22, Michal Suchánek wrote: > On Wed, 26 Sep 2018 19:46:08 +0800 > zhong jiang wrote: > >> It is safe to move dereference below a NULL test. >> >> Signed-off-by: zhong jiang >> --- >> arch/powerpc/kernel/cacheinfo.c | 5 ++--- >>

Re: [PATCH] powerpc: Move a dereference below a NULL test

2018-09-26 Thread zhong jiang
On 2018/9/26 21:58, Christophe LEROY wrote: > > > Le 26/09/2018 à 13:46, zhong jiang a écrit : >> It is safe to move dereference below a NULL test. >> >> Signed-off-by: zhong jiang >> --- >> arch/powerpc/kernel/cacheinfo.c | 5 ++--- >>

[PATCH] powerpc: Move a dereference below a NULL test

2018-09-26 Thread zhong jiang
It is safe to move dereference below a NULL test. Signed-off-by: zhong jiang --- arch/powerpc/kernel/cacheinfo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c index a8f20e5..7f19714 100644 --- a/arch

[PATCH] powerpc: xive: Move a dereference below a NULL test

2018-09-26 Thread zhong jiang
It is safe to move dereference below a NULL test. Signed-off-by: zhong jiang --- arch/powerpc/sysdev/xive/common.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index 959a2a6..9824074 100644

Re: [PATCH 2/2] powerpc: Use ARRAY_SIZE to replace its implementation

2018-08-14 Thread zhong jiang
On 2018/8/14 17:28, Michael Ellerman wrote: > zhong jiang writes: >> Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. >> So just replace it. >> >> Signed-off-by: zhong jiang >> --- >> arch/powerpc/xmon/ppc-opc.c | 12

Re: [PATCH 1/2] ia64: Use ARRAY_SIZE to replace its implementation

2018-08-13 Thread zhong jiang
On 2018/8/14 12:45, Joe Perches wrote: > On Tue, 2018-08-14 at 10:46 +0800, zhong jiang wrote: >> We prefer to ARRAY_SIZE rather than duplicating its implementation. >> So just replace it. > [] >> diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c &g

[PATCH 2/2] powerpc: Use ARRAY_SIZE to replace its implementation

2018-08-13 Thread zhong jiang
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. So just replace it. Signed-off-by: zhong jiang --- arch/powerpc/xmon/ppc-opc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/xmon/ppc-opc.c b/arch/powerpc/xmon/ppc-opc.c index

[PATCH 1/2] ia64: Use ARRAY_SIZE to replace its implementation

2018-08-13 Thread zhong jiang
We prefer to ARRAY_SIZE rather than duplicating its implementation. So just replace it. Signed-off-by: zhong jiang --- arch/ia64/kernel/perfmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index a9d4dc6..6cbe6e0

[PATCH 0/2] Use ARRAY_SIZE to replace its implementation

2018-08-13 Thread zhong jiang
The issue is detected with the help of Coccinelle. zhong jiang (2): ia64: Use ARRAY_SIZE to replace its implementation powerpc: Use ARRAY_SIZE to replace its implementation arch/ia64/kernel/perfmon.c | 2 +- arch/powerpc/xmon/ppc-opc.c | 12 2 files changed, 5 insertions

[PATCH] powpc:feature: of_node_put is not needed after iterator.

2018-08-04 Thread zhong jiang
for_each_node_by_name iterators only exit normally when the loop cursor is NULL, So there is no point to call of_node_put. Signed-off-by: zhong jiang --- arch/powerpc/platforms/powermac/feature.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/platforms/powermac/feature.c b

Re: [PATCH v11 19/26] mm: provide speculative fault infrastructure

2018-07-25 Thread zhong jiang
On 2018/7/25 18:44, Laurent Dufour wrote: > > On 25/07/2018 11:04, zhong jiang wrote: >> On 2018/7/25 0:10, Laurent Dufour wrote: >>> On 24/07/2018 16:26, zhong jiang wrote: >>>> On 2018/5/17 19:06, Laurent Dufour wrote: >>>>> From: Peter Zi

Re: [PATCH v11 19/26] mm: provide speculative fault infrastructure

2018-07-25 Thread zhong jiang
On 2018/7/25 0:10, Laurent Dufour wrote: > > On 24/07/2018 16:26, zhong jiang wrote: >> On 2018/5/17 19:06, Laurent Dufour wrote: >>> From: Peter Zijlstra >>> >>> Provide infrastructure to do a speculative fault (not holding >>> mmap_sem). >&

Re: [PATCH v11 19/26] mm: provide speculative fault infrastructure

2018-07-24 Thread zhong jiang
CONFIG_NUMA > + struct mempolicy *pol; > +#endif > + > + /* Clear flags that may lead to release the mmap_sem to retry */ > + flags &= ~(FAULT_FLAG_ALLOW_RETRY|FAULT_FLAG_KILLABLE); > + flags |= FAULT_FLAG_SPECULATIVE; > + > + vma = get_vma(mm, address); > +