Re: [PATCH] mm: use this_cpu_cmpxchg_double in put_cpu_partial

2018-11-19 Thread zhong jiang
to call for ideas. Have you hit the really issue or just review the code ? I did hit the issue and fixed in the upstream patch unpredictably by the following patch. e5d9998f3e09 ("slub: make ->cpu_partial unsigned int") Thanks, zhong jiang > Signed-off-by: Wengang Wang > --- >

Re: [Question] There is a thp count left when the process exits

2018-11-08 Thread zhong jiang
+LKML I can not find the possibility when I check the code. because the mmap_sem and spin_lock will protect the concurrence. I will be appreciated if anyone has some clue. Thanks, zhong jiang On 2018/11/8 23:01, zhong jiang wrote: > Hi, > > Recently, I hit the following issue

[PATCH] pch_uart: remove set but not used variable 'tx_empty'

2018-10-23 Thread zhong jiang
tx_empty is not used after setting its value. It is safe to remove the unused variable. Signed-off-by: zhong jiang --- drivers/tty/serial/pch_uart.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index cb85002..9ed121f 100644

[PATCH] cdrom: remove set but not used variable 'tocuse'

2018-10-23 Thread zhong jiang
tocuse is not used after setting its value. It is safe to remove the unused variable. Signed-off-by: zhong jiang --- drivers/cdrom/gdrom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index 757e85b..b45c543 100644

[RESEND PATCHv2] misc: cxl: Fix possible null pointer dereference

2018-10-03 Thread zhong jiang
It is not safe to dereference an object before a null test. It is not needed and just remove them. Ftrace can be used instead. Signed-off-by: zhong jiang --- drivers/misc/cxl/guest.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c index

Re: [PATCHv2] misc: cxl: delete possible null pointer dereference

2018-10-03 Thread zhong jiang
On 2018/10/4 12:38, Greg KH wrote: > On Thu, Oct 04, 2018 at 10:56:48AM +0800, zhong jiang wrote: >> It is safe to dereference an object below a NULL test. For the sake >> of debugging. Just delete the call of possible null pointer dereference. >> >> Signed-off-by: zhon

[PATCHv2] misc: cxl: delete possible null pointer dereference

2018-10-03 Thread zhong jiang
It is safe to dereference an object below a NULL test. For the sake of debugging. Just delete the call of possible null pointer dereference. Signed-off-by: zhong jiang --- drivers/misc/cxl/guest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cxl/guest.c b

Re: [PATCH] misc: cxl: Move a deference below a NULL test

2018-10-03 Thread zhong jiang
On 2018/10/3 6:55, Greg KH wrote: > On Wed, Sep 26, 2018 at 07:41:12PM +0800, zhong jiang wrote: >> It is safe to move a deference below a NULL test. >> >> Signed-off-by: zhong jiang >> Acked-by: Andrew Donnellan >> --- >> drivers/misc/cxl/guest.c | 4 ++--

[STABLE PATCH] slub: make ->cpu_partial unsigned int

2018-09-30 Thread zhong jiang
Cc: # 4.4.x Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: zhong jiang --- include/linux/slub_def.h | 3 ++- mm/slub.c| 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h in

[PATCH v2] ASoC: wm8731: Fix a unused function gcc warning

2018-09-29 Thread zhong jiang
Fix the following compile warning: sound/soc/codecs/wm8731.c:575:12: warning: 'wm8731_request_supplies' defined but not used [-Wunused-function] sound/soc/codecs/wm8731.c:600:12: warning: 'wm8731_hw_init' defined but not used [-Wunused-function] Signed-off-by: zhong jiang --- v1->v2: - M

Re: [PATCH] ASoC: wm8731: Fix a unused function gcc warning

2018-09-29 Thread zhong jiang
On 2018/9/30 10:17, Joe Perches wrote: > On Sun, 2018-09-30 at 09:45 +0800, zhong jiang wrote: >> Fix the following compile warning: >> >> sound/soc/codecs/wm8731.c:575:12: warning: 'wm8731_request_supplies' defined >> but not used [-Wunused-function] >> sound/so

[PATCH] ASoC: wm8731: Fix a unused function gcc warning

2018-09-29 Thread zhong jiang
Fix the following compile warning: sound/soc/codecs/wm8731.c:575:12: warning: 'wm8731_request_supplies' defined but not used [-Wunused-function] sound/soc/codecs/wm8731.c:600:12: warning: 'wm8731_hw_init' defined but not used [-Wunused-function] Signed-off-by: zhong jiang --- sound/soc

[PATCH] fs/dax.c: Use vmf_error() helper

2018-09-28 Thread zhong jiang
These codes can be replaced with new inline vmf_error(). Signed-off-by: zhong jiang --- fs/dax.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index b68ce48..e732f70 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1311,9 +1311,8 @@ static vm_fault_t

Re: [STABLE PATCH] slub: make ->cpu_partial unsigned int

2018-09-28 Thread zhong jiang
On 2018/9/27 23:46, Greg KH wrote: > On Thu, Sep 27, 2018 at 10:43:40PM +0800, zhong jiang wrote: >> From: Alexey Dobriyan >> >> /* >> * cpu_partial determined the maximum number of objects >> * kept in the per cpu partial lists of a proc

Re: [PATCH] ieee802154: remove a redundant local variable 'i'

2018-09-28 Thread zhong jiang
On 2018/9/27 22:47, Stefan Schmidt wrote: > Hello. > > On 19/09/2018 16:41, zhong jiang wrote: >> The local variable 'i' is never used after being assigned. >> hence it should be redundant adn can be removed. >> >> Signed-off-by: zhong jiang >> --- >>

[STABLE PATCH] slub: make ->cpu_partial unsigned int

2018-09-27 Thread zhong jiang
tch is a effective bugfix. It should go into stable. Signed-off-by: Alexey Dobriyan Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: sta...@vger.kernel.org Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: zhong jiang --- incl

[RESEND PATCH v2] misc: card_utils: remove duplicated include file

2018-09-27 Thread zhong jiang
delay.h and dma-mapping.h have duplicated include. hence just remove redundant file. Signed-off-by: zhong jiang --- v1->v2: - modify the subject drivers/misc/genwqe/card_utils.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/misc/genwqe/card_utils.c b/drivers/misc/gen

Re: [PATCHv2] misc: genwqe: remove duplicated include and order header files alphabetically in card_utils.c

2018-09-26 Thread zhong jiang
On 2018/9/26 11:05, zhong jiang wrote: > dma-mapping.h and delay.h have included twice. It is unnecessary. Meanwhile, > Arrange header files in alphabetical sequence to improve readability. > > Signed-off-by: zhong jiang > --- > drivers/misc/genwqe/card_utils.c | 22 +

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 v2] NFC: st-nci: remove a redundant null pointer check

2018-09-26 Thread zhong jiang
On 2018/9/26 22:03, Andy Shevchenko wrote: > On Wed, Sep 26, 2018 at 08:30:50PM +0800, zhong jiang wrote: >> The dev is impossible is NULL. hence the check is redundant. We >> never will hit it. >> > Reviewed-by: Andy Shevchenko Thanks. >> Signed-off-by:

[PATCH] misc: cxl: Move a deference below a NULL test

2018-09-26 Thread zhong jiang
It is safe to move a deference below a NULL test. Signed-off-by: zhong jiang --- drivers/misc/cxl/guest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c index 3bc0c15..559e835 100644 --- a/drivers/misc/cxl/guest.c

[PATCHv2] misc: genwqe: remove duplicated include and order header files alphabetically in card_utils.c

2018-09-25 Thread zhong jiang
dma-mapping.h and delay.h have included twice. It is unnecessary. Meanwhile, Arrange header files in alphabetical sequence to improve readability. Signed-off-by: zhong jiang --- drivers/misc/genwqe/card_utils.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff

Re: [PATCH] media: card_utils: remove duplicated include file

2018-09-25 Thread zhong jiang
On 2018/9/26 2:20, Greg KH wrote: > On Thu, Sep 20, 2018 at 01:04:02PM +0800, zhong jiang wrote: >> delay.h and dma-mapping.h have duplicated include. hence just remove >> redundant file. >> >> Signed-off-by: zhong jiang >> --- >> drivers/misc/genwqe/ca

Re: [PATCH] soc: qcom: qdsp6: remove duplicated include from q6adm.c

2018-09-25 Thread zhong jiang
On 2018/9/22 0:22, Mark Brown wrote: > On Fri, Sep 21, 2018 at 06:24:58PM +0800, zhong jiang wrote: >> We include wait.h twice in q6adm.c. it is unnecessary. hence remove >> it. Further, order the include files as alphabet. > Please use subject lines matching the style

[tip:x86/pti] x86/CPU: Fix unused variable warning when !CONFIG_IA32_EMULATION

2018-09-22 Thread tip-bot for zhong jiang
Commit-ID: 8e6b65a1b6cd1711d3acd2aa5c60d38c3e15dabb Gitweb: https://git.kernel.org/tip/8e6b65a1b6cd1711d3acd2aa5c60d38c3e15dabb Author: zhong jiang AuthorDate: Thu, 13 Sep 2018 10:49:45 +0800 Committer: Borislav Petkov CommitDate: Sat, 15 Sep 2018 14:57:05 +0200 x86/CPU: Fix unused

Re: [PATCH] drm: sun4i: Fix a uninitialized variable warning.

2018-09-21 Thread zhong jiang
On 2018/9/21 22:26, Maxime Ripard wrote: > On Wed, Sep 19, 2018 at 05:01:32PM +0800, zhong jiang wrote: >> On 2018/9/19 16:47, Maxime Ripard wrote: >>> On Tue, Sep 18, 2018 at 03:25:20PM +0800, zhong jiang wrote: >>>> Fix the following compile warning: >>>&g

[PATCH] PM / devfreq: remove redundant null pointer check before kfree

2018-09-21 Thread zhong jiang
kfree has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree. Signed-off-by: zhong jiang --- drivers/devfreq/devfreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq

[PATCH] drivers/firmware: Should be a struct size instead of a pointer.

2018-09-21 Thread zhong jiang
kcalloc should be sizeof(*cpu_groups) instead of sizeof(cpu_groups). Signed-off-by: zhong jiang --- drivers/firmware/psci_checker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/psci_checker.c b/drivers/firmware/psci_checker.c index 3469436..26afabc 100644

[PATCH] soc: qcom: qdsp6: remove duplicated include from q6adm.c

2018-09-21 Thread zhong jiang
We include wait.h twice in q6adm.c. it is unnecessary. hence remove it. Further, order the include files as alphabet. Signed-off-by: zhong jiang --- sound/soc/qcom/qdsp6/q6adm.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6adm.c b

[RESEND PATCH] error-injection: remove meaningless null pointer check before debugfs_remove_recursive

2018-09-20 Thread zhong jiang
debugfs_remove_recursive has taken the null pointer into account. just remove the null check before debugfs_remove_recursive. Acked-by: Masami Hiramatsu Signed-off-by: zhong jiang --- kernel/fail_function.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel

Re: [PATCH v2] HID: logitech: fix a used uninitialized GCC warning

2018-09-20 Thread zhong jiang
Hi Jiri Can you pick up the patch? Thanks zhong jiang On 2018/9/13 15:41, zhong jiang wrote: > Fix the following compile warning: > > drivers/hid/hid-logitech-hidpp.c: In function 'hi_res_scroll_enable': > drivers/hid/hid-logitech-hidpp.c:2714:54: warning: 'multiplier'

[PATCH] RDMA/cxgb4: remove redundant null pointer check before kfree_skb

2018-09-20 Thread zhong jiang
kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang --- drivers/infiniband/hw/cxgb4/cm.c | 3 +-- drivers/infiniband/hw/cxgb4/qp.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions

[PATCH] misc: genwqe: remove duplicated include file

2018-09-19 Thread zhong jiang
module.h has duplicated include. hence just remove redundant include file. Signed-off-by: zhong jiang --- drivers/misc/genwqe/card_base.c | 1 - drivers/misc/genwqe/card_ddcb.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/misc/genwqe/card_base.c b/drivers/misc/genwqe/card_base.c

[PATCH] media: card_utils: remove duplicated include file

2018-09-19 Thread zhong jiang
delay.h and dma-mapping.h have duplicated include. hence just remove redundant file. Signed-off-by: zhong jiang --- drivers/misc/genwqe/card_utils.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/misc/genwqe/card_utils.c b/drivers/misc/genwqe/card_utils.c index f0961ec..3fcb9a2

[PATCH] misc: genwqe: should return proper error value.

2018-09-19 Thread zhong jiang
The function should return -EFAULT when copy_from_user fails. Even though the caller does not distinguish them. but we should keep backward compatibility. Signed-off-by: zhong jiang --- drivers/misc/genwqe/card_utils.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff

Re: [PATCH] net: iucv: Use FIELD_SIZEOF directly instead of reimplementing its function

2018-09-19 Thread zhong jiang
On 2018/9/19 17:52, zhong jiang wrote: > FIELD_SIZEOF is defined as a macro to calculate the specified vaule. > Therefore, > We prefer to use the macro rather than calculating its vaule. s/vaule/value . will resend . Thanks, zhong jiang > Signed-off-by: zhong jiang >

Re: [PATCH] drm: sun4i: Fix a uninitialized variable warning.

2018-09-19 Thread zhong jiang
On 2018/9/19 16:47, Maxime Ripard wrote: > On Tue, Sep 18, 2018 at 03:25:20PM +0800, zhong jiang wrote: >> Fix the following compile warning: >> >> drivers/gpu/drm/sun4i/sun4i_tcon.c:1088: warning: 'has_lvds_alt' may be used >> uninitialized in this function [-Wm

[PATCH] soc: qcom: cmd-db: Fix some uninitialized warning.

2018-09-18 Thread zhong jiang
zed in this function [-Wmaybe-uninitialized] return ret < 0 ? 0 : le16_to_cpu(ent.len); drivers/soc/qcom/cmd-db.c:269:24: warning: ‘ent.addr’ may be used uninitialized in this function [-Wmaybe-uninitialized] addr = le32_to_cpu(ent.addr); Signed-off-by: zhong jiang --- drivers/soc/qcom/cmd-db

[PATCH] sched: psi: Fix a GCC uninitialized warning

2018-09-18 Thread zhong jiang
I find the following warning when compiling the kernel. kernel/sched/psi.c:639:13: warning: 'rq' may be used uninitialized in this function [-Wmaybe-uninitialized] struct rq *rq; Signed-off-by: zhong jiang --- kernel/sched/psi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH] ASoC: qcom: Fix a uninitialized warning.

2018-09-18 Thread zhong jiang
On 2018/9/19 1:17, Andy Gross wrote: > On Tue, Sep 18, 2018 at 01:06:48PM +0800, zhong jiang wrote: >> Fix the following compile warning: >> >> drivers/soc/qcom/cmd-db.c:194:38: warning: 'ent.addr' may be used >> uninitialized in this function [-Wmaybe-uninitializ

[PATCH] media: usb: Use kmemdup instead of duplicating its function.

2018-09-18 Thread zhong jiang
kmemdup has implemented the function that kmalloc() + memcpy(). We prefer to kmemdup rather than code opened implementation. Signed-off-by: zhong jiang --- drivers/media/usb/dvb-usb-v2/gl861.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2

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

2018-09-18 Thread zhong jiang
On 2018/9/18 23:10, Greg KH wrote: > On Tue, Sep 18, 2018 at 11:00:37PM +0800, zhong jiang wrote: >> Hi, Greg >> >> Can you pick up the patch? > Nope, sorry, as before, work with the maintainers please. Thank you for your reply timely .:-) Sincerely, zhong jiang > greg k-h > > . >

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

2018-09-18 Thread zhong jiang
Hi, Greg Can you pick up the patch? Thanks, zhong jiang On 2018/8/23 19:38, zhong jiang wrote: > On 2018/8/13 22:20, don.br...@microchip.com wrote: >>> -Original Message- >>> From: zhong jiang [mailto:zhongji...@huawei.com] >>> Sent: Monday, August 1

[PATCH v2] misc: remove redundant include moduleparam.h

2018-09-18 Thread zhong jiang
module.h already contains moduleparam.h, so it is safe to remove the redundant include. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- drivers/misc/mei/bus-fixup.c | 1 - drivers/misc/vmw_vmci/vmci_host.c | 1 - 2 files changed, 2 deletions(-) diff

Re: [PATCH] misc: remove redundant include moduleparam.h

2018-09-18 Thread zhong jiang
On 2018/9/18 16:55, Greg KH wrote: > On Tue, Sep 18, 2018 at 04:34:42PM +0800, zhong jiang wrote: >> module.h already contains moduleparam.h, so it is safe to remove >> the redundant include. >> >> The issue is detected with the help of Coccinelle. >> >> eeP

[PATCH] misc: remove redundant include moduleparam.h

2018-09-18 Thread zhong jiang
module.h already contains moduleparam.h, so it is safe to remove the redundant include. The issue is detected with the help of Coccinelle. eePlease enter the commit message for your changes. Lines starting Signed-off-by: zhong jiang --- drivers/misc/mei/bus-fixup.c | 1 - drivers/misc

[PATCH] ASoC: remove redundant include

2018-09-18 Thread zhong jiang
module.h already contained moduleparam.h, so it is safe to remove the redundant include. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- sound/soc/codecs/rt5651.c | 1 - sound/soc/codecs/wm8904.c | 1 - sound/soc/codecs/wm8974.c | 1 - sound/soc/soc-dapm.c

[PATCH] drm: sun4i: Fix a uninitialized variable warning.

2018-09-18 Thread zhong jiang
Fix the following compile warning: drivers/gpu/drm/sun4i/sun4i_tcon.c:1088: warning: 'has_lvds_alt' may be used uninitialized in this function [-Wmaybe-uninitialized] bool has_lvds_rst, has_lvds_alt, can_lvds; Signed-off-by: zhong jiang --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +- 1 file

[PATCH] ASoC: qcom: Fix a uninitialized warning.

2018-09-17 Thread zhong jiang
zed in this function [-Wmaybe-uninitialized] return ret < 0 ? 0 : le16_to_cpu(ent.len); drivers/soc/qcom/cmd-db.c:269:24: warning: ‘ent.addr’ may be used uninitialized in this function [-Wmaybe-uninitialized] addr = le32_to_cpu(ent.addr); Signed-off-by: zhong jiang --- drivers/soc/qcom/cmd-db

Re: [PATCH] x86/apm: Fix a unused function warning

2018-09-17 Thread zhong jiang
On 2018/9/17 17:24, Thomas Gleixner wrote: > On Mon, 17 Sep 2018, zhong jiang wrote: > >> Fix the following compile warning: >> >> arch/x86/kernel/apm_32.c:1643:12: warning: ?proc_apm_show? defined but not >> used [-Wunused-function] >> static int proc_

Re: [PATCH] interconnect: Fix a GCC compiler warning

2018-09-17 Thread zhong jiang
On 2018/9/17 16:59, Greg KH wrote: > On Mon, Sep 17, 2018 at 04:53:31PM +0800, zhong jiang wrote: >> +to Greg and Andrew. >> >> On 2018/9/16 22:31, zhong jiang wrote: >>> Fix the following compile warning: >>> >>> drivers/interconnect/

Re: [PATCH] interconnect: Fix a GCC compiler warning

2018-09-17 Thread zhong jiang
On 2018/9/17 16:48, Greg KH wrote: > On Mon, Sep 17, 2018 at 03:15:59PM +0800, zhong jiang wrote: >> On 2018/9/17 14:54, Greg KH wrote: >>> On Mon, Sep 17, 2018 at 02:15:31PM +0800, zhong jiang wrote: >>>> On 2018/9/16 22:31, zhong jiang wrote: >>&

Re: [PATCH] interconnect: Fix a GCC compiler warning

2018-09-17 Thread zhong jiang
+to Greg and Andrew. On 2018/9/16 22:31, zhong jiang wrote: > Fix the following compile warning: > > drivers/interconnect/core.c:26:23: warning: ‘icc_debugfs_dir’ defined but not > used [-Wunused-variable] > static struct dentry *icc_debugfs_dir; > > Signed-off-by: zhong ji

Re: [PATCH] interconnect: Fix a GCC compiler warning

2018-09-17 Thread zhong jiang
On 2018/9/17 14:54, Greg KH wrote: > On Mon, Sep 17, 2018 at 02:15:31PM +0800, zhong jiang wrote: >> On 2018/9/16 22:31, zhong jiang wrote: >>> Fix the following compile warning: >> +to Andrew and Greg >> > +me for what? Nothing is here :( The drivers/interco

Re: [PATCH] interconnect: Fix a GCC compiler warning

2018-09-17 Thread zhong jiang
On 2018/9/16 22:31, zhong jiang wrote: > Fix the following compile warning: +to Andrew and Greg

[PATCH] x86/apm: Fix a unused function warning

2018-09-17 Thread zhong jiang
Fix the following compile warning: arch/x86/kernel/apm_32.c:1643:12: warning: ‘proc_apm_show’ defined but not used [-Wunused-function] static int proc_apm_show(struct seq_file *m, void *v) Signed-off-by: zhong jiang --- arch/x86/kernel/apm_32.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH] interconnect: Fix a GCC compiler warning

2018-09-16 Thread zhong jiang
Fix the following compile warning: drivers/interconnect/core.c:26:23: warning: ‘icc_debugfs_dir’ defined but not used [-Wunused-variable] static struct dentry *icc_debugfs_dir; Signed-off-by: zhong jiang --- drivers/interconnect/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH] hwtracing: coresight: remove redundant null pointer check before of_node_put and put_device

2018-09-16 Thread zhong jiang
of_node_put and put_device has taken the null pointer check into account. So it is safe to remove the duplicated check. Signed-off-by: zhong jiang --- drivers/hwtracing/coresight/of_coresight.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/hwtracing

[PATCH] misc: sram: remove redundant null pointer check before of_node_put

2018-09-16 Thread zhong jiang
of_node_put has taken the null pinter check into account. So it is safe to remove the duplicated check before of_node_put. Signed-off-by: zhong jiang --- drivers/misc/sram.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index

Re: [PATCH] arm: common: use match_string() helper to simplify the code

2018-09-15 Thread zhong jiang
us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/zhong-jiang/arm-common-use-match_string-helper-to-simplify-the-code/20180915-035510 > base: https://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git > for-next > config: a

[PATCH] mm: use match_string() helper to simplify the code

2018-09-14 Thread zhong jiang
match_string() returns the index of an array for a matching string, which can be used intead of open coded implementation. Signed-off-by: zhong jiang --- mm/mempolicy.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 2e76a8f

Re: [PATCH] sched: Fix a GCC compiled warning.

2018-09-14 Thread zhong jiang
On 2018/9/15 0:43, Miguel Ojeda wrote: > Hi Zhong, > > On Fri, Sep 14, 2018 at 4:49 PM, zhong jiang wrote: >> Fix the following compile warning: >> >> kernel/sched/core.c: In function ‘update_rq_clock_task’: >> kernel/sched/core.c:139:6: warning: unused variab

[PATCH] arm: common: use match_string() helper to simplify the code

2018-09-14 Thread zhong jiang
match_string() returns the index of an array for a matching string, which can be used instead of open coded implementation. Signed-off-by: zhong jiang --- arch/arm/plat-orion/common.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/arm/plat-orion/common.c b

[PATCH] bus: fsl-mc: use match_string() helper to simplify the code

2018-09-14 Thread zhong jiang
match_string() returns the index of an array for a matching string, which can be used intead of open coded implementation. Signed-off-by: zhong jiang --- drivers/bus/fsl-mc/fsl-mc-allocator.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/bus/fsl-mc

[PATCH] drm: i2c: use match_string() helper to simplify the code

2018-09-14 Thread zhong jiang
match_string() returns the index of an array for a matching string, which can be used intead of open coded implementation. Signed-off-by: zhong jiang --- drivers/gpu/drm/i2c/ch7006_drv.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i2c

[PATCH] sched: Fix a GCC compiled warning.

2018-09-14 Thread zhong jiang
Fix the following compile warning: kernel/sched/core.c: In function ‘update_rq_clock_task’: kernel/sched/core.c:139:6: warning: unused variable ‘steal’ [-Wunused-variable] s64 steal = 0, irq_delta = 0; Signed-off-by: zhong jiang --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion

[PATCH v2] HID: logitech: fix a used uninitialized GCC warning

2018-09-13 Thread zhong jiang
ier = multiplier; Signed-off-by: zhong jiang --- v1->v2: According to Benjamin's suggestion, To initialize the value and remove the duplicated assignement. drivers/hid/hid-logitech-hidpp.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/hid/hid-logitech-hid

Re: [PATCH] HID: logitech: fix a used uninitialized GCC warning

2018-09-13 Thread zhong jiang
On 2018/9/13 15:01, Benjamin Tissoires wrote: > On Thu, Sep 13, 2018 at 6:04 AM zhong jiang wrote: >> Fix the following compile warning: >> >> drivers/hid/hid-logitech-hidpp.c: In function ‘hi_res_scroll_enable’: >> drivers/hid/hid-logitech-hidpp.c:2714:54: warnin

[PATCH] HID: logitech: fix a used uninitialized GCC warning

2018-09-12 Thread zhong jiang
ier = multiplier; Signed-off-by: zhong jiang --- drivers/hid/hid-logitech-hidpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 5f0c080..83c43dd 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/

[PATCH] x86: common: fix unused variable warning

2018-09-12 Thread zhong jiang
Fix the following compile warning: rch/x86/kernel/cpu/common.c: In function 'syscall_init': arch/x86/kernel/cpu/common.c:1534:6: warning: unused variable 'cpu' [-Wunused-variable] int cpu = smp_processor_id(); Signed-off-by: zhong jiang --- arch/x86/kernel/cpu/common.c | 5 ++--- 1 file

Re: [PATCH 0/2] arm64: remove some extra semicolon

2018-09-12 Thread zhong jiang
On 2018/9/4 0:59, Will Deacon wrote: > On Thu, Aug 09, 2018 at 10:20:39PM +0800, zhong jiang wrote: >> There are some extra semicolon in arm64 architecture. Just remove them. > These are trivial but certainly not urgent, so I guess Catalin can pick > them up for 4.20. Thanks, C

[PATCH] brcm80211: remove redundant condition check before debugfs_remove_recursive

2018-09-12 Thread zhong jiang
debugfs_remove_recursive has taken IS_ERR_OR_NULL into account. So just remove the condition check before debugfs_remove_recursive. Signed-off-by: zhong jiang --- drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH] ASoC: remove unneeded static set .owner field in platform_driver

2018-09-11 Thread zhong jiang
platform_driver_register will set the .owner field. So it is safe to remove the redundant assignment. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- sound/soc/mediatek/mt2701/mt2701-wm8960.c | 1 - sound/soc/mediatek/mt6797/mt6797-mt6351.c | 1 - sound/soc

[PATCH] staging: remove unneeded static set .owner field in platform_driver

2018-09-11 Thread zhong jiang
platform_driver_register will set the .owner field. So it is safe to remove the redundant assignment. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- drivers/staging/greybus/audio_codec.c| 1 - drivers/staging/mt7621-eth/gsw_mt7621.c | 1 - drivers

[tip:sched/core] sched/topology: Make local variables static

2018-09-11 Thread tip-bot for zhong jiang
Commit-ID: ace8031099f91480799b5929b4cccf2dcacc5136 Gitweb: https://git.kernel.org/tip/ace8031099f91480799b5929b4cccf2dcacc5136 Author: zhong jiang AuthorDate: Fri, 3 Aug 2018 20:37:32 +0800 Committer: Ingo Molnar CommitDate: Mon, 10 Sep 2018 15:10:57 +0200 sched/topology: Make local

Re: [PATCH] bcache: remove unnecessary null poiner check in cache_set_free

2018-09-10 Thread zhong jiang
On 2018/9/11 8:59, Junhui Tang wrote: > This patch is NOT OK to me,maybe many cache in a cache_set, and some > cache are not registered yet, so ca is possible NULL. Yep, It's my fault. please ingnore the patch. Thanks, zhong jiang > zhong jiang 于2018年9月8日周六 下午7:52写道: >&g

Re: [PATCH] iio: remove unnecessary condition judgment in am2315_trigger_handler

2018-09-10 Thread zhong jiang
On 2018/9/10 21:49, zhong jiang wrote: > On 2018/9/8 22:17, Jonathan Cameron wrote: >> On Sat, 8 Sep 2018 17:59:13 +0530 >> Himanshu Jha wrote: >> >>> On Sat, Sep 08, 2018 at 06:57:36PM +0800, zhong jiang wrote: >>>> The iterator in for_eac

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

2018-09-10 Thread zhong jiang
On 2018/9/10 22:19, Mark Brown wrote: > On Sat, Sep 08, 2018 at 04:36:19PM +0800, zhong jiang wrote: >> kmemdup has implemented the function that kzalloc() + memcpy() will >> do. and we prefer to use the kmemdup rather than the open coded >> implementation. > Please subm

[PATCH] mm: Use BUG_ON directly instead of a if condition followed by BUG

2018-09-10 Thread zhong jiang
The if condition can be removed if we use BUG_ON directly. The issule is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- mm/memory_hotplug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 38d94b7

Re: [PATCH] iio: remove unnecessary condition judgment in am2315_trigger_handler

2018-09-10 Thread zhong jiang
On 2018/9/8 22:17, Jonathan Cameron wrote: > On Sat, 8 Sep 2018 17:59:13 +0530 > Himanshu Jha wrote: > >> On Sat, Sep 08, 2018 at 06:57:36PM +0800, zhong jiang wrote: >>> The iterator in for_each_set_bit is never null, therefore, remove >>> the redundant conditi

Re: [PATCH] error-injection: remove meaningless null pointer check before debugfs_remove_recursive

2018-09-10 Thread zhong jiang
On 2018/9/10 15:21, Ingo Molnar wrote: > * 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 >> --- >> kernel/fai

[PATCH] radix-tree: Use DIV_ROUND_UP instead of reimplementing its function

2018-09-10 Thread zhong jiang
DIV_ROUND_UP has implemented the code-opened function. Therefore, just replace the implementation with DIV_ROUND_UP. Signed-off-by: zhong jiang --- include/linux/radix-tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/radix-tree.h b/include/linux/radix

[PATCH] sh: mm: Use dma_zalloc_coherent instead of dma_alloc_coherent + memset

2018-09-09 Thread zhong jiang
dma_zalloc_coherent has taken the dma_alloc_coherent() and memset() into account. Therefore, just use dma_zalloc_coherent to replace the open code. Signed-off-by: zhong jiang --- arch/sh/mm/consistent.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/sh/mm

[PATCH] infiniband: remove redundant condition check before debugfs_remove

2018-09-08 Thread zhong jiang
debugfs_remove has taken the IS_ERR_OR_NULL into account. Just remove the unnecessary condition. Signed-off-by: zhong jiang --- drivers/infiniband/hw/usnic/usnic_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/usnic/usnic_debugfs.c b

[PATCH] bcache: remove unecessary condition check before debugfs_remove_recursive

2018-09-08 Thread zhong jiang
debugfs_remove_recursive has taken IS_ERR_OR_NULL into account. So just remove the condition check before debugfs_remove_recursive. Signed-off-by: zhong jiang --- drivers/md/bcache/debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/bcache/debug.c b/drivers

[PATCH] bcache: remove redundant condition before debugfs_remove

2018-09-08 Thread zhong jiang
debugfs_remove has taken the IS_ERR_OR_NULL into account. Just remove the unnecessary condition. Signed-off-by: zhong jiang --- drivers/md/bcache/super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 2d26f9e

[PATCH] bcache: remove unnecessary null poiner check in cache_set_free

2018-09-08 Thread zhong jiang
The iterator in for_each_cache is never null, therefore, remove the redundant null pointer check. Signed-off-by: zhong jiang --- drivers/md/bcache/super.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index

[PATCH] iio: remove unnecessary condition judgment in am2315_trigger_handler

2018-09-08 Thread zhong jiang
The iterator in for_each_set_bit is never null, therefore, remove the redundant conditional judgment. Signed-off-by: zhong jiang --- drivers/iio/humidity/am2315.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c

[PATCH 1/2] s390: vmlogrdr: Use ARRAY_SIZE instead of reimplementing its function

2018-09-08 Thread zhong jiang
ARRAY_SIZE has implemented its function. we prefer to use the function rather than the open code. Signed-off-by: zhong jiang --- drivers/s390/char/vmlogrdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index

[PATCH 0/2] s390: Use ARRAY_SIZE instead of reimplementing its function

2018-09-08 Thread zhong jiang
I find the issue with the help of Coccinelle. zhong jiang (2): s390: vmlogrdr: Use ARRAY_SIZE instead of reimplementing its function s390: qeth_core_mpc: Use ARRAY_SIZE instead of reimplementing its function drivers/s390/char/vmlogrdr.c | 2 +- drivers/s390/net/qeth_core_mpc.c | 7

[PATCH 2/2] s390: qeth_core_mpc: Use ARRAY_SIZE instead of reimplementing its function

2018-09-08 Thread zhong jiang
ARRAY_SIZE has implemented its function. we prefer to use the function rather than the open code. Signed-off-by: zhong jiang --- drivers/s390/net/qeth_core_mpc.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/s390/net/qeth_core_mpc.c b/drivers/s390/net

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

2018-09-08 Thread zhong jiang
On 2018/9/8 18:21, Thomas Gleixner wrote: > On Sat, 8 Sep 2018, zhong jiang wrote: > >> 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? >>>

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

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 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

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

  1   2   3   4   >