Re: [PATCH 1/3] powerpc/8xx: Enhance readability of trap types

2021-04-19 Thread Xiongwei Song
On Mon, Apr 19, 2021 at 11:48 PM Christophe Leroy wrote: > > This patch makes use of trap types in head_8xx.S > > Signed-off-by: Christophe Leroy > --- > arch/powerpc/include/asm/interrupt.h | 29 > arch/powerpc/kernel/head_8xx.S | 49 ++-- > 2

Re: linux-next: build failure after merge of the powerpc tree

2021-04-19 Thread Xiongwei Song
Thank you so much Stephen. Sorry for my negligence. Should I fix this myself on powerpc tree? Regards, Xiongwei On Mon, Apr 19, 2021 at 5:14 PM Stephen Rothwell wrote: > > Hi all, > > After merging the powerpc tree, today's linux-next build (powerpc > allyesconfig) failed like this: > >

[PATCH v5] powerpc/traps: Enhance readability for trap types

2021-04-14 Thread Xiongwei Song
From: Xiongwei Song Define macros to list ppc interrupt types in interttupt.h, replace the reference of the trap hex values with these macros. Referred the hex numbers in arch/powerpc/kernel/exceptions-64e.S, arch/powerpc/kernel/exceptions-64s.S, arch/powerpc/kernel/head_*.S, arch/powerpc

Re: [PATCH v4] powerpc/traps: Enhance readability for trap types

2021-04-10 Thread Xiongwei Song
> On Apr 10, 2021, at 8:35 AM, Nicholas Piggin wrote: > > Thanks for working on this, I think it's a nice cleanup and helps > non-powerpc people understand the code a bit better. > My pleasure. > Excerpts from Xiongwei Song's message of April 10, 2021 12:28 am: >

Re: [PATCH v3] powerpc/traps: Enhance readability for trap types

2021-04-10 Thread Xiongwei Song
> On Apr 10, 2021, at 8:04 AM, Michael Ellerman wrote: > > Christophe Leroy writes: >> Le 08/04/2021 à 16:07, Xiongwei Song a écrit : >>> From: Xiongwei Song >>> >>> Create a new header named traps.h, define macros to list ppc interrupt &

Re: [PATCH v3] powerpc/traps: Enhance readability for trap types

2021-04-10 Thread Xiongwei Song
> On Apr 10, 2021, at 12:14 AM, Christophe Leroy > wrote: > > > > Le 08/04/2021 à 16:07, Xiongwei Song a écrit : >> From: Xiongwei Song >> Create a new header named traps.h, define macros to list ppc interrupt >> types in traps.h, replace

[PATCH v4] powerpc/traps: Enhance readability for trap types

2021-04-09 Thread Xiongwei Song
From: Xiongwei Song Create a new header named traps.h, define macros to list ppc interrupt types in traps.h, replace the references of the trap hex values with these macros. Referred the hex numbers in arch/powerpc/kernel/exceptions-64e.S, arch/powerpc/kernel/exceptions-64s.S and arch/powerpc

[PATCH v3] powerpc/traps: Enhance readability for trap types

2021-04-08 Thread Xiongwei Song
From: Xiongwei Song Create a new header named traps.h, define macros to list ppc interrupt types in traps.h, replace the reference of the trap hex values with these macros. Referred the hex number in arch/powerpc/kernel/exceptions-64e.S, arch/powerpc/kernel/exceptions-64s.S and arch/powerpc

Re: [PATCH v2] powerpc/traps: Enhance readability for trap types

2021-04-05 Thread Xiongwei Song
Regards, Xiongwei > On Apr 2, 2021, at 8:36 AM, Nicholas Piggin wrote: > > Excerpts from Segher Boessenkool's message of April 2, 2021 2:11 am: >> On Thu, Apr 01, 2021 at 10:55:58AM +0800, Xiongwei Song wrote: >>> Segher Boessenkool 于2021年4月1日周四 上午6:15写道: >&g

Re: [PATCH v2] powerpc/traps: Enhance readability for trap types

2021-04-05 Thread Xiongwei Song
Regards, Xiongwei > On Apr 1, 2021, at 4:01 PM, Nicholas Piggin wrote: > > Excerpts from Michael Ellerman's message of April 1, 2021 12:39 pm: >> Segher Boessenkool writes: >>> On Wed, Mar 31, 2021 at 08:58:17PM +1100, Michael Ellerman wrote: So perhaps: EXC_SYSTEM_RESET

Re: [PATCH v2] powerpc/traps: Enhance readability for trap types

2021-04-05 Thread Xiongwei Song
> On Apr 2, 2021, at 12:11 AM, Segher Boessenkool > wrote: > > On Thu, Apr 01, 2021 at 10:55:58AM +0800, Xiongwei Song wrote: >> Segher Boessenkool 于2021年4月1日周四 上午6:15写道: >> >>> On Wed, Mar 31, 2021 at 08:58:17PM +1100, Michael Ellerman wrote: >>>

[PATCH v2] powerpc/traps: Enhance readability for trap types

2021-03-30 Thread Xiongwei Song
From: Xiongwei Song Create a new header named traps.h, define macros to list ppc exception types in traps.h, replace the reference of the real trap values with these macros. Signed-off-by: Xiongwei Song --- arch/powerpc/include/asm/interrupt.h | 7 --- arch/powerpc/include/asm/ptrace.h

Re: [PATCH] powerpc/process: Enhance readability for trap types.

2021-03-28 Thread Xiongwei Song
> On Mar 28, 2021, at 11:21 PM, Christophe Leroy > wrote: > > > > Le 28/03/2021 à 16:35, Xiongwei Song a écrit : >> From: Xiongwei Song >> Define macros to enhance the code readability on ppc trap types. > > Good idea > >> Signed-off-by:

[PATCH] powerpc/process: Enhance readability for trap types.

2021-03-28 Thread Xiongwei Song
From: Xiongwei Song Define macros to enhance the code readability on ppc trap types. Signed-off-by: Xiongwei Song --- arch/powerpc/kernel/process.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index

[PATCH] tracing: Remove redundant subject

2018-02-21 Thread Xiongwei Song
There are two consecutive 'we' to represent subject, remove one of the two. Signed-off-by: Xiongwei Song <sxwj...@me.com> --- Documentation/trace/events.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/trace/events.txt b/Documentation/trace/even

[PATCH] tracing: Remove redundant subject

2018-02-21 Thread Xiongwei Song
There are two consecutive 'we' to represent subject, remove one of the two. Signed-off-by: Xiongwei Song --- Documentation/trace/events.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt index

[PATCH] tracing: Fix incorrect file name

2018-02-04 Thread Xiongwei Song
There is no file named 'enabled' in the directory tracing/events. It should be the file 'enable'. Signed-off-by: Xiongwei Song <sxwj...@me.com> --- Documentation/trace/events.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/trace/events.txt b/Documen

[PATCH] tracing: Fix incorrect file name

2018-02-04 Thread Xiongwei Song
There is no file named 'enabled' in the directory tracing/events. It should be the file 'enable'. Signed-off-by: Xiongwei Song --- Documentation/trace/events.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt

Re: [PATCH] cgroup: remove incorrect check on the return value of css_alloc

2018-01-22 Thread Xiongwei Song
> On 22 Jan 2018, at 11:55 PM, Tejun Heo <t...@kernel.org> wrote: > > Hello, > > On Mon, Jan 22, 2018 at 09:38:51PM +0800, Xiongwei Song wrote: >> The function css_alloc never return NULL, it may return normal pointer or > > It's a calling a controller implemen

Re: [PATCH] cgroup: remove incorrect check on the return value of css_alloc

2018-01-22 Thread Xiongwei Song
> On 22 Jan 2018, at 11:55 PM, Tejun Heo wrote: > > Hello, > > On Mon, Jan 22, 2018 at 09:38:51PM +0800, Xiongwei Song wrote: >> The function css_alloc never return NULL, it may return normal pointer or > > It's a calling a controller implemented method. I'd m

[PATCH] cgroup: remove incorrect check on the return value of css_alloc

2018-01-22 Thread Xiongwei Song
The function css_alloc never return NULL, it may return normal pointer or error codes that made by ERR_PTR, so !css is always false, we need use IS_ERR to check it, and if this is true, we should use ERR_CAST handle it. Signed-off-by: Xiongwei Song <sxwj...@me.com> --- kernel/cgroup/cgroup

[PATCH] cgroup: remove incorrect check on the return value of css_alloc

2018-01-22 Thread Xiongwei Song
The function css_alloc never return NULL, it may return normal pointer or error codes that made by ERR_PTR, so !css is always false, we need use IS_ERR to check it, and if this is true, we should use ERR_CAST handle it. Signed-off-by: Xiongwei Song --- kernel/cgroup/cgroup.c | 4 +--- 1 file

[PATCH] xfs: destroy mutex pag_ici_reclaim_lock before free xfs_perag_t structure

2018-01-11 Thread Xiongwei Song
The mutex pag_ici_reclaim_lock of xfs_perag_t structure is initialized in xfs_initialize_perag. If happen errors in xfs_initialize_perag, or free resources in xfs_free_perag, wo need to destroy the mutex before free perag. Signed-off-by: Xiongwei Song <sxwj...@me.com> --- fs/xfs/xfs_mount

[PATCH] xfs: destroy mutex pag_ici_reclaim_lock before free xfs_perag_t structure

2018-01-11 Thread Xiongwei Song
The mutex pag_ici_reclaim_lock of xfs_perag_t structure is initialized in xfs_initialize_perag. If happen errors in xfs_initialize_perag, or free resources in xfs_free_perag, wo need to destroy the mutex before free perag. Signed-off-by: Xiongwei Song --- fs/xfs/xfs_mount.c | 3 +++ 1 file

[PATCH] ARM: locomo: fix free dev incorrectly

2018-01-09 Thread Xiongwei Song
In function locomo_init_one_child, If kzalloc call is failed for dev we would goto out label, then call kfree for dev, however, dev is NULL, we shouldn't do this. Signed-off-by: Xiongwei Song <sxwj...@me.com> --- arch/arm/common/locomo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 del

[PATCH] ARM: locomo: fix free dev incorrectly

2018-01-09 Thread Xiongwei Song
In function locomo_init_one_child, If kzalloc call is failed for dev we would goto out label, then call kfree for dev, however, dev is NULL, we shouldn't do this. Signed-off-by: Xiongwei Song --- arch/arm/common/locomo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH v2] staging: android: check the return value of register_shrinker

2018-01-04 Thread Xiongwei Song
register_shrinker call is made in ashmem_init, it may return error code, so we need to check it. Signed-off-by: Xiongwei Song <sxwj...@gmail.com> --- v1->v2: remove unlikely() --- drivers/staging/android/ashmem.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[PATCH v2] staging: android: check the return value of register_shrinker

2018-01-04 Thread Xiongwei Song
register_shrinker call is made in ashmem_init, it may return error code, so we need to check it. Signed-off-by: Xiongwei Song --- v1->v2: remove unlikely() --- drivers/staging/android/ashmem.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/staging/andr

Re: [PATCH] staging: android: check the return value of register_shrinker

2018-01-04 Thread Xiongwei Song
2018-01-04 22:55 GMT+08:00 Dan Carpenter <dan.carpen...@oracle.com>: > On Thu, Jan 04, 2018 at 08:08:53AM +0800, Xiongwei Song wrote: >> register_shrinker call is made in ashmem_init, it may return error code, >> so we need to check it. >> >> Signed-off-by:

Re: [PATCH] staging: android: check the return value of register_shrinker

2018-01-04 Thread Xiongwei Song
2018-01-04 22:55 GMT+08:00 Dan Carpenter : > On Thu, Jan 04, 2018 at 08:08:53AM +0800, Xiongwei Song wrote: >> register_shrinker call is made in ashmem_init, it may return error code, >> so we need to check it. >> >> Signed-off-by: Xiongwei Song >> --- >>

[PATCH] dm bufio: fix missed destroy of mutex c->lock

2018-01-04 Thread Xiongwei Song
The mutex c->lock is initialized in dm_bufio_client_create, however, it is not destroyed before free the structure of dm_bufio_client in dm_bufio_client_destroy. Signed-off-by: Xiongwei Song <sxwj...@gmail.com> --- drivers/md/dm-bufio.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] dm bufio: fix missed destroy of mutex c->lock

2018-01-04 Thread Xiongwei Song
The mutex c->lock is initialized in dm_bufio_client_create, however, it is not destroyed before free the structure of dm_bufio_client in dm_bufio_client_destroy. Signed-off-by: Xiongwei Song --- drivers/md/dm-bufio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-bufio.

[PATCH] staging: android: check the return value of register_shrinker

2018-01-03 Thread Xiongwei Song
register_shrinker call is made in ashmem_init, it may return error code, so we need to check it. Signed-off-by: Xiongwei Song <sxwj...@gmail.com> --- drivers/staging/android/ashmem.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ashm

[PATCH] staging: android: check the return value of register_shrinker

2018-01-03 Thread Xiongwei Song
register_shrinker call is made in ashmem_init, it may return error code, so we need to check it. Signed-off-by: Xiongwei Song --- drivers/staging/android/ashmem.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ashmem.c b/drivers/staging

Re: [PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object

2018-01-02 Thread Xiongwei Song
2018-01-03 4:38 GMT+08:00 Darrick J. Wong <darrick.w...@oracle.com>: > On Sun, Dec 24, 2017 at 08:34:47PM +0800, Xiongwei Song wrote: >> The mutex qi_tree_lock of xfs_quotainfo_t object was initialized when >> calling xfs_qm_init_quotainfo, but it was not destroyed before fr

Re: [PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object

2018-01-02 Thread Xiongwei Song
2018-01-03 4:38 GMT+08:00 Darrick J. Wong : > On Sun, Dec 24, 2017 at 08:34:47PM +0800, Xiongwei Song wrote: >> The mutex qi_tree_lock of xfs_quotainfo_t object was initialized when >> calling xfs_qm_init_quotainfo, but it was not destroyed before free >> xfs_quotainfo_

[PATCH v3] drm/ttm: check the return value of kzalloc

2018-01-02 Thread Xiongwei Song
In the function ttm_page_alloc_init, kzalloc call is made for variable _manager, we need to check its return value, it may return NULL. Signed-off-by: Xiongwei Song <sxwj...@gmail.com> --- v2->v3: delete goto expression v1->v2: delete kfree _manager --- drivers/gpu/drm/ttm/ttm_page

[PATCH v3] drm/ttm: check the return value of kzalloc

2018-01-02 Thread Xiongwei Song
In the function ttm_page_alloc_init, kzalloc call is made for variable _manager, we need to check its return value, it may return NULL. Signed-off-by: Xiongwei Song --- v2->v3: delete goto expression v1->v2: delete kfree _manager --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 ++ 1 file c

[PATCH v2] drm/ttm: check the return value of kzalloc

2018-01-02 Thread Xiongwei Song
In the function ttm_page_alloc_init, kzalloc call is made for variable _manager, we need to check its return value, it may return NULL. Signed-off-by: Xiongwei Song <sxwj...@gmail.com> --- v1->v2: delete kfree _manager --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 ++ 1 file c

[PATCH v2] drm/ttm: check the return value of kzalloc

2018-01-02 Thread Xiongwei Song
In the function ttm_page_alloc_init, kzalloc call is made for variable _manager, we need to check its return value, it may return NULL. Signed-off-by: Xiongwei Song --- v1->v2: delete kfree _manager --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 ++ 1 file changed, 6 insertions(+) diff --

[PATCH] drm/ttm: optimize errors checking and free _manager when finishing

2017-12-31 Thread Xiongwei Song
In the function ttm_page_alloc_init, kzalloc call is made for variable _manager, we need to check its return value, it may return NULL. In the function ttm_page_alloc_fini, we need to call kfree for variable _manager, instead of make _manager NULL directly. Signed-off-by: Xiongwei Song <s

[PATCH] drm/ttm: optimize errors checking and free _manager when finishing

2017-12-31 Thread Xiongwei Song
In the function ttm_page_alloc_init, kzalloc call is made for variable _manager, we need to check its return value, it may return NULL. In the function ttm_page_alloc_fini, we need to call kfree for variable _manager, instead of make _manager NULL directly. Signed-off-by: Xiongwei Song

[PATCH] staging: android: check for error from register_shrinker in ion_heap_init_shrinker

2017-12-29 Thread Xiongwei Song
The function register_shrinker in ion_heap_init_shrinker may return an error, check it out. Meanwhile, ion_heap_init_shrinker has to a return value. Signed-off-by: Xiongwei Song <sxwj...@gmail.com> --- drivers/staging/android/ion/ion.c | 8 ++-- drivers/staging/android/ion

[PATCH] staging: android: check for error from register_shrinker in ion_heap_init_shrinker

2017-12-29 Thread Xiongwei Song
The function register_shrinker in ion_heap_init_shrinker may return an error, check it out. Meanwhile, ion_heap_init_shrinker has to a return value. Signed-off-by: Xiongwei Song --- drivers/staging/android/ion/ion.c | 8 ++-- drivers/staging/android/ion/ion.h | 2 +- drivers

[PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object

2017-12-24 Thread Xiongwei Song
The mutex qi_tree_lock of xfs_quotainfo_t object was initialized when calling xfs_qm_init_quotainfo, but it was not destroyed before free xfs_quotainfo_t object when calling xfs_qm_destroy_quotainfo, this was incorrect, so destroy it in function xfs_qm_destroy_quotainfo. Signed-off-by: Xiongwei

[PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object

2017-12-24 Thread Xiongwei Song
The mutex qi_tree_lock of xfs_quotainfo_t object was initialized when calling xfs_qm_init_quotainfo, but it was not destroyed before free xfs_quotainfo_t object when calling xfs_qm_destroy_quotainfo, this was incorrect, so destroy it in function xfs_qm_destroy_quotainfo. Signed-off-by: Xiongwei

[PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static

2017-12-21 Thread Xiongwei Song
/vfio_mdev.c:121:6: warning: no previous prototype for 'vfio_mdev_remove' [-Wmissing-prototypes] Signed-off-by: Xiongwei Song <sxwj...@gmail.com> --- drivers/vfio/mdev/vfio_mdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfi

[PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static

2017-12-21 Thread Xiongwei Song
/vfio_mdev.c:121:6: warning: no previous prototype for 'vfio_mdev_remove' [-Wmissing-prototypes] Signed-off-by: Xiongwei Song --- drivers/vfio/mdev/vfio_mdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c index

[PATCH] bpf: make function xdp_do_generic_redirect_map() static

2017-12-18 Thread Xiongwei Song
The function xdp_do_generic_redirect_map() is only used in this file, so make it static. Clean up sparse warning: net/core/filter.c:2687:5: warning: no previous prototype for 'xdp_do_generic_redirect_map' [-Wmissing-prototypes] Signed-off-by: Xiongwei Song <sxwj...@gmail.com> --- ne

[PATCH] bpf: make function xdp_do_generic_redirect_map() static

2017-12-18 Thread Xiongwei Song
The function xdp_do_generic_redirect_map() is only used in this file, so make it static. Clean up sparse warning: net/core/filter.c:2687:5: warning: no previous prototype for 'xdp_do_generic_redirect_map' [-Wmissing-prototypes] Signed-off-by: Xiongwei Song --- net/core/filter.c | 5 +++-- 1

[PATCH] drm/tilcdc: make tilcdc_mode_hvtotal() static

2017-12-02 Thread Xiongwei Song
*mode) Signed-off-by: Xiongwei Song <sxwj...@gmail.com> --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 6ef4d1a..c4804d9 100644 --- a/drivers/g

[PATCH] drm/tilcdc: make tilcdc_mode_hvtotal() static

2017-12-02 Thread Xiongwei Song
*mode) Signed-off-by: Xiongwei Song --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 6ef4d1a..c4804d9 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c