* different physical page at a given virtual address, so all
+* userspace consumption of ZONE_DEVICE memory necessitates
+* SIGBUS (i.e. MF_MUST_KILL)
+*/
+ flags |= MF_ACTION_REQUIRED | MF_MUST_KILL;
MF_ACTION_REQUIRED only kill the current execution context. A page can be s
On 2021/1/14 11:52 上午, Ruan Shiyang wrote:
On 2021/1/14 上午11:26, zhong jiang wrote:
On 2021/1/14 9:44 上午, Ruan Shiyang wrote:
On 2021/1/13 下午6:04, zhong jiang wrote:
On 2021/1/12 10:55 上午, Ruan Shiyang wrote:
On 2021/1/6 下午11:41, Jan Kara wrote:
On Thu 31-12-20 00:55:55, Shiyang
On 2021/1/14 9:44 上午, Ruan Shiyang wrote:
On 2021/1/13 下午6:04, zhong jiang wrote:
On 2021/1/12 10:55 上午, Ruan Shiyang wrote:
On 2021/1/6 下午11:41, Jan Kara wrote:
On Thu 31-12-20 00:55:55, Shiyang Ruan wrote:
The current memory_failure_dev_pagemap() can only handle
single-mapped
dax
On 2021/1/12 10:55 上午, Ruan Shiyang wrote:
On 2021/1/6 下午11:41, Jan Kara wrote:
On Thu 31-12-20 00:55:55, Shiyang Ruan wrote:
The current memory_failure_dev_pagemap() can only handle single-mapped
dax page for fsdax mode. The dax page could be mapped by multiple
files
and offsets if we l
The GCC complains the following case when compiling kernel.
drivers/power/supply/cpcap-charger.c:563:5: warning: symbol
'cpcap_charger_voltage_to_regval' was not declared. Should it be static?
Signed-off-by: zhong jiang
---
drivers/power/supply/cpcap-charger.c | 2 +-
1 file
tate "Silicon Labs wireless chips WF200 and further"
> depends on MAC80211
> + depends on MMC || !MMC # do not allow WFX=y if MMC=m
> depends on (SPI || MMC)
> help
> This is a driver for Silicons Labs WFxxx series (WF200 and further)
>
>
Hi, Jerome
It's better to understandable.
Could you send the patch or want to repost by me?
Thanks,
zhong jiang
On 2019/10/17 8:49, Andrew Morton wrote:
> On Wed, 16 Oct 2019 17:07:44 +0800 zhong jiang wrote:
>
>>>> --- a/mm/gup.c~a
>>>> +++ a/mm/gup.c
>>>> @@ -1450,6 +1450,7 @@ static long check_and_migrate_cma_pages(
>>>> bool dr
kfree() has taken null pointer into account. hence it is safe to remove
the unnecessary check.
Signed-off-by: zhong jiang
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c
b/drivers
tate "Silicon Labs wireless chips WF200 and further"
> depends on MAC80211
> + depends on MMC || !MMC # do not allow WFX=y if MMC=m
> depends on (SPI || MMC)
> help
> This is a driver for Silicons Labs WFxxx series (WF200 and further)
>
>
It's better and clear. Thanks
sincerely,
zhong jiang
On 2019/10/12 23:32, Greg KH wrote:
> On Sat, Oct 12, 2019 at 06:54:53PM +0800, zhong jiang wrote:
>> I hit the following error when compile the kernel.
>>
>> drivers/staging/wfx/main.o: In function `wfx_core_init':
>> /home/z00352263/linux-next/linux-nex
`sdio_unregister_driver'
Signed-off-by: zhong jiang
---
v2->v3:
We'd better not use #ifdef in .c file to use IS_ENABLED instead.
v1->v2:
We should prefer to current dependencies rather than force to enable.
drivers/staging/wfx/Makefile | 2 +-
1 file changed, 1 insertio
On 2019/10/12 1:03, Greg KH wrote:
> On Sat, Oct 12, 2019 at 12:34:07AM +0800, zhong jiang wrote:
>> I hit the following error when compile the kernel.
>>
>> drivers/staging/wfx/main.o: In function `wfx_core_init':
>> /home/z00352263/linux-next/linux-nex
`sdio_unregister_driver'
Signed-off-by: zhong jiang
---
drivers/staging/wfx/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wfx/Makefile b/drivers/staging/wfx/Makefile
index 0d9c1ed..77d68b7 100644
--- a/drivers/staging/wfx/Makefile
+++ b/drivers
On 2019/10/12 0:16, Greg KH wrote:
> On Fri, Oct 11, 2019 at 11:51:16PM +0800, zhong jiang wrote:
>> On 2019/10/11 17:02, Greg KH wrote:
>>> On Fri, Oct 11, 2019 at 08:40:08AM +, Jerome Pouiller wrote:
>>>> On Friday 11 October 2019 06:26:16 CEST Greg KH wr
On 2019/10/11 23:55, Jerome Pouiller wrote:
> On Friday 11 October 2019 17:51:29 CEST zhong jiang wrote:
> [...]
>> How about the following patch ?
>>
>> diff --git a/drivers/staging/wfx/Makefile b/drivers/staging/wfx/Makefile
>> index 0d9c1ed..77d68b7 100644
>>
unless you recognize the sender and know the
>> content is safe.
>>>
>>> On Fri, Oct 11, 2019 at 11:02:19AM +0800, zhong jiang wrote:
>>>> I hit the following error when compile the kernel.
>>>>
>>>> drivers/staging/wfx/main.o: In func
unless you recognize the sender and know the
>> content is safe.
>>>
>>> On Fri, Oct 11, 2019 at 11:02:19AM +0800, zhong jiang wrote:
>>>> I hit the following error when compile the kernel.
>>>>
>>>> drivers/staging/wfx/main.o: In func
ging/wfx/main.c:496: undefined
reference to `sdio_unregister_driver'
drivers/staging/wfx/main.o:(.debug_addr+0x1a8): undefined reference to
`sdio_register_driver'
drivers/staging/wfx/main.o:(.debug_addr+0x6f0): undefined reference to
`sdio_unregister_driver'
Signed-off-by: zhong j
On 2019/10/11 12:26, Greg KH wrote:
> On Fri, Oct 11, 2019 at 11:02:19AM +0800, zhong jiang wrote:
>> I hit the following error when compile the kernel.
>>
>> drivers/staging/wfx/main.o: In function `wfx_core_init':
>> /home/z00352263/linux-next/linux-nex
`sdio_unregister_driver'
Signed-off-by: zhong jiang
---
drivers/staging/wfx/Kconfig | 3 ++-
drivers/staging/wfx/Makefile | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/wfx/Kconfig b/drivers/staging/wfx/Kconfig
index 9b8a1c7..4d045513 100644
--- a/dri
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
Signed-off-by: zhong jiang
---
drivers/media/v4l2-core/v4l2-dv-timings.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c
b
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
Signed-off-by: zhong jiang
---
drivers/media/usb/uvc/uvc_ctrl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb
With the help of Coccinelle. I find some place that DIV_ROUND_CLOSEST
can replace it directly.
v1->v2:
patch 1: remove mt312_div() to use the DIV_ROUND_CLOSEST directly.
zhong jiang (4):
media: dvb-frontends: Use DIV_ROUND_CLOSEST directly to make it
readable
media: tuners/qm1d1c0
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
Signed-off-by: zhong jiang
---
drivers/media/tuners/qm1d1c0042.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/tuners/qm1d1c0042.c
b/drivers/media/tuners
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
Signed-off-by: zhong jiang
---
drivers/media/dvb-frontends/mt312.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/media/dvb-frontends/mt312.c
b
On 2019/10/1 19:15, Sean Young wrote:
> Hi,
>
> On Fri, Sep 06, 2019 at 12:14:49AM +0800, zhong jiang wrote:
>> The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
>> but is perhaps more readable.
>>
>> Signed-off-by: zhong jiang
>> --
CC sound/soc/sof/debug.o
drivers/firmware/broadcom/bcm47xx_nvram.c:151:30: note: format string is
defined here
pr_err("nvram on flash (%zu bytes) is bigger than the reserved space in
memory, will just copy the first %i bytes\n",
Signed-off-by: zhong jiang
---
drivers/firmware
r each function it appears in
Signed-off-by: zhong jiang
---
security/smack/smack.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/security/smack/smack.h b/security/smack/smack.h
index 62529f3..02b05a2 100644
--- a/security/smack/smack.h
+++ b/security/smack/smack.h
@@ -21,6 +21,7 @@
#i
I hit the following error when compile the kernel.
drivers/iio/light/noa1305.o: In function `noa1305_probe':
noa1305.c:(.text+0x65): undefined reference to `__devm_regmap_init_i2c'
make: *** [vmlinux] Error 1
Signed-off-by: zhong jiang
---
drivers/iio/light/Kconfig | 1 +
1 file
On 2019/9/18 10:36, zhong jiang wrote:
> In general, Use kzfree() to replace memset() + kfree() is feasible and
> resonable. But It's btter to use memzero_explicit() to replace memset()
> in crypto cases.
s/btter/better/, will repost. sorry for that.
Thanks,
zhong jiang
> Sig
In general, Use kzfree() to replace memset() + kfree() is feasible and
resonable. But It's better to use memzero_explicit() to replace memset()
in crypto cases.
Signed-off-by: zhong jiang
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 9 ++---
1 file changed, 6 insertions(
In general, Use kzfree() to replace memset() + kfree() is feasible and
resonable. But It's btter to use memzero_explicit() to replace memset()
in crypto cases.
Signed-off-by: zhong jiang
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 9 ++---
1 file changed, 6 insertions(
On 2019/9/18 2:11, Jakub Kicinski wrote:
> On Tue, 17 Sep 2019 22:44:22 +0800, zhong jiang wrote:
>> It's better to use memzero_explicit() to replace memset() in crypto cases.
>>
>> Signed-off-by: zhong jiang
> Thank you for the follow up! Your previous patch to use
It's better to use memzero_explicit() to replace memset() in crypto cases.
Signed-off-by: zhong jiang
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
b/driver
On 2019/9/17 17:59, Sergei Shtylyov wrote:
> Hello!
>
> On 17.09.2019 6:45, zhong jiang wrote:
>
>> It's better to use memset_explicit() to replace memset() in crypto cases.
>
>But you're using memzero_explicit() below?
Sorry, stupid Oops. I will repost. T
It's better to use memset_explicit() to replace memset() in crypto cases.
Signed-off-by: zhong jiang
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
b/driver
On 2019/9/17 10:43, Jakub Kicinski wrote:
> On Wed, 4 Sep 2019 10:39:10 +0800, zhong jiang wrote:
>> Use kzfree() instead of memset() + kfree().
>>
>> Signed-off-by: zhong jiang
>> ---
>> drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 9 +++--
>&
On 2019/9/17 10:45, Jakub Kicinski wrote:
> On Wed, 4 Sep 2019 11:46:23 +0800, zhong jiang wrote:
>> Continue is not needed at the bottom of a loop.
>>
>> Signed-off-by: zhong jiang
>> ---
>> drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 4 +---
>
On 2019/9/13 1:45, Kalle Valo wrote:
> zhong jiang writes:
>
>> il4965_set_tkip_dynamic_key_info do not need return value to
>> cope with different ases. And change functon return type to void.
>>
>> Signed-off-by: zhong jiang
>> ---
>> drivers/
rts5260_card_power_on do not need local variable to store different value,
Hence just remove it.
Signed-off-by: zhong jiang
---
drivers/misc/cardreader/rts5260.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/misc/cardreader/rts5260.c
b/drivers/misc/cardreader
st_tty_open do not need local variable to store different value,
Hence just remove it.
Signed-off-by: zhong jiang
---
drivers/misc/ti-st/st_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c
index 7d9e23a
mlx5_unload_one do not need local variable to store different value,
Hence just remove it.
Signed-off-by: zhong jiang
---
drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c
b
With the help of Coccinelle, I find some place to use redundant
variable to store the return value, It is unnecessary. Just remove
it and make the funtion to be void.
zhong jiang (3):
brcmsmac: Remove unneeded variable and make function to be void
wlegacy: Remove unneeded variable and make
brcms_c_set_mac do not need return value to cope with different
cases. And change functon return type to void.
Signed-off-by: zhong jiang
---
drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/wireless
il4965_set_tkip_dynamic_key_info do not need return value to
cope with different ases. And change functon return type to void.
Signed-off-by: zhong jiang
---
drivers/net/wireless/intel/iwlegacy/4965-mac.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net
lbs_process_event do not need return value to cope with different
cases. And change functon return type to void.
Signed-off-by: zhong jiang
---
drivers/net/wireless/marvell/libertas/cmd.h | 2 +-
drivers/net/wireless/marvell/libertas/cmdresp.c | 5 +
2 files changed, 2 insertions(+), 5
On 2019/9/7 3:40, Andrew Lunn wrote:
> On Thu, Sep 05, 2019 at 11:53:48PM +0800, zhong jiang wrote:
>> The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
>> but is perhaps more readable.
> Hi Zhong
>
> Did you find this by hand, or did you use a tool.
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
Signed-off-by: zhong jiang
---
.../net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
Signed-off-by: zhong jiang
---
drivers/media/dvb-frontends/mt312.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/dvb-frontends/mt312.c
b/drivers/media/dvb
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
Signed-off-by: zhong jiang
---
drivers/media/tuners/qm1d1c0042.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/tuners/qm1d1c0042.c
b/drivers/media/tuners
With the following help of Coccinelle. I find out some place can be replaced.
-(((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
zhong jiang (4):
media: dvb-frontends: Use DIV_ROUND_CLOSEST directly to make it
readable
media: tuners/qm1d1c0042: Use
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
Signed-off-by: zhong jiang
---
drivers/media/usb/uvc/uvc_ctrl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
Signed-off-by: zhong jiang
---
drivers/media/v4l2-core/v4l2-dv-timings.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c
b
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
Signed-off-by: zhong jiang
---
drivers/net/ethernet/micrel/ksz884x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/micrel/ksz884x.c
b/drivers/net
On 2019/9/5 21:45, Kalle Valo wrote:
> zhong jiang writes:
>
>> Please ignore the patch. Because the hostap_proc.c is marked as 'obsolete'.
> You mean marked in the MAINTAINERS file? I don't see that as a problem,
> I can (and should) still apply any patches sub
FIELD_SIZEOF() has implemented sizeof(). Hence use FIELD_SIZEOF
directly.
zhong jiang (3):
batman-adv: Use FIELD_SIZEOF directly
media: v4l2: Use FIELD_SIZEOF directly
IB/mlx5: Use FIELD_SIZEOF directly
drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +-
drivers/media/v4l2-core/v4l2-ioctl.c
It's more clear to use FIELD_SIZEOF instead of its implementation.
Signed-off-by: zhong jiang
---
drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h
b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index c3
It's more clear to use FIELD_SIZEOF instead of its implementation.
Signed-off-by: zhong jiang
---
net/batman-adv/distributed-arp-table.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/batman-adv/distributed-arp-table.c
b/net/batman-adv/distributed-arp-table.c
It's more clear to use FIELD_SIZEOF instead of its implementation.
Signed-off-by: zhong jiang
---
drivers/media/v4l2-core/v4l2-ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c
b/drivers/media/v4l2-core/v4l2-ioctl.c
index 51
On 2019/9/5 15:39, Alexandre Belloni wrote:
> On 05/09/2019 14:43:15+0800, zhong jiang wrote:
>> PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to
>> use it directly. hence just replace it.
>>
> Unless you have a more significant contribution to this dr
PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to
use it directly. hence just replace it.
Signed-off-by: zhong jiang
---
drivers/phy/tegra/phy-tegra194-p2u.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/phy/tegra/phy-tegra194-p2u.c
b/drivers
PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to
use it directly. hence just replace it.
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-ds1347.c
index
With the help of ptr_ret.cocci, I find some place to use
PTR_ERR_OR_ZERO directly.
zhong jiang (4):
bus: ti-sysc: Use PTR_ERR_OR_ZERO rather than its implementation
misc: mic: Use PTR_ERR_OR_ZERO rather than its implementation
phy: tegra: Use PTR_ERR_OR_ZERO rather than its implementation
PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to
use it directly. hence just replace it.
Signed-off-by: zhong jiang
---
drivers/misc/mic/scif/scif_epd.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/mic/scif/scif_epd.h b/drivers/misc
PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to
use it directly. hence just replace it.
Signed-off-by: zhong jiang
---
drivers/bus/ti-sysc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 9207ac2
On 2019/9/5 11:12, Matthew Wilcox wrote:
> On Thu, Sep 05, 2019 at 10:17:51AM +0800, zhong jiang wrote:
>> With the help of unsigned_lesser_than_zero.cocci. Unsigned 'nr_pages'
>> compare with zero. And __gup_longterm_locked pass an long local variant
>> 'rc
On 2019/9/5 2:48, Andrew Morton wrote:
> On Wed, 4 Sep 2019 13:24:58 +0200 Vlastimil Babka wrote:
>
>> On 9/4/19 12:26 PM, zhong jiang wrote:
>>> With the help of unsigned_lesser_than_zero.cocci. Unsigned 'nr_pages"'
>>> compare with zero. And __ge
The functions "debugfs_remove" and "kfree" tolerate the passing
of null pointers. Hence it is unnecessary to check such arguments
around the calls. Thus remove the extra condition check at two places.
Signed-off-by: zhong jiang
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.
for finding
> these update candidates?
With the help of Coccinelle. You can find out some example in
scripts/coccinelle/.
Sincerely,
zhong jiang
> Regards,
> Markus
>
> .
>
With the help of boolinit.cocci, we use !nl80211_reg_change_event_fill
instead of (nl80211_reg_change_event_fill == false). Meanwhile, Clean
up the code.
Signed-off-by: zhong jiang
---
net/wireless/nl80211.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/net
On 2019/9/4 23:11, Markus Elfring wrote:
>> kfree has taken the null check in account.
> I suggest to take another look at a similar patch.
How to fast find out the similar patch. Search the key word doesn't work well.
Thanks,
zhong jiang
> NFS: fix ifnullfree.cocci warnings
&
69 ("mm/gup: replace get_user_pages_longterm() with
FOLL_LONGTERM")
Signed-off-by: zhong jiang
---
mm/gup.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/gup.c b/mm/gup.c
index 23a9f9c..ee0b71f 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1433,13 +1433,13 @@ static
On 2019/9/4 19:24, Vlastimil Babka wrote:
> On 9/4/19 12:26 PM, zhong jiang wrote:
>> With the help of unsigned_lesser_than_zero.cocci. Unsigned 'nr_pages"'
>> compare with zero. And __get_user_pages_locked will return an long value.
>> Hence, Convert the l
he similar patch before sending it.
Sincerely,
zhong jiang
> Regards,
> Markus
>
> .
>
With the help of unsigned_lesser_than_zero.cocci. Unsigned 'nr_pages"'
compare with zero. And __get_user_pages_locked will return an long value.
Hence, Convert the long to compare with zero is feasible.
Signed-off-by: zhong jiang
---
mm/gup.c | 2 +-
1 file changed, 1 insertion
kfree has taken the null check in account. hence it is unnecessary to add the
null check before kfree the object. Just remove it.
Signed-off-by: zhong jiang
---
drivers/staging/exfat/exfat_super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/exfat
ath9k_reg_rmw_single do not need return value to cope with different
cases. And change functon return type to void.
Signed-off-by: zhong jiang
---
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k
Continue is not needed at the bottom of a loop. Hence just drop it.
Signed-off-by: zhong jiang
---
drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
b/drivers/net/wireless/realtek/rtlwifi
Continue is not needed at the bottom of a loop.
Signed-off-by: zhong jiang
---
drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
b/drivers/net/ethernet/netronome/nfp
Continue is not needed at the bottom of a loop. Hence just remove it.
Signed-off-by: zhong jiang
---
drivers/net/wireless/ath/ath10k/mac.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c
b/drivers/net/wireless/ath/ath10k/mac.c
index
With the help of Coccinelle. we find some place to replace.
@@
for (...;...;...) {
...
if (...) {
...
- continue;
}
}
zhong jiang (3):
rtlwifi: Remove an unnecessary continue in
_rtl8723be_phy_config_bb_with_pgheaderfile
nfp: Drop unnecessary continue in
kfree_skb has taken null pointer into account. Hence it is unnecessary
to check it before kfree_skb. Just remove the condition.
Signed-off-by: zhong jiang
---
drivers/scsi/qedi/qedi_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/qedi/qedi_main.c b
kfree_skb has taken the null pointer into account. Hence just remove
the null check before kfree_skb.
Signed-off-by: zhong jiang
---
net/hsr/hsr_forward.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c
index ddd9605
Use kzfree instead of memset() + kfree().
Signed-off-by: zhong jiang
---
net/sunrpc/auth_gss/gss_krb5_keys.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/net/sunrpc/auth_gss/gss_krb5_keys.c
b/net/sunrpc/auth_gss/gss_krb5_keys.c
index 550fdf1..3b7f721 100644
Use kzfree() instead of memset() + kfree().
Signed-off-by: zhong jiang
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
With the help of Coccinelle. We find some place to replace.
@@
expression M, S;
@@
- memset(M, 0, S);
- kfree(M);
+ kzfree(M);
zhong jiang (3):
ixgbe: Use kzfree() rather than its implementation.
sunrpc: Use kzfree rather than its implementation.
net: mpoa: Use kzfree rather than its
Use kzfree instead of memset() + kfree().
Signed-off-by: zhong jiang
---
net/atm/mpoa_caches.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c
index 4bb4183..3286f9d 100644
--- a/net/atm/mpoa_caches.c
+++ b/net/atm
On 2019/9/3 21:25, Bob Copeland wrote:
> On Tue, Sep 03, 2019 at 02:39:44PM +0800, zhong jiang wrote:
>> kmemdup contains the kmalloc + memcpy. hence it is better to use kmemdup
>> directly. Just replace it.
>>
>> Signed-off-by: zhong jiang
> This same patch was alre
Please ignore the patch. Because the hostap_proc.c is marked as 'obsolete'.
Thanks,
zhong jiang
On 2019/9/3 15:57, zhong jiang wrote:
> Obviously, variable 'copied' is initialized to zero. But it is not used.
> hence just remove it.
>
> Signed-off-by: zhong jian
Obviously, variable 'copied' is initialized to zero. But it is not used.
hence just remove it.
Signed-off-by: zhong jiang
---
drivers/net/wireless/intersil/hostap/hostap_proc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/inter
PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better
to use it directly. hence just replace it.
Signed-off-by: zhong jiang
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5
kmemdup contains the kmalloc + memcpy. hence it is better to use kmemdup
directly. Just replace it.
Signed-off-by: zhong jiang
---
fs/omfs/inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c
index b76ec6b..8867cef 100644
--- a/fs/omfs
kfree has taken the null check in account. hence it is unnecessary to add the
null check before kfree the object. Just remove it.
Signed-off-by: zhong jiang
---
fs/nfs/sysfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c
index 4f3390b
On 2019/5/27 20:23, Vlastimil Babka wrote:
> On 5/25/19 8:28 PM, Andrew Morton wrote:
>> (Cc Vlastimil)
> Oh dear, 2 years and I forgot all the details about how this works.
>
>> On Sat, 25 May 2019 15:07:23 +0800 zhong jiang wrote:
>>
>>> We bind an differ
plify rebinding mempolicies when
updating cpusets")
Signed-off-by: zhong jiang
---
mm/mempolicy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index e3ab1d9..a60a3be 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -345,7 +
I am sorry, It is incorrect. please ignore the patch. I will resent it.
Thanks,
zhong jiang
On 2019/4/8 12:00, zhong jiang wrote:
> When adding the memory by probing memory block in sysfs interface, there is an
> obvious issue that we will unlock the device_hotplug_lock when fails to
hould drop out in time when fails to take the device_hotplug_lock.
Fixes: 8df1d0e4a265 ("mm/memory_hotplug: make add_memory() take the
device_hotplug_lock")
Reported-by: Yang yingliang
Signed-off-by: zhong jiang
---
drivers/base/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
hould drop out in time when fails to take the device_hotplug_lock.
Fixes: 8df1d0e4a265 ("mm/memory_hotplug: make add_memory() take the
device_hotplug_lock")
Reported-by: Yang yingliang
Signed-off-by: zhong jiang
---
drivers/base/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
On 2019/3/17 3:42, Andrea Arcangeli wrote:
> On Sat, Mar 16, 2019 at 05:38:54PM +0800, zhong jiang wrote:
>> On 2019/3/16 5:39, Andrea Arcangeli wrote:
>>> On Fri, Mar 08, 2019 at 03:10:08PM +0800, zhong jiang wrote:
>>>> I can reproduce the issue in arm64 qemu
On 2019/3/16 5:39, Andrea Arcangeli wrote:
> On Fri, Mar 08, 2019 at 03:10:08PM +0800, zhong jiang wrote:
>> I can reproduce the issue in arm64 qemu machine. The issue will leave after
>> applying the
>> patch.
>>
>> Tested-by: zhong jiang
> Thanks a lot f
1 - 100 of 437 matches
Mail list logo