Re: [Qestion] Hit a WARN_ON_ONCE in try_to_unmap_one when runing syzkaller

2019-03-14 Thread zhong jiang
On 2019/3/14 14:27, Naoya Horiguchi wrote: > Hi, > > On Wed, Mar 13, 2019 at 12:03:20AM +0800, zhong jiang wrote: > ... >> Minchan has changed the conditon check from BUG_ON to WARN_ON_ONCE in >> try_to_unmap_one. >> However, It is still an abnormal condition wh

[Qestion] Hit a WARN_ON_ONCE in try_to_unmap_one when runing syzkaller

2019-03-12 Thread zhong jiang
. Because page is locked , Its page flags should not be changed except for PageSwapBacked. Thanks, zhong jiang [ 16.918386] random: sshd: uninitialized urandom read (32 bytes read) [ 17.159274] random: fast init done [ 18.025596] urandom_read: 1 callbacks suppressed [ 18.025610] random

Re: KASAN: use-after-free Read in get_mem_cgroup_from_mm

2019-03-07 Thread zhong jiang
On 2019/3/6 10:05, Andrea Arcangeli wrote: > Hello everyone, > > [ CC'ed Mike and Peter ] > > On Tue, Mar 05, 2019 at 02:42:00PM +0800, zhong jiang wrote: >> On 2019/3/5 14:26, Dmitry Vyukov wrote: >>> On Mon, Mar 4, 2019 at 4:32 PM zhong jiang wrote: >>

Re: KASAN: use-after-free Read in get_mem_cgroup_from_mm

2019-03-06 Thread zhong jiang
On 2019/3/7 2:29, Andrea Arcangeli wrote: > Hello Zhong, > > On Wed, Mar 06, 2019 at 09:07:00PM +0800, zhong jiang wrote: >> The patch use call_rcu to delay free the task_struct, but It is possible to >> free the task_struct >> ahead of get_mem_cgroup_from_mm. is it rig

Re: KASAN: use-after-free Read in get_mem_cgroup_from_mm

2019-03-06 Thread zhong jiang
On 2019/3/6 16:12, Peter Xu wrote: > On Wed, Mar 06, 2019 at 03:41:06PM +0800, zhong jiang wrote: >> On 2019/3/6 14:26, Mike Rapoport wrote: >>> Hi, >>> >>> On Wed, Mar 06, 2019 at 01:53:12PM +0800, zhong jiang wrote: >>>> On 2019/3/6 10:

Re: KASAN: use-after-free Read in get_mem_cgroup_from_mm

2019-03-05 Thread zhong jiang
On 2019/3/6 14:26, Mike Rapoport wrote: > Hi, > > On Wed, Mar 06, 2019 at 01:53:12PM +0800, zhong jiang wrote: >> On 2019/3/6 10:05, Andrea Arcangeli wrote: >>> Hello everyone, >>> >>> [ CC'ed Mike and Peter ] >>> >>> On Tue, Mar 05,

Re: KASAN: use-after-free Read in get_mem_cgroup_from_mm

2019-03-05 Thread zhong jiang
On 2019/3/6 10:05, Andrea Arcangeli wrote: > Hello everyone, > > [ CC'ed Mike and Peter ] > > On Tue, Mar 05, 2019 at 02:42:00PM +0800, zhong jiang wrote: >> On 2019/3/5 14:26, Dmitry Vyukov wrote: >>> On Mon, Mar 4, 2019 at 4:32 PM zhong jiang wrote: >>

Re: KASAN: use-after-free Read in get_mem_cgroup_from_mm

2019-03-04 Thread zhong jiang
On 2019/3/5 14:26, Dmitry Vyukov wrote: > On Mon, Mar 4, 2019 at 4:32 PM zhong jiang wrote: >> On 2019/3/4 22:11, Dmitry Vyukov wrote: >>> On Mon, Mar 4, 2019 at 3:00 PM zhong jiang wrote: >>>> On 2019/3/4 15:40, Dmitry Vyukov wrote: >>>>> On S

Re: KASAN: use-after-free Read in get_mem_cgroup_from_mm

2019-03-04 Thread zhong jiang
On 2019/3/5 5:51, Matthew Wilcox wrote: > On Mon, Mar 04, 2019 at 12:19:32AM +0800, zhong jiang wrote: >> I also hit the following issue. but it fails to reproduce the issue by the >> log. >> >> it seems to the case that we access the mm->owner and deference it will

Re: KASAN: use-after-free Read in get_mem_cgroup_from_mm

2019-03-04 Thread zhong jiang
On 2019/3/4 22:11, Dmitry Vyukov wrote: > On Mon, Mar 4, 2019 at 3:00 PM zhong jiang wrote: >> On 2019/3/4 15:40, Dmitry Vyukov wrote: >>> On Sun, Mar 3, 2019 at 5:19 PM zhong jiang wrote: >>>> Hi, guys >>>> >>>> I also hit the follo

Re: KASAN: use-after-free Read in get_mem_cgroup_from_mm

2019-03-04 Thread zhong jiang
On 2019/3/4 15:40, Dmitry Vyukov wrote: > On Sun, Mar 3, 2019 at 5:19 PM zhong jiang wrote: >> Hi, guys >> >> I also hit the following issue. but it fails to reproduce the issue by the >> log. >> >> it seems to the case that we access the mm->owner a

Re: KASAN: use-after-free Read in get_mem_cgroup_from_mm

2019-03-03 Thread zhong jiang
Thanks, zhong jiang On 2018/12/4 23:43, syzbot wrote: > syzbot has found a reproducer for the following crash on: > > HEAD commit:0072a0c14d5b Merge tag 'media/v4.20-4' of git://git.kernel.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/lo

Re: [PATCH] mm: hwpoison: fix thp split handing in soft_offline_in_use_page()

2019-02-28 Thread zhong jiang
On 2019/3/1 15:29, Naoya Horiguchi wrote: > On Tue, Feb 26, 2019 at 10:34:32PM +0800, zhong jiang wrote: >> On 2019/2/26 21:51, Kirill A. Shutemov wrote: >>> On Tue, Feb 26, 2019 at 07:18:00PM +0800, zhong jiang wrote: >>>> From: zhongjiang >>>> >>

Re: [PATCH] mm: hwpoison: fix thp split handing in soft_offline_in_use_page()

2019-02-26 Thread zhong jiang
On 2019/2/26 21:51, Kirill A. Shutemov wrote: > On Tue, Feb 26, 2019 at 07:18:00PM +0800, zhong jiang wrote: >> From: zhongjiang >> >> When soft_offline_in_use_page() runs on a thp tail page after pmd is plit, > s/plit/split/ > >> we trigger the following VM_BU

[PATCH] mm: hwpoison: fix thp split handing in soft_offline_in_use_page()

2019-02-26 Thread zhong jiang
From: zhongjiang When soft_offline_in_use_page() runs on a thp tail page after pmd is plit, we trigger the following VM_BUG_ON_PAGE(): Memory failure: 0x3755ff: non anonymous thp __get_any_page: 0x3755ff: unknown zero refcount page type 2f8000 Soft offlining pfn 0x34d805 at process virtu

Re: [PATCH] mm: use this_cpu_cmpxchg_double in put_cpu_partial

2018-11-19 Thread zhong jiang
s more 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 --- a

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

[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

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

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

[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-27 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
he patch 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 ---

[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 for th

[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: &#

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

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

2018-09-18 Thread zhong jiang
his 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 deletio

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

[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

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

2018-09-17 Thread zhong jiang
his 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/core.c:26:23:

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

[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-14 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
r.resolution_multiplier = 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/dri

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

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 a

[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-10 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写道: >

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_each_set_bit

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

<    1   2   3   4   5   >