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
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
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
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
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
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
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
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 ++---
>>
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 ++---
>>
d_t *p4d, p4dval;
> + pud_t pudval;
> + int seq, ret = VM_FAULT_RETRY;
> + struct vm_area_struct *vma;
> +#ifdef CONFIG_NUMA
> + struct mempolicy *pol;
> +#endif
> +
> + /* Clear flags that may lead to release the mmap_sem to retry */
> + flags &= ~(F
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).
>&
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 Zijl
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
13 matches
Mail list logo