Re: [PATCH] lib/sg_pool: remove unnecessary null check when free the object

2018-09-08 Thread zhong jiang
On 2018/9/8 17:46, Thomas Gleixner wrote: > On Sat, 8 Sep 2018, zhong jiang wrote: >> Hi, Thomas >> >> Can you pick up the patch? > I'm not picking up patches for lib/sg_pool. Why would I? > I am sorry for that. I regard you as maintainer for lib/sg_pool mistakely

[PATCH] s390: zfcp_aux: remove unnecessary null pointer check before mempool_destroy

2018-09-08 Thread zhong jiang
mempool_destroy has taken null pointer check into account. so remove the redundant check. Signed-off-by: zhong jiang --- drivers/s390/scsi/zfcp_aux.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi

[PATCH] s390: zfcp_aux: remove unnecessary null pointer check before mempool_destroy

2018-09-08 Thread zhong jiang
mempool_destroy has taken null pointer check into account. so remove the redundant check. Signed-off-by: zhong jiang --- drivers/s390/scsi/zfcp_aux.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi

Re: [PATCH] lib/sg_pool: remove unnecessary null check when free the object

2018-09-08 Thread zhong jiang
Hi, Thomas Can you pick up the patch? Thanks zhong jiang On 2018/8/1 0:21, zhong jiang wrote: > kmem_cache_destroy/mempool_destroy has taken null check into account. > so remove the redundant check. > > Signed-off-by: zhong jiang > --- > lib/sg_pool.c | 7 +++ &g

Re: [PATCH] lib/sg_pool: remove unnecessary null check when free the object

2018-09-08 Thread zhong jiang
Hi, Thomas Can you pick up the patch? Thanks zhong jiang On 2018/8/1 0:21, zhong jiang wrote: > kmem_cache_destroy/mempool_destroy has taken null check into account. > so remove the redundant check. > > Signed-off-by: zhong jiang > --- > lib/sg_pool.c | 7 +++ &g

[PATCH] s390/zcrypt: Use kmemdup to replace kmalloc + memcpy

2018-09-08 Thread zhong jiang
kmemdup has implemented the function that kmalloc() + memcpy() will do. and we prefer to use the kmemdup rather than the open coded implementation. Signed-off-by: zhong jiang --- drivers/s390/crypto/zcrypt_msgtype6.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git

[PATCH] s390/zcrypt: Use kmemdup to replace kmalloc + memcpy

2018-09-08 Thread zhong jiang
kmemdup has implemented the function that kmalloc() + memcpy() will do. and we prefer to use the kmemdup rather than the open coded implementation. Signed-off-by: zhong jiang --- drivers/s390/crypto/zcrypt_msgtype6.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git

[PATCH 1/2] sound: q6core: Use kmemdup to replace kzalloc + memcpy

2018-09-08 Thread zhong jiang
kmemdup has implemented the function that kzalloc() + memcpy() will do. and we prefer to use the kmemdup rather than the open coded implementation. Signed-off-by: zhong jiang --- sound/soc/qcom/qdsp6/q6core.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sound/soc

[PATCH 0/2] sound: Use kmemdup to replace kzalloc + memcpy

2018-09-08 Thread zhong jiang
I find the issue with the help of Coccinelle. zhong jiang (2): sound: q6core: Use kmemdup to replace kzalloc + memcpy sound: skl-topology: Use kmemdup to replace kzalloc + memcpy sound/soc/intel/skylake/skl-topology.c | 3 +-- sound/soc/qcom/qdsp6/q6core.c | 8 ++-- 2 files

[PATCH 1/2] sound: q6core: Use kmemdup to replace kzalloc + memcpy

2018-09-08 Thread zhong jiang
kmemdup has implemented the function that kzalloc() + memcpy() will do. and we prefer to use the kmemdup rather than the open coded implementation. Signed-off-by: zhong jiang --- sound/soc/qcom/qdsp6/q6core.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sound/soc

[PATCH 0/2] sound: Use kmemdup to replace kzalloc + memcpy

2018-09-08 Thread zhong jiang
I find the issue with the help of Coccinelle. zhong jiang (2): sound: q6core: Use kmemdup to replace kzalloc + memcpy sound: skl-topology: Use kmemdup to replace kzalloc + memcpy sound/soc/intel/skylake/skl-topology.c | 3 +-- sound/soc/qcom/qdsp6/q6core.c | 8 ++-- 2 files

[PATCH 2/2] sound: skl-topology: Use kmemdup to replace kzalloc + memcpy

2018-09-08 Thread zhong jiang
kmemdup has implemented the function that kzalloc() + memcpy() will do. and we prefer to kmemdup rather than the open coded implementation. Signed-off-by: zhong jiang --- sound/soc/intel/skylake/skl-topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/intel

[PATCH 2/2] sound: skl-topology: Use kmemdup to replace kzalloc + memcpy

2018-09-08 Thread zhong jiang
kmemdup has implemented the function that kzalloc() + memcpy() will do. and we prefer to kmemdup rather than the open coded implementation. Signed-off-by: zhong jiang --- sound/soc/intel/skylake/skl-topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/intel

Re: [PATCH] acpi: remove a meaningless null check before debugfs_remove

2018-09-06 Thread zhong jiang
+to maintainers On 2018/8/18 18:49, zhong jiang wrote: > debugfs_remove has taken null pointer into account. So it is safe > to remove the check before debugfs_remove. > > Signed-off-by: zhong jiang > --- > drivers/acpi/custom_method.c | 3 +-- > 1 file changed, 1 inse

Re: [PATCH] acpi: remove a meaningless null check before debugfs_remove

2018-09-06 Thread zhong jiang
+to maintainers On 2018/8/18 18:49, zhong jiang wrote: > debugfs_remove has taken null pointer into account. So it is safe > to remove the check before debugfs_remove. > > Signed-off-by: zhong jiang > --- > drivers/acpi/custom_method.c | 3 +-- > 1 file changed, 1 inse

[PATCH v2] drivers/thermal/tegra: Fix a double free on the device node

2018-08-27 Thread zhong jiang
-by: zhong jiang --- v1->v2: According to Daniel's suggestion. I modify the subject and commit log. drivers/thermal/tegra/soctherm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index ed28110..3aa55c9 100644 --- a/drivers/ther

[PATCH v2] drivers/thermal/tegra: Fix a double free on the device node

2018-08-27 Thread zhong jiang
-by: zhong jiang --- v1->v2: According to Daniel's suggestion. I modify the subject and commit log. drivers/thermal/tegra/soctherm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index ed28110..3aa55c9 100644 --- a/drivers/ther

Re: [PATCH] arm: pm: call put_device instead of of_node_put in at91_pm_config_ws

2018-08-23 Thread zhong jiang
On 2018/8/23 20:19, Alexandre Belloni wrote: > On 23/08/2018 19:44:38+0800, zhong jiang wrote: >> Hi, alexandre >> >> Can you pick up the patch? Thanks >> > We are still in the merge window, this has to wait for v4.19-rc1. Fine. Thank you for let me know .

Re: [PATCH] arm: pm: call put_device instead of of_node_put in at91_pm_config_ws

2018-08-23 Thread zhong jiang
On 2018/8/23 20:19, Alexandre Belloni wrote: > On 23/08/2018 19:44:38+0800, zhong jiang wrote: >> Hi, alexandre >> >> Can you pick up the patch? Thanks >> > We are still in the merge window, this has to wait for v4.19-rc1. Fine. Thank you for let me know .

Re: [PATCH] arm: pm: call put_device instead of of_node_put in at91_pm_config_ws

2018-08-23 Thread zhong jiang
Hi, alexandre Can you pick up the patch? Thanks Best wishes, zhong jiang On 2018/8/16 18:26, zhong jiang wrote: > of_find_device_by_node takes a reference to the struct device when it > finds a match via get_device. but it fails to put_device in > at91_pm_

Re: [PATCH] arm: pm: call put_device instead of of_node_put in at91_pm_config_ws

2018-08-23 Thread zhong jiang
Hi, alexandre Can you pick up the patch? Thanks Best wishes, zhong jiang On 2018/8/16 18:26, zhong jiang wrote: > of_find_device_by_node takes a reference to the struct device when it > finds a match via get_device. but it fails to put_device in > at91_pm_

Re: [PATCH v2] scsi: Use vmemdup_user to replace the open code

2018-08-23 Thread zhong jiang
On 2018/8/13 22:20, don.br...@microchip.com wrote: >> -Original Message- >> From: zhong jiang [mailto:zhongji...@huawei.com] >> Sent: Monday, August 13, 2018 7:43 AM >> To: don.br...@microsemi.com; j...@linux.vnet.ibm.com; >> martin.peter...@oracle.com >&

Re: [PATCH v2] scsi: Use vmemdup_user to replace the open code

2018-08-23 Thread zhong jiang
On 2018/8/13 22:20, don.br...@microchip.com wrote: >> -Original Message- >> From: zhong jiang [mailto:zhongji...@huawei.com] >> Sent: Monday, August 13, 2018 7:43 AM >> To: don.br...@microsemi.com; j...@linux.vnet.ibm.com; >> martin.peter...@oracle.com >&

Re: [PATCHv2 0/2] phy: Use PTR_ERR_OR_ZERO to replace the open coded version

2018-08-23 Thread zhong jiang
Ping , Anyone has any objection with the patchset ? Thanks, zhong jiang On 2018/8/16 23:58, zhong jiang wrote: > The issue is detected with the help of Coccinelle. > > v1->v2: > - According to Florian's suggestion, change the subject of the patch. > > zhong jiang (2): >

Re: [PATCHv2 0/2] phy: Use PTR_ERR_OR_ZERO to replace the open coded version

2018-08-23 Thread zhong jiang
Ping , Anyone has any objection with the patchset ? Thanks, zhong jiang On 2018/8/16 23:58, zhong jiang wrote: > The issue is detected with the help of Coccinelle. > > v1->v2: > - According to Florian's suggestion, change the subject of the patch. > > zhong jiang (2): >

Re: [PATCH] staging: rtl8188eu: Type cast function argument

2018-08-18 Thread zhong jiang
turn; > > - eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, > EFUSE_MAX_WORD_UNIT, sizeof(u16)); > + eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, > + EFUSE_MAX_WORD_UNIT, (int)sizeof(u16)); > You should be align with left parenthesis. Thanks,

Re: [PATCH] staging: rtl8188eu: Type cast function argument

2018-08-18 Thread zhong jiang
turn; > > - eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, > EFUSE_MAX_WORD_UNIT, sizeof(u16)); > + eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, > + EFUSE_MAX_WORD_UNIT, (int)sizeof(u16)); > You should be align with left parenthesis. Thanks,

Re: [PATCH] Coccinelle: remove pci_alloc_consistent semantic to dectect in zalloc-simple.cocci

2018-08-18 Thread zhong jiang
On 2018/8/18 22:01, Julia Lawall wrote: > > On Sat, 18 Aug 2018, zhong jiang wrote: > >> On 2018/8/18 20:52, Himanshu Jha wrote: >>> On Sat, Aug 18, 2018 at 08:01:40PM +0800, zhong jiang wrote: >>>> Because pci_alloc_consistent has been deprecated. We prefer to

Re: [PATCH] Coccinelle: remove pci_alloc_consistent semantic to dectect in zalloc-simple.cocci

2018-08-18 Thread zhong jiang
On 2018/8/18 22:01, Julia Lawall wrote: > > On Sat, 18 Aug 2018, zhong jiang wrote: > >> On 2018/8/18 20:52, Himanshu Jha wrote: >>> On Sat, Aug 18, 2018 at 08:01:40PM +0800, zhong jiang wrote: >>>> Because pci_alloc_consistent has been deprecated. We prefer to

[PATCHv2] Coccinelle: remove pci_alloc_consistent semantic to detect in zalloc-simple.cocci

2018-08-18 Thread zhong jiang
Because pci_alloc_consistent has been deprecated. We prefer to use dma_alloc_coherent directly. Therefore, we should remove pci_alloc_consistent to increase the confidence. Acked-by: Julia Lawall Acked-by: Himanshu Jha Signed-off-by: zhong jiang --- v1->v2: - fix some spelling mista

[PATCHv2] Coccinelle: remove pci_alloc_consistent semantic to detect in zalloc-simple.cocci

2018-08-18 Thread zhong jiang
Because pci_alloc_consistent has been deprecated. We prefer to use dma_alloc_coherent directly. Therefore, we should remove pci_alloc_consistent to increase the confidence. Acked-by: Julia Lawall Acked-by: Himanshu Jha Signed-off-by: zhong jiang --- v1->v2: - fix some spelling mista

Re: [PATCH] Coccinelle: remove pci_alloc_consistent semantic to dectect in zalloc-simple.cocci

2018-08-18 Thread zhong jiang
On 2018/8/18 20:52, Himanshu Jha wrote: > On Sat, Aug 18, 2018 at 08:01:40PM +0800, zhong jiang wrote: >> Because pci_alloc_consistent has been deprecated. We prefer to use >> dam_alloc_coherent directly. Therefore, we should remove pci_alloc_consistent > ^^^ typo &q

Re: [PATCH] Coccinelle: remove pci_alloc_consistent semantic to dectect in zalloc-simple.cocci

2018-08-18 Thread zhong jiang
On 2018/8/18 20:52, Himanshu Jha wrote: > On Sat, Aug 18, 2018 at 08:01:40PM +0800, zhong jiang wrote: >> Because pci_alloc_consistent has been deprecated. We prefer to use >> dam_alloc_coherent directly. Therefore, we should remove pci_alloc_consistent > ^^^ typo &q

[PATCH] Coccinelle: remove pci_alloc_consistent semantic to dectect in zalloc-simple.cocci

2018-08-18 Thread zhong jiang
Because pci_alloc_consistent has been deprecated. We prefer to use dam_alloc_coherent directly. Therefore, we should remove pci_alloc_consistent to increase the confidence. Signed-off-by: zhong jiang --- scripts/coccinelle/api/alloc/zalloc-simple.cocci | 41 +--- 1 file

[PATCH] Coccinelle: remove pci_alloc_consistent semantic to dectect in zalloc-simple.cocci

2018-08-18 Thread zhong jiang
Because pci_alloc_consistent has been deprecated. We prefer to use dam_alloc_coherent directly. Therefore, we should remove pci_alloc_consistent to increase the confidence. Signed-off-by: zhong jiang --- scripts/coccinelle/api/alloc/zalloc-simple.cocci | 41 +--- 1 file

[PATCH] gpu: Use ERR_CAST to replace ERR_PTR(PTR_ERR())

2018-08-18 Thread zhong jiang
We prefer to ERR_CAST rather than ERR_PTR(PTR_ERR()), So just replace it. The issue is detected with the help of Coccinelle Signed-off-by: zhong jiang --- drivers/gpu/drm/omapdrm/dss/dss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b

[PATCH] gpu: Use ERR_CAST to replace ERR_PTR(PTR_ERR())

2018-08-18 Thread zhong jiang
We prefer to ERR_CAST rather than ERR_PTR(PTR_ERR()), So just replace it. The issue is detected with the help of Coccinelle Signed-off-by: zhong jiang --- drivers/gpu/drm/omapdrm/dss/dss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b

[PATCH] acpi: remove a meaningless null check before debugfs_remove

2018-08-18 Thread zhong jiang
debugfs_remove has taken null pointer into account. So it is safe to remove the check before debugfs_remove. Signed-off-by: zhong jiang --- drivers/acpi/custom_method.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/acpi/custom_method.c b/drivers/acpi

[PATCH] acpi: remove a meaningless null check before debugfs_remove

2018-08-18 Thread zhong jiang
debugfs_remove has taken null pointer into account. So it is safe to remove the check before debugfs_remove. Signed-off-by: zhong jiang --- drivers/acpi/custom_method.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/acpi/custom_method.c b/drivers/acpi

[PATCHv2] ide: Use NULL to compare with pointer-typed value rather than 0

2018-08-18 Thread zhong jiang
We should use NULL to compare with pointer-typed value rather than 0. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- drivers/ide/pmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index c5b902b

[PATCHv2] ide: Use NULL to compare with pointer-typed value rather than 0

2018-08-18 Thread zhong jiang
We should use NULL to compare with pointer-typed value rather than 0. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- drivers/ide/pmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index c5b902b

Re: [PATCH] ide: Use NULL to compare with pointer-typed value rather than 0

2018-08-18 Thread zhong jiang
On 2018/8/17 21:23, zhong jiang wrote: > We should use NULL to compare with pointer-typed value rather than > 0. The issue is detected with the help of Coccinelle. > > Signed-off-by: zhong jiang > --- > drivers/ide/pmac.c | 2 +- > 1 file changed, 1 insertion(+), 1 delet

Re: [PATCH] ide: Use NULL to compare with pointer-typed value rather than 0

2018-08-18 Thread zhong jiang
On 2018/8/17 21:23, zhong jiang wrote: > We should use NULL to compare with pointer-typed value rather than > 0. The issue is detected with the help of Coccinelle. > > Signed-off-by: zhong jiang > --- > drivers/ide/pmac.c | 2 +- > 1 file changed, 1 insertion(+), 1 delet

[PATCH] ide: Use NULL to compare with pointer-typed value rather than 0

2018-08-17 Thread zhong jiang
We should use NULL to compare with pointer-typed value rather than 0. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- drivers/ide/pmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index c5b902b

[PATCH] ide: Use NULL to compare with pointer-typed value rather than 0

2018-08-17 Thread zhong jiang
We should use NULL to compare with pointer-typed value rather than 0. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- drivers/ide/pmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index c5b902b

[PATCH] thunderbolt: remove a meaningless null pointer check before dma_pool_destroy

2018-08-17 Thread zhong jiang
dma_pool_destroy has taken the null pointer into account. so just remove the null pointer check. Signed-off-by: zhong jiang --- drivers/thunderbolt/ctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c index 37a7f4c

[PATCH] thunderbolt: remove a meaningless null pointer check before dma_pool_destroy

2018-08-17 Thread zhong jiang
dma_pool_destroy has taken the null pointer into account. so just remove the null pointer check. Signed-off-by: zhong jiang --- drivers/thunderbolt/ctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c index 37a7f4c

Re: [PATCH] media: NULL check is meaningless before debugfs_remove_recursive

2018-08-17 Thread zhong jiang
On 2018/8/17 17:18, Laurent Pinchart wrote: > Hi Zhong, > > Thank you for the patch. > > On Friday, 17 August 2018 06:37:26 EEST zhong jiang wrote: >> debugfs_remove_recursive has taken null pointer into account. so >> remove the unneeded check. >> >> Signe

Re: [PATCH] media: NULL check is meaningless before debugfs_remove_recursive

2018-08-17 Thread zhong jiang
On 2018/8/17 17:18, Laurent Pinchart wrote: > Hi Zhong, > > Thank you for the patch. > > On Friday, 17 August 2018 06:37:26 EEST zhong jiang wrote: >> debugfs_remove_recursive has taken null pointer into account. so >> remove the unneeded check. >> >> Signe

Re: [PATCH] misc: remove meanless null check before kfree

2018-08-16 Thread zhong jiang
On 2018/8/17 11:24, zhong jiang wrote: > kfree has taken null pointer into account. so check the null pointer > before kfree is meanless. meanless/meaningless. will repost. please ignore the patch, thanks. > Signed-off-by: zhong jiang > --- > drivers/misc/sgi-xp/xpc_partition

Re: [PATCH] misc: remove meanless null check before kfree

2018-08-16 Thread zhong jiang
On 2018/8/17 11:24, zhong jiang wrote: > kfree has taken null pointer into account. so check the null pointer > before kfree is meanless. meanless/meaningless. will repost. please ignore the patch, thanks. > Signed-off-by: zhong jiang > --- > drivers/misc/sgi-xp/xpc_partition

[PATCH] misc: remove meaningless null check before kfree

2018-08-16 Thread zhong jiang
kfree has taken null pointer into account. so check the null pointer before kfree is meaningless. Signed-off-by: zhong jiang --- drivers/misc/sgi-xp/xpc_partition.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp

[PATCH] misc: remove meaningless null check before kfree

2018-08-16 Thread zhong jiang
kfree has taken null pointer into account. so check the null pointer before kfree is meaningless. Signed-off-by: zhong jiang --- drivers/misc/sgi-xp/xpc_partition.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp

Re: [PATCH] drviers: intel_ips: remove the unneeded null pointer check before debugfs_remove_recursive

2018-08-16 Thread zhong jiang
subect: drviers/drivers will repost, please ingore the patch. Thanks On 2018/8/17 11:31, zhong jiang wrote: > debugfs_remove_recursive has taken the null pointer into account. > just remove the null check before debugfs_remove_recursive. > > Signed-off-by: zhong jiang > --- >

Re: [PATCH] drviers: intel_ips: remove the unneeded null pointer check before debugfs_remove_recursive

2018-08-16 Thread zhong jiang
subect: drviers/drivers will repost, please ingore the patch. Thanks On 2018/8/17 11:31, zhong jiang wrote: > debugfs_remove_recursive has taken the null pointer into account. > just remove the null check before debugfs_remove_recursive. > > Signed-off-by: zhong jiang > --- >

[PATCH] media: NULL check is meaningless before debugfs_remove_recursive

2018-08-16 Thread zhong jiang
debugfs_remove_recursive has taken null pointer into account. so remove the unneeded check. Signed-off-by: zhong jiang --- drivers/media/usb/uvc/uvc_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_debugfs.c b/drivers/media/usb/uvc

[PATCH] media: NULL check is meaningless before debugfs_remove_recursive

2018-08-16 Thread zhong jiang
debugfs_remove_recursive has taken null pointer into account. so remove the unneeded check. Signed-off-by: zhong jiang --- drivers/media/usb/uvc/uvc_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_debugfs.c b/drivers/media/usb/uvc

[PATCH] drivers: intel_ips: remove the unneeded null pointer check before debugfs_remove_recursive

2018-08-16 Thread zhong jiang
debugfs_remove_recursive has taken the null pointer into account. just remove the null check before debugfs_remove_recursive. Signed-off-by: zhong jiang --- drivers/platform/x86/intel_ips.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/x86/intel_ips.c b

[PATCH] drivers: intel_ips: remove the unneeded null pointer check before debugfs_remove_recursive

2018-08-16 Thread zhong jiang
debugfs_remove_recursive has taken the null pointer into account. just remove the null check before debugfs_remove_recursive. Signed-off-by: zhong jiang --- drivers/platform/x86/intel_ips.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/x86/intel_ips.c b

[PATCH] drviers: intel_ips: remove the unneeded null pointer check before debugfs_remove_recursive

2018-08-16 Thread zhong jiang
debugfs_remove_recursive has taken the null pointer into account. just remove the null check before debugfs_remove_recursive. Signed-off-by: zhong jiang --- drivers/platform/x86/intel_ips.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/x86/intel_ips.c b

[PATCH] drviers: intel_ips: remove the unneeded null pointer check before debugfs_remove_recursive

2018-08-16 Thread zhong jiang
debugfs_remove_recursive has taken the null pointer into account. just remove the null check before debugfs_remove_recursive. Signed-off-by: zhong jiang --- drivers/platform/x86/intel_ips.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/x86/intel_ips.c b

[PATCH] misc: remove meanless null check before kfree

2018-08-16 Thread zhong jiang
kfree has taken null pointer into account. so check the null pointer before kfree is meanless. Signed-off-by: zhong jiang --- drivers/misc/sgi-xp/xpc_partition.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp

[PATCH] misc: remove meanless null check before kfree

2018-08-16 Thread zhong jiang
kfree has taken null pointer into account. so check the null pointer before kfree is meanless. Signed-off-by: zhong jiang --- drivers/misc/sgi-xp/xpc_partition.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp

Re: [PATCH] drivers/thermal/tegra: fix a doule free devce node

2018-08-16 Thread zhong jiang
On 2018/8/14 14:39, Daniel Lezcano wrote: > On 09/08/2018 15:40, zhong jiang wrote: >> Device node iterators will get the return node. Meawhile, It is >> also put the previous device node. An explicit put will cause >> a double put. > What about: > > Subject: drive

Re: [PATCH] drivers/thermal/tegra: fix a doule free devce node

2018-08-16 Thread zhong jiang
On 2018/8/14 14:39, Daniel Lezcano wrote: > On 09/08/2018 15:40, zhong jiang wrote: >> Device node iterators will get the return node. Meawhile, It is >> also put the previous device node. An explicit put will cause >> a double put. > What about: > > Subject: drive

[PATCHv2 1/2] phy:phy-brcm-usb: Use PTR_ERR_OR_ZERO to replace the open coded version

2018-08-16 Thread zhong jiang
PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang --- drivers/phy/broadcom/phy-brcm-usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/phy/broadcom/phy-brcm

[PATCHv2 1/2] phy:phy-brcm-usb: Use PTR_ERR_OR_ZERO to replace the open coded version

2018-08-16 Thread zhong jiang
PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang --- drivers/phy/broadcom/phy-brcm-usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/phy/broadcom/phy-brcm

[PATCHv2 2/2] phy:phy-lantiq-rcu-usb2: Use PTR_ERR_OR_ZERO to replace the open coded version

2018-08-16 Thread zhong jiang
PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang --- drivers/phy/lantiq/phy-lantiq-rcu-usb2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/phy/lantiq/phy-lantiq

[PATCHv2 0/2] phy: Use PTR_ERR_OR_ZERO to replace the open coded version

2018-08-16 Thread zhong jiang
The issue is detected with the help of Coccinelle. v1->v2: - According to Florian's suggestion, change the subject of the patch. zhong jiang (2): phy:phy-brcm-usb: Use PTR_ERR_OR_ZERO to replace the open coded version phy:phy-lantiq-rcu-usb2: Use PTR_ERR_OR_ZERO to replace the o

[PATCHv2 2/2] phy:phy-lantiq-rcu-usb2: Use PTR_ERR_OR_ZERO to replace the open coded version

2018-08-16 Thread zhong jiang
PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang --- drivers/phy/lantiq/phy-lantiq-rcu-usb2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/phy/lantiq/phy-lantiq

[PATCHv2 0/2] phy: Use PTR_ERR_OR_ZERO to replace the open coded version

2018-08-16 Thread zhong jiang
The issue is detected with the help of Coccinelle. v1->v2: - According to Florian's suggestion, change the subject of the patch. zhong jiang (2): phy:phy-brcm-usb: Use PTR_ERR_OR_ZERO to replace the open coded version phy:phy-lantiq-rcu-usb2: Use PTR_ERR_OR_ZERO to replace the o

[PATCH] arm: pm: call put_device instead of of_node_put in at91_pm_config_ws

2018-08-16 Thread zhong jiang
instead of of_node_put in at91_pm_config_ws. Fixes: d7484f5c6b3b ("ARM: at91: pm: configure wakeup sources for ULP1 mode") Suggested-by: Claudiu Beznea Signed-off-by: zhong jiang --- arch/arm/mach-at91/pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm

[PATCH] arm: pm: call put_device instead of of_node_put in at91_pm_config_ws

2018-08-16 Thread zhong jiang
instead of of_node_put in at91_pm_config_ws. Fixes: d7484f5c6b3b ("ARM: at91: pm: configure wakeup sources for ULP1 mode") Suggested-by: Claudiu Beznea Signed-off-by: zhong jiang --- arch/arm/mach-at91/pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm

Re: [PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-16 Thread zhong jiang
On 2018/8/16 17:32, Claudiu Beznea wrote: > Hi Alexandre, > > On 14.08.2018 15:59, Alexandre Belloni wrote: >> On 14/08/2018 09:54:56+0800, zhong jiang wrote: >>> Device node iterators put the previous value of the index variable, >>> so an explicit put

Re: [PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-16 Thread zhong jiang
On 2018/8/16 17:32, Claudiu Beznea wrote: > Hi Alexandre, > > On 14.08.2018 15:59, Alexandre Belloni wrote: >> On 14/08/2018 09:54:56+0800, zhong jiang wrote: >>> Device node iterators put the previous value of the index variable, >>> so an explicit put

Re: [PATCH 1/2] phy:phy-brcm-us: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-15 Thread zhong jiang
On 2018/8/16 7:23, Florian Fainelli wrote: > On 08/13/2018 04:24 AM, zhong jiang wrote: >> PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So >> just replace them rather than duplicating its implement. > Subject should be: > > phy: phy-brcm-usb: Use PTR_ERR

Re: [PATCH 1/2] phy:phy-brcm-us: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-15 Thread zhong jiang
On 2018/8/16 7:23, Florian Fainelli wrote: > On 08/13/2018 04:24 AM, zhong jiang wrote: >> PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So >> just replace them rather than duplicating its implement. > Subject should be: > > phy: phy-brcm-usb: Use PTR_ERR

Re: [PATCH 1/2] rtc:rtc-digicolor: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-15 Thread zhong jiang
On 2018/8/15 0:15, Alexandre Belloni wrote: > Hi, > > On 13/08/2018 19:31:24+0800, zhong jiang wrote: >> PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So >> just replace them rather than duplicating its implement. >> >> Signed-off-by: zhong

Re: [PATCH 1/2] rtc:rtc-digicolor: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-15 Thread zhong jiang
On 2018/8/15 0:15, Alexandre Belloni wrote: > Hi, > > On 13/08/2018 19:31:24+0800, zhong jiang wrote: >> PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So >> just replace them rather than duplicating its implement. >> >> Signed-off-by: zhong

[PATCH v2] ia64: Use ARRAY_SIZE to replace its implementation

2018-08-14 Thread zhong jiang
We prefer to ARRAY_SIZE rather than duplicating its implementation. And just one place use the #define variable, therefore, remove PFM_CMD_COUNT definition altogether. Signed-off-by: zhong jiang --- v1->v2: - According to Joe's suggestion. remove the #define variable, and use ARRAY_S

[PATCH v2] ia64: Use ARRAY_SIZE to replace its implementation

2018-08-14 Thread zhong jiang
We prefer to ARRAY_SIZE rather than duplicating its implementation. And just one place use the #define variable, therefore, remove PFM_CMD_COUNT definition altogether. Signed-off-by: zhong jiang --- v1->v2: - According to Joe's suggestion. remove the #define variable, and use ARRAY_S

Re: [PATCH] drivers/thermal/tegra: fix a doule free devce node

2018-08-14 Thread zhong jiang
On 2018/8/14 14:39, Daniel Lezcano wrote: > On 09/08/2018 15:40, zhong jiang wrote: >> Device node iterators will get the return node. Meawhile, It is >> also put the previous device node. An explicit put will cause >> a double put. > What about: > > Subject: drive

Re: [PATCH] drivers/thermal/tegra: fix a doule free devce node

2018-08-14 Thread zhong jiang
On 2018/8/14 14:39, Daniel Lezcano wrote: > On 09/08/2018 15:40, zhong jiang wrote: >> Device node iterators will get the return node. Meawhile, It is >> also put the previous device node. An explicit put will cause >> a double put. > What about: > > Subject: drive

[PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-13 Thread zhong jiang
Device node iterators put the previous value of the index variable, so an explicit put causes a double put. I detect the issue with the help of Coccinelle. Signed-off-by: zhong jiang --- arch/arm/mach-at91/pm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm

[PATCH] arm/mach-at91/pm: Do not double put the device node

2018-08-13 Thread zhong jiang
Device node iterators put the previous value of the index variable, so an explicit put causes a double put. I detect the issue with the help of Coccinelle. Signed-off-by: zhong jiang --- arch/arm/mach-at91/pm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm

Re: [PATCH] arm:pm: Use kmemdup to replace duplicating its implementation

2018-08-13 Thread zhong jiang
On 2018/8/13 20:28, Vladimir Zapolskiy wrote: > Hi zhong jiang, > > On 08/10/2018 05:40 AM, zhong jiang wrote: >> kmemdup is better than kmalloc() + memcpy(), and we do not like >> open code. So just use kmemdup instead. >> >> Signed-off-by: zhong jiang >>

Re: [PATCH] arm:pm: Use kmemdup to replace duplicating its implementation

2018-08-13 Thread zhong jiang
On 2018/8/13 20:28, Vladimir Zapolskiy wrote: > Hi zhong jiang, > > On 08/10/2018 05:40 AM, zhong jiang wrote: >> kmemdup is better than kmalloc() + memcpy(), and we do not like >> open code. So just use kmemdup instead. >> >> Signed-off-by: zhong jiang >>

[PATCH v2] scsi: Use vmemdup_user to replace the open code

2018-08-13 Thread zhong jiang
vmemdup_user is better than duplicating its implementation, So just replace the open code. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- drivers/scsi/hpsa.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/hpsa.c

[PATCH v2] scsi: Use vmemdup_user to replace the open code

2018-08-13 Thread zhong jiang
vmemdup_user is better than duplicating its implementation, So just replace the open code. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- drivers/scsi/hpsa.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/hpsa.c

Re: [PATCH] scsi: Use vmemdup_user to replace the open code

2018-08-13 Thread zhong jiang
Please ignore the patch, will repost . Thanks On 2018/8/13 20:22, zhong jiang wrote: > vmemdup_user is better than duplicating its implementation, So just > replace the open code. > > Signed-off-by: zhong jiang > --- > drivers/scsi/hpsa.c | 10 +++--- > 1 file change

Re: [PATCH] scsi: Use vmemdup_user to replace the open code

2018-08-13 Thread zhong jiang
Please ignore the patch, will repost . Thanks On 2018/8/13 20:22, zhong jiang wrote: > vmemdup_user is better than duplicating its implementation, So just > replace the open code. > > Signed-off-by: zhong jiang > --- > drivers/scsi/hpsa.c | 10 +++--- > 1 file change

[PATCH] scsi: Use vmemdup_user to replace the open code

2018-08-13 Thread zhong jiang
vmemdup_user is better than duplicating its implementation, So just replace the open code. Signed-off-by: zhong jiang --- drivers/scsi/hpsa.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 58bb70b..948576a 100644

[PATCH] scsi: Use vmemdup_user to replace the open code

2018-08-13 Thread zhong jiang
vmemdup_user is better than duplicating its implementation, So just replace the open code. Signed-off-by: zhong jiang --- drivers/scsi/hpsa.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 58bb70b..948576a 100644

[PATCH 1/2] rtc:rtc-digicolor: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-13 Thread zhong jiang
PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang --- drivers/rtc/rtc-digicolor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-digicolor.c b/drivers/rtc

[PATCH 2/2] rtc:rtc-ds1347: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-13 Thread zhong jiang
PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang --- drivers/rtc/rtc-ds1347.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc

[PATCH 1/2] rtc:rtc-digicolor: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-13 Thread zhong jiang
PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang --- drivers/rtc/rtc-digicolor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-digicolor.c b/drivers/rtc

[PATCH 2/2] rtc:rtc-ds1347: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-13 Thread zhong jiang
PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang --- drivers/rtc/rtc-ds1347.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc

[PATCH 0/2] rtc: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-13 Thread zhong jiang
The issue is detected with the help of Coccinelle. zhong jiang (2): rtc:rtc-digicolor: Use PTR_ERR_OR_ZERO to replace the open code rtc:rtc-ds1347: Use PTR_ERR_OR_ZERO to replace the open code drivers/rtc/rtc-digicolor.c | 4 +--- drivers/rtc/rtc-ds1347.c| 5 + 2 files changed, 2

[PATCH 0/2] rtc: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-13 Thread zhong jiang
The issue is detected with the help of Coccinelle. zhong jiang (2): rtc:rtc-digicolor: Use PTR_ERR_OR_ZERO to replace the open code rtc:rtc-ds1347: Use PTR_ERR_OR_ZERO to replace the open code drivers/rtc/rtc-digicolor.c | 4 +--- drivers/rtc/rtc-ds1347.c| 5 + 2 files changed, 2

[PATCH 1/2] phy:phy-brcm-us: Use PTR_ERR_OR_ZERO to replace the open code

2018-08-13 Thread zhong jiang
PTR_ERR_OR_ZERO has implemented the if(IS_ERR(...)) + PTR_ERR, So just replace them rather than duplicating its implement. Signed-off-by: zhong jiang --- drivers/phy/broadcom/phy-brcm-usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/phy/broadcom/phy-brcm

<    1   2   3   4   5   6   7   8   >