[PATCH v3] arm64/crypto: Accelerated CRC T10 DIF computation

2016-11-22 Thread YueHaibing
update, 2 updates5483655168 208928768 26.25 8192 byte blocks, 8192 bytes per update, 1 updates5623377920 209108992 26.89 Signed-off-by: YueHaibing <yuehaib...@huawei.com> Signed-off-by: YangShengkai <yangsheng...@huawei.com> Signed-off-by: Ding Tianhon

[PATCH] ptp_pch: use helpers function for converting between ns and timespec

2018-04-27 Thread YueHaibing
use ns_to_timespec64() and timespec64_to_ns() instead of open coding Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/ptp/ptp_pch.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c index b328517..78ccf93

[PATCH net-next] libcxgb,cxgb4: use __skb_put_zero to simplfy code

2018-04-27 Thread YueHaibing
use helper __skb_put_zero to replace the pattern of __skb_put() && memset() Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 3 +-- drivers/net/ethernet/chelsio/cxgb4/srq.c | 3 +-- drivers/net/ethernet/c

[PATCH] IB/cxgb4: use skb_put_zero()/__skb_put_zero

2018-04-28 Thread YueHaibing
Use the recently introduced helper to replace the pattern of skb_put_zero/__skb_put() && memset(). Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/infiniband/hw/cxgb4/qp.c| 9 +++-- drivers/infiniband/sw/rxe/rxe_net.c | 4 +--- 2 files changed, 4 insertions(+

[PATCH net-next] can: dev: use skb_put_zero to simplfy code

2018-04-28 Thread YueHaibing
use helper skb_put_zero to replace the pattern of skb_put() && memset() Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/net/can/dev.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index b1

[PATCH net-next] net: stmmac: Remove useless test before clk_disable_unprepare

2018-05-16 Thread YueHaibing
clk_disable_unprepare() already checks that the clock pointer is valid. No need to test it before calling it. Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-)

[PATCH net-next] net: ethoc: Remove useless test before clk_disable_unprepare

2018-05-16 Thread YueHaibing
clk_disable_unprepare() already checks that the clock pointer is valid. No need to test it before calling it. Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/net/ethernet/ethoc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/e

Re: [PATCH] bpf: check NULL for sk_to_full_sk()

2018-05-21 Thread YueHaibing
On 2018/5/21 23:17, Eric Dumazet wrote: > > > On 05/21/2018 12:55 AM, YueHaibing wrote: >> like commit df39a9f106d5 ("bpf: check NULL for sk_to_full_sk() return >> value"), >> we should check sk_to_full_sk return value against NULL. >> >>

[PATCH] netfilter: uapi: includes linux/types.h

2018-05-23 Thread YueHaibing
gcc-7.3.0 report following warning: ./usr/include/linux/netfilter/nf_osf.h:27: found __[us]{8,16,32,64} type without #include includes linux/types.h to fix it. Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- include/uapi/linux/netfilter/nf_osf.h | 2 ++ 1 file changed, 2 inse

[PATCH net-next] bpfilter: fix a build err

2018-05-25 Thread YueHaibing
leton of bpfilter kernel module") Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- net/bpfilter/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bpfilter/Makefile b/net/bpfilter/Makefile index 2af752c..3f3cb87 100644 --- a/net/bpfilter/Makefile +++ b/net/b

Re: [PATCH net-next] bpfilter: fix a build err

2018-05-25 Thread YueHaibing
On 2018/5/26 0:19, Alexei Starovoitov wrote: > On Fri, May 25, 2018 at 06:17:57PM +0800, YueHaibing wrote: >> gcc-7.3.0 report following err: >> >> HOSTCC net/bpfilter/main.o >> In file included from net/bpfilter/main.c:9:0: >> ./include/uapi/linux/bpf.h:12:10

[PATCH net-next] net: remove unnecessary genlmsg_cancel() calls

2018-05-26 Thread YueHaibing
the message be freed immediately, no need to trim it back to the previous size. Inspired by commit 7a9b3ec1e19f ("nl80211: remove unnecessary genlmsg_cancel() calls") Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/net/team/team.c | 2 -- driv

Re: [PATCH net-next] cxgb4: Check for kvzalloc allocation failure

2018-05-24 Thread YueHaibing
On 2018/5/24 23:07, David Miller wrote: > From: YueHaibing <yuehaib...@huawei.com> > Date: Tue, 22 May 2018 15:07:18 +0800 > >> diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c >> b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c >> index 130d1ee..01

[PATCH net-next] net: fec: remove stale comment

2018-05-24 Thread YueHaibing
This comment is outdated as fec_ptp_ioctl has been replaced by fec_ptp_set/fec_ptp_get since commit 1d5244d0e43b ("fec: Implement the SIOCGHWTSTAMP ioctl") Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/net/ethernet/freescale/fec_ptp.c | 6 -- 1 file chan

[PATCH net-next] vmxnet3: Replace msleep(1) with usleep_range()

2018-05-16 Thread YueHaibing
As documented in Documentation/timers/timers-howto.txt, replace msleep(1) with usleep_range(). Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/net/vmxnet3/vmxnet3_drv.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_ethtool.c | 2 +- 2 files changed, 4 insertions(+), 4 del

[PATCH] bpf: check NULL for sk_to_full_sk()

2018-05-21 Thread YueHaibing
like commit df39a9f106d5 ("bpf: check NULL for sk_to_full_sk() return value"), we should check sk_to_full_sk return value against NULL. Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- include/linux/bpf-cgroup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH net-next] cxgb4: Check for kvzalloc allocation failure

2018-05-22 Thread YueHaibing
t4_prep_fw doesn't check for card_fw pointer before store the read data, which could lead to a NULL pointer dereference if kvzalloc failed. Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 1 file changed, 4 insertions(+) diff

[PATCH net] net: qcom/emac: Add missing of_node_put()

2018-06-11 Thread YueHaibing
Add missing of_node_put() call for device node returned by of_parse_phandle(). Signed-off-by: YueHaibing --- drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c b/drivers/net/ethernet/qualcomm/emac

[PATCH bpf-next] bpf: hide the unused 'off' variable

2018-05-28 Thread YueHaibing
read sock fields") Signed-off-by: YueHaibing --- net/core/filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/core/filter.c b/net/core/filter.c index 24e6ce8..0ce93ed 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -6486,7 +6486,9 @@ static u32 sk_msg_convert_ctx_a

[PATCH net-next] net: qcom/emac: fix unused variable

2018-05-29 Thread YueHaibing
/qualcomm/emac/emac-sgmii.c:276:25: warning: ‘qdf2432_ops’ defined but not used [-Wunused-variable] static struct sgmii_ops qdf2432_ops = { ^~~ Move the declaration and functions inside the CONFIG_ACPI ifdef to fix the warning. Signed-off-by: YueHaibing --- drivers

[PATCH] IB/hns: Use zeroing memory allocator instead of allocator/memset

2018-06-03 Thread YueHaibing
Use dma_zalloc_coherent for allocating zeroed memory and remove unnecessary memset function. Signed-off-by: YueHaibing --- drivers/infiniband/hw/hns/hns_roce_alloc.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_alloc.c b/drivers

[PATCH] ath10k: use dma_zalloc_coherent instead of allocator/memset

2018-06-04 Thread YueHaibing
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset 0. Signed-off-by: YueHaibing --- drivers/net/wireless/ath/ath10k/wmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c

[PATCH net-next] net: fddi: fix a possible null-ptr-deref

2018-06-05 Thread YueHaibing
bp->SharedMemAddr is set to NULL while bp->SharedMemSize less than 0, then memset will trigger null-ptr-deref. Fix it use pci_zalloc_consistent when bp->SharedMemSize is greater than 0. Signed-off-by: YueHaibing --- drivers/net/fddi/skfp/skfddi.c | 10 -- 1 file changed, 4 i

Re: [PATCH net-next 0/6] use pci_zalloc_consistent

2018-06-05 Thread YueHaibing
On 2018/6/5 20:46, Andy Shevchenko wrote: > On Tue, Jun 5, 2018 at 3:49 PM, Christoph Hellwig wrote: >> On Tue, Jun 05, 2018 at 03:39:16PM +0300, Andy Shevchenko wrote: >>> On Tue, Jun 5, 2018 at 3:28 PM, YueHaibing wrote: >>>> >>> >>> Hmm... Is

[PATCH] iommu/io-pgtable-arm: Use for_each_set_bit to simplify code

2018-04-25 Thread YueHaibing
We can use for_each_set_bit() to simplify code slightly in the ARM io-pgtable self tests while unmapping. Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/iommu/io-pgtable-arm-v7s.c | 5 + drivers/iommu/io-pgtable-arm.c | 5 + 2 files changed, 2 insertions

[PATCH] ARM: dmabounce: remove unnecessary NULL check before dma_pool_destroy

2018-08-03 Thread YueHaibing
dma_pool_destroy will do NULL check,thus the check before the call is not needed. Signed-off-by: YueHaibing --- arch/arm/common/dmabounce.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 9a92de6..dcdd80c

[PATCH] um: NULL check before kfree is not needed

2018-08-03 Thread YueHaibing
kfree(NULL) is safe,so this removes NULL check before freeing the mem Signed-off-by: YueHaibing --- arch/um/drivers/vector_kern.c | 15 +-- arch/um/drivers/vector_user.c | 6 ++ arch/um/kernel/irq.c | 3 +-- 3 files changed, 8 insertions(+), 16 deletions(-) diff

Re: [PATCH 03/10] atmel: hide unused procfs helpers

2018-07-27 Thread YueHaibing
On 2018/7/27 17:24, Kalle Valo wrote: > (fixing top posting) > > YueHaibing writes: > >> On 2018/7/13 14:46, YueHaibing wrote: >>> When CONFIG_PROC_FS isn't set, gcc warning this: >>> >>> drivers/net/wireless/atmel/atmel.c:1402:12: warning: ‘atmel_p

[PATCH] pinctrl: berlin: fix 'pctrl->functions' allocation in berlin_pinctrl_build_state

2018-07-31 Thread YueHaibing
called in there, devm_kzalloc() shouldn't be used with the allocation in the first place. Fix the warning by calling kcalloc() and managing the free procedure in error path on our own. Fixes: 3de68d331c24 ("pinctrl: berlin: add the core pinctrl driver for Marvell Berlin SoCs") Signed-off-by: YueHaibi

Re: [PATCH v2] pinctrl: berlin: fix 'pctrl->functions' allocation in berlin_pinctrl_build_state

2018-07-31 Thread YueHaibing
Sorry, I send a wrong patch, pls ignore this. On 2018/8/1 13:02, YueHaibing wrote: > fixes following Smatch static check warning: > > drivers/pinctrl/berlin/berlin.c:237 berlin_pinctrl_build_state() > warn: passing devm_ allocated variable to kfree. 'pctrl->functi

Re: [PATCH] pinctrl: berlin: fix 'pctrl->functions' allocation in berlin_pinctrl_build_state

2018-07-31 Thread YueHaibing
On 2018/8/1 10:36, Jisheng Zhang wrote: > Hi, > > On Tue, 31 Jul 2018 22:25:01 +0800 YueHaibing wrote: > >> fixes following Smatch static check warning: >> >> drivers/pinctrl/berlin/berlin.c:237 berlin_pinctrl_build_state() >> warn: passing devm_ allocated

[PATCH v2] pinctrl: berlin: fix 'pctrl->functions' allocation in berlin_pinctrl_build_state

2018-07-31 Thread YueHaibing
called in there, devm_kzalloc() shouldn't be used with the allocation in the first place. Fix the warning by calling kcalloc() and managing the free procedure in error path on our own. Fixes: 3de68d331c24 ("pinctrl: berlin: add the core pinctrl driver for Marvell Berlin SoCs") Signed-off-by: YueHaibi

[PATCH v3] pinctrl: berlin: fix 'pctrl->functions' allocation in berlin_pinctrl_build_state

2018-07-31 Thread YueHaibing
called in there, devm_kzalloc() shouldn't be used with the allocation in the first place. Fix the warning by calling kcalloc() and managing the free procedure in error path on our own. Fixes: 3de68d331c24 ("pinctrl: berlin: add the core pinctrl driver for Marvell Berlin SoCs") Signed-off-by: YueHaibi

[PATCH] nds32: add NULL entry to the end of_device_id array

2018-08-06 Thread YueHaibing
Make sure of_device_id tables are NULL terminated. Found by coccinelle spatch "misc/of_table.cocci" Signed-off-by: YueHaibing --- arch/nds32/kernel/atl2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/nds32/kernel/atl2c.c b/arch/nds32/kernel/atl2c.c ind

[PATCH] kernel: remove duplicated include from sys.c

2018-08-21 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- kernel/sys.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/sys.c b/kernel/sys.c index 45dc552..d0281b5 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -71,9 +71,6 @@ #include #include -/* Hardening for Spectre-v1

Re: [PATCH v2] ARM: dma-mapping: always clear allocated buffers

2018-08-21 Thread YueHaibing
Russell, will you pick this patch? On 2018/7/25 15:13, YueHaibing wrote: > +CC Christoph Hellwig > > On 2018/7/25 15:07, YueHaibing wrote: >> Sean Wang reported dma_zalloc_coherent doesn't work as expect on his >> armv7,the allocated mem is not zeroed.The reason

[PATCH] x86: use PTR_ERR_OR_ZERO to fix ptr_ret.cocci warning

2018-07-20 Thread YueHaibing
ptr_ret.cocci warnings: arch/x86/kernel/pcspeaker.c:12:8-14: WARNING: PTR_ERR_OR_ZERO can be used use PTR_ERR_OR_ZERO rather than an open-code version to fix this. Signed-off-by: YueHaibing --- arch/x86/kernel/pcspeaker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] ARM: dma-mapping: always clear allocated buffers

2018-07-24 Thread YueHaibing
On 2018/7/25 2:09, Christoph Hellwig wrote: > On Tue, Jul 24, 2018 at 10:04:35PM +0800, YueHaibing wrote: >> Sean Wang report dma_zalloc_coherent doesn't work as expect on his >> armv7,the allocated mem is not zeroed.The reason is __alloc_from_pool >> doesn't honor __GFP_ZERO

[PATCH v2] ARM: dma-mapping: always clear allocated buffers

2018-07-25 Thread YueHaibing
c_coherent() behavior on ARM architecture with other implementations by unconditionally zeroing allocated buffer.Also to fix dma_zalloc_coherent behavior. Reported-by: Sean Wang Signed-off-by: YueHaibing Reviewed-by: zhong jiang --- v2: reference more argument from arm64 commit as Christoph suggested

Re: [PATCH v2] ARM: dma-mapping: always clear allocated buffers

2018-07-25 Thread YueHaibing
+CC Christoph Hellwig On 2018/7/25 15:07, YueHaibing wrote: > Sean Wang reported dma_zalloc_coherent doesn't work as expect on his > armv7,the allocated mem is not zeroed.The reason is __alloc_from_pool > doesn't honor __GFP_ZERO. > > As commit 6829e274a623 ("arm64: dma-m

[PATCH ipsec-next] xfrm: fix 'passing zero to ERR_PTR()' warning

2018-07-25 Thread YueHaibing
plate resolving always returns xfrms") Signed-off-by: YueHaibing --- net/xfrm/xfrm_policy.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 5f48251..4adbeb2 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c

[PATCH net-next] tipc: add missing dev_put() on error in tipc_enable_l2_media

2018-07-25 Thread YueHaibing
when tipc_own_id failed to obtain node identity,dev_put should be call before return -EINVAL. Fixes: 682cd3cf946b ("tipc: confgiure and apply UDP bearer MTU on running links") Signed-off-by: YueHaibing --- net/tipc/bearer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tip

Re: [PATCH net-next] bnxt_en: Fix logic of forward the VF MAC address to PF in bnxt_vf_validate_set_mac

2018-07-25 Thread YueHaibing
On 2018/7/25 5:48, Michael Chan wrote: > On Tue, Jul 24, 2018 at 9:01 AM, Vasundhara Volam > wrote: >> On Tue, Jul 24, 2018 at 1:01 PM, Michael Chan >> wrote: >>> >>> On Mon, Jul 23, 2018 at 10:24 PM, YueHaibing wrote: >>>> Based on the co

[PATCH net-next] bnxt_en: combine 'else if' and 'else' into single branche

2018-07-25 Thread YueHaibing
The else-if branch and else branch set mac_ok to true similarly, so combine the two into single else branch. Aslo add comments to explain the two conditions, which from Michael Chan and Vasundhara Volam. Signed-off-by: YueHaibing --- drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 8

[PATCH] cpufreq: qcom-kryo: add NULL entry to the end of_device_id array

2018-07-23 Thread YueHaibing
Make sure of_device_id tables are NULL terminated Found by coccinelle spatch "misc/of_table.cocci" Signed-off-by: YueHaibing --- drivers/cpufreq/qcom-cpufreq-kryo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c b/drivers/cpufreq/qcom-cpuf

[PATCH] x86: Use PTR_ERR_OR_ZERO

2018-07-19 Thread YueHaibing
Replace IS_ERR/PTR_ERR Signed-off-by: YueHaibing --- arch/x86/kernel/pcspeaker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/pcspeaker.c b/arch/x86/kernel/pcspeaker.c index da5190a..4a710ff 100644 --- a/arch/x86/kernel/pcspeaker.c +++ b/arch/x86/kernel

[PATCH] ARM: dma-mapping: always clear allocated buffers

2018-07-24 Thread YueHaibing
ers to fix this. Reported-by: Sean Wang Signed-off-by: YueHaibing Reviewed-by: zhong jiang --- arch/arm/mm/dma-mapping.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 6656647..cf5882f 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/

[PATCH rdma-next] RDMA/qedr: remove set but not used variable 'ctx'

2018-08-31 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/infiniband/hw/qedr/verbs.c: In function 'qedr_create_srq': drivers/infiniband/hw/qedr/verbs.c:1450:24: warning: variable 'ctx' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/infiniband/hw/qedr/verbs.c

[PATCH -next] interconnect: Remove set but not used variable 'p'

2018-09-06 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/interconnect/core.c: In function 'icc_set': drivers/interconnect/core.c:350:23: warning: variable 'p' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/interconnect/core.c | 2 -- 1 file changed, 2

[PATCH -next] interconnect: qcom: fix return value of qnoc_probe

2018-09-06 Thread YueHaibing
be a local variable in for-loop. Fixes: 8d9300299a40 ("interconnect: qcom: Add msm8916 interconnect provider driver") Signed-off-by: YueHaibing --- drivers/interconnect/qcom/msm8916.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/interconnect/qcom/msm8916.c b/drivers/in

[PATCH -next] drm: Remove set but not used variable 'config'

2018-09-11 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/drm_plane.c: In function 'drm_mode_getplane_res': drivers/gpu/drm/drm_plane.c:475:26: warning: variable 'config' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/gpu/drm/drm_plane.c | 2 -- 1 file

[PATCH] ACPI: button: hide unused procfs helpers

2018-07-13 Thread YueHaibing
-by: YueHaibing --- drivers/acpi/button.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 2345a5e..8538e25 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -252,6 +252,7 @@ static int acpi_lid_notify_state(struct acpi_device

[PATCH] staging/rtl8192u: hide unused procfs helpers

2018-07-13 Thread YueHaibing
*m, void *v) ^ drivers/staging/rtl8192u/r8192U_core.c:627:12: warning: ‘proc_get_stats_rx’ defined but not used [-Wunused-function] static int proc_get_stats_rx(struct seq_file *m, void *v) ^ fix this by adding #ifdef around them. Signed-off-by: YueHaibing --- drivers

Re: [PATCH] connector: hide unused procfs helpers

2018-07-13 Thread YueHaibing
pls ignore this,my bad. On 2018/7/13 15:11, YueHaibing wrote: > When CONFIG_PROC_FS isn't set, gcc warning this: > > drivers/connector/connector.c:242:12: warning: ‘cn_proc_show’ defined but not > used [-Wunused-function] > static int cn_proc_show(struct seq_f

Re: [PATCH] staging/rtl8192u: hide unused procfs helpers

2018-07-13 Thread YueHaibing
Pls ignore this, there has a fix. [PATCH] staging/rtl8192u: fix defined but not used build warnings On 2018/7/13 16:01, YueHaibing wrote: > When CONFIG_PROC_FS isn't set, gcc warning this: > > drivers/staging/rtl8192u/r8192U_core.c:508:12: warning: ‘proc_get_stats_ap’ > defined

Re: [PATCH] ACPI: button: hide unused procfs helpers

2018-07-13 Thread YueHaibing
sorry for noise,there has a fix: [PATCH] acpi/button.c: fix defined but not used warning https://lkml.org/lkml/2018/7/11/231 On 2018/7/13 15:19, YueHaibing wrote: > When CONFIG_PROC_FS isn't set, gcc warning this: > > drivers/acpi/button.c:255:12: warning: ‘acpi_button_state_seq_show

[PATCH -next] staging: mt7621-pci: Use PTR_ERR_OR_ZERO in mt7621_pcie_parse_dt()

2018-09-11 Thread YueHaibing
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing --- drivers/staging/mt7621-pci/pci-mt7621.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index

[PATCH] powerpc/xics: add missing of_node_put() in error path

2018-04-25 Thread YueHaibing
The device node obtained with of_find_compatible_node() should be released by calling of_node_put(). But it was not released when of_get_property() failed. Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- arch/powerpc/sysdev/xics/xics-common.c | 3 +++ 1 file changed, 3 insertions(+)

Re: [PATCH] irqchip/gic-v3: check kasprintf() for failures

2018-04-24 Thread YueHaibing
On 2018/4/24 15:21, Marc Zyngier wrote: > On Tue, 24 Apr 2018 08:10:36 +0100, > YueHaibing wrote: >> >> We should just return -ENOMEM here if the allocation fails, >> otherwise it may cause a panic. > > Can you explain how? From what I can see, node_name is only u

[PATCH] irqchip/gic-v3: check kasprintf() for failures

2018-04-24 Thread YueHaibing
We should just return -ENOMEM here if the allocation fails, otherwise it may cause a panic. Signed-off-by: YueHaibing <yuehaib...@huawei.com> --- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 3 +++ drivers/irqchip/irq-gic-v3-its-platform-msi.c | 3 +++ 2 files changed, 6 insertions(+)

Re: [PATCH] lib/string.c: fix a typo in comment: 'iff' -->'if'

2018-06-28 Thread YueHaibing
On 2018/6/29 11:35, Randy Dunlap wrote: > On 06/28/2018 08:33 PM, YueHaibing wrote: >> Signed-off-by: YueHaibing >> --- >> lib/string.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > Hi, > > This isn't a typo. "iff" means

[PATCH] lib/string.c: fix a typo in comment: 'iff' -->'if'

2018-06-28 Thread YueHaibing
Signed-off-by: YueHaibing --- lib/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/string.c b/lib/string.c index 2c0900a..23ed944 100644 --- a/lib/string.c +++ b/lib/string.c @@ -609,7 +609,7 @@ EXPORT_SYMBOL(strsep); * @s1: one string * @s2: another string

[PATCH -next] misc: mic: scif: remove set but not used variables 'src_dma_addr, dst_dma_addr'

2018-10-11 Thread YueHaibing
: warning: variable 'src_dma_addr' set but not used [-Wunused-but-set-variable] They never used since introduction in commit 7cc31cd27752 ("misc: mic: SCIF DMA and CPU copy interface") Signed-off-by: YueHaibing --- drivers/misc/mic/scif/scif_dma.c | 3 --- 1 file changed, 3 deletions(-)

[PATCH -next] x86/cpu: Drop pointless static qualifier in punit_dev_state_show()

2018-10-12 Thread YueHaibing
There is no need to have the 'struct dentry *dev_state' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing --- arch/x86/platform/atom/punit_atom_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/platform/atom

[PATCH -next] nds32: Remove duplicated include from pm.c

2018-10-29 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- arch/nds32/kernel/pm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/nds32/kernel/pm.c b/arch/nds32/kernel/pm.c index 6989560..ffa8040 100644 --- a/arch/nds32/kernel/pm.c +++ b/arch/nds32/kernel/pm.c @@ -5,7 +5,6 @@ #include

[PATCH -next] edac: i82975x: remove set but not used variable 'dtype'

2018-10-31 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/edac/i82975x_edac.c:378:16: warning: variable ‘dtype’ set but not used [-Wunused-but-set-variable] It never used since introduction in commit 084a4fccef39 ("edac: move dimm properties to struct dimm_info") Signed-off-by:

[PATCH -next] firewire: net: remove set but not used variable 'guid'

2018-10-31 Thread YueHaibing
ction.") Signed-off-by: YueHaibing --- drivers/firewire/net.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index 82ba110..5dcb991 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c @@ -485,7 +485,6 @@ static int fwnet_finish_incom

[PATCH -next] sgi-xp: drop pointless static qualifier in xpc_setup_msg_structures_uv

2018-10-26 Thread YueHaibing
There is no need to have the 'enum xp_retval ret' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing --- drivers/misc/sgi-xp/xpc_uv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp

Re: [PATCH -next] edac: i82975x: remove set but not used variable 'dtype'

2018-11-06 Thread YueHaibing
On 2018/11/7 2:05, Borislav Petkov wrote: > On Thu, Nov 01, 2018 at 10:26:04AM +0800, YueHaibing wrote: >> Fixes gcc '-Wunused-but-set-variable' warning: >> >> drivers/edac/i82975x_edac.c:378:16: warning: >> variable ‘dtype’ set but not used [-Wunused-but-set-variable

[PATCH v2 -next] edac: i82975x: remove set but not used variable 'dtype'

2018-11-06 Thread YueHaibing
e function i82975x_dram_type and move the comment and the assignment to the single called place. Signed-off-by: YueHaibing --- v2: remove unnecessary function i82975x_dram_type --- drivers/edac/i82975x_edac.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/dr

[PATCH -next] ufs: remove set but not used variable 'usb3'

2018-11-08 Thread YueHaibing
From: Yue Haibing Fixes gcc '-Wunused-but-set-variable' warning: fs/ufs/super.c: In function 'ufs_statfs': fs/ufs/super.c:1409:32: warning: variable 'usb3' set but not used [-Wunused-but-set-variable] It not used any more after commit c596961d1b4c ("ufs: fix s_size/s_dsize users")

[PATCH -next] sysv: return 'err' instead of 0 in __sysv_write_inode

2018-11-09 Thread YueHaibing
inode(), switch sysv to simple_fsync()") Signed-off-by: YueHaibing --- fs/sysv/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c index 499a20a..273736f 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c @@ -275,7 +275,7 @@

[PATCH -next] misc: mic/scif: fix copy-paste error in scif_create_remote_lookup

2018-11-13 Thread YueHaibing
if the address is within the vmalloc range. Fixes: ba612aa8b487 ("misc: mic: SCIF memory registration and unregistration") Signed-off-by: YueHaibing --- drivers/misc/mic/scif/scif_rma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/mic/scif/scif_rma.c b/dr

[PATCH -next] drm/msm: dpu: Fix "WARNING: invalid free of devm_ allocated data"

2018-11-16 Thread YueHaibing
'dpu_enc' is a member of 'drm_enc' And 'drm_enc' got allocated with devm_kzalloc in dpu_encoder_init. This gives this error message: ./drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:459:1-6: WARNING: invalid free of devm_ allocated data Signed-off-by: YueHaibing --- drivers/gpu/drm/msm/disp/dpu1

[PATCH -next] i3c: master: Remove set but not used variable 'old_i3c_scl_lim'

2018-11-13 Thread YueHaibing
acfab7d324b2 ("i3c: master: Add driver for Cadence IP") Signed-off-by: YueHaibing --- drivers/i3c/master/i3c-master-cdns.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c index ad40162..e828921 100644 ---

[PATCH -next] ASoC: amd: remove set but not used variable 'dma_buffer'

2018-11-14 Thread YueHaibing
("ASoC: amd: add acp3x system resume pm op") Signed-off-by: YueHaibing --- sound/soc/amd/raven/acp3x-pcm-dma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 2e61cef..28a867f 100644 --- a/sound/soc

[PATCH -next] eeprom: at25: remove unneeded 'at25_remove'

2018-10-05 Thread YueHaibing
move is do nothing, so can be removed. Signed-off-by: YueHaibing --- drivers/misc/eeprom/at25.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c index d874df7..99de693 100644 --- a/drivers/misc/eeprom/at25.c +++ b/drivers/m

[PATCH -next] staging: axis-fifo: remove duplicated include from axis-fifo.c

2018-10-05 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/staging/axis-fifo/axis-fifo.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c index 63c8efd..48a9877 100644 --- a/drivers/staging/axis-fifo/axis

[PATCH v2] mt76x0: pci: fix set external PA I/O current

2018-10-08 Thread YueHaibing
is 'data' Fixes: 2b2cb40bcd7d ("mt76x0: pci: add hw initialization at bootstrap") Signed-off-by: YueHaibing Acked-by: Lorenzo Bianconi --- v2: remove 'net-next' from patch title --- drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletion

[PATCH -next] staging: rtlwifi: Remove set but not used variable 'ppsc'

2018-09-27 Thread YueHaibing
/halbtcoutsrc.c: In function 'halbtc_enter_lps': drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c:307:21: warning: variable 'ppsc' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c | 4 1 file changed, 4 deletions

[PATCH] mmc: tegra: fix inconsistent IS_ERR and PTR_ERR

2018-09-03 Thread YueHaibing
Fix inconsistent IS_ERR and PTR_ERR in tegra_sdhci_init_pinctrl_info, the proper pointer to be passed as argument is 'pinctrl_state_1v8' Signed-off-by: YueHaibing --- drivers/mmc/host/sdhci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci

[PATCH -next] serial: imx: remove set but not used variable 'rtsirq'

2018-09-19 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/tty/serial/imx.c: In function 'imx_uart_probe': drivers/tty/serial/imx.c:2198:20: warning: variable 'rtsirq' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/tty/serial/imx.c | 3 +-- 1 file changed, 1

[PATCH -next] pinctrl: qcom: spmi-mpp: Fix err handling of pmic_mpp_set_mux

2018-09-19 Thread YueHaibing
'ret' should be returned while pmic_mpp_write_mode_ctl fails. Fixes: 0e948042c420 ("pinctrl: qcom: spmi-mpp: Implement support for sink mode") Signed-off-by: YueHaibing --- drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pi

Re: [PATCH -next] RDMA/core: Properly return the error code of rdma_set_src_addr_rcu

2018-09-19 Thread YueHaibing
On 2018/9/20 0:14, Jason Gunthorpe wrote: > On Wed, Sep 19, 2018 at 08:28:38PM +0800, YueHaibing wrote: >> rdma_set_src_addr_rcu should check copy_src_l2_addr fails, >> rather than always return 0. Also copy_src_l2_addr should return >> 'ret' as its return value while rd

[PATCH -next] pinctrl: sunxi: fix 'pctrl->functions' allocation in sunxi_pinctrl_build_state

2018-09-20 Thread YueHaibing
called in there, devm_kzalloc() shouldn't be used with the allocation in the first place. Fix the warning by calling kcalloc() and managing the free procedure in error path on our own. Fixes: 0e37f88d9ad8 ("ARM: sunxi: Add pinctrl driver for Allwinner SoCs") Signed-off-by: YueHaibing --- drive

Re: [PATCH net-next 17/22] hv_netvsc: fix return type of ndo_start_xmit function

2018-09-20 Thread YueHaibing
On 2018/9/20 22:43, Stephen Hemminger wrote: > On Thu, 20 Sep 2018 20:33:01 +0800 > YueHaibing wrote: > >> The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', >> which is a typedef for an enum type, so make sure the implementation in >> this driv

[PATCH -next] bus: fsl-mc: remove duplicated include

2018-09-19 Thread YueHaibing
Remove duplicated include linux/fsl/mc.h Signed-off-by: YueHaibing --- drivers/bus/fsl-mc/dpbp.c | 1 - drivers/bus/fsl-mc/dpcon.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/bus/fsl-mc/dpbp.c b/drivers/bus/fsl-mc/dpbp.c index 17e3c5d..9003cd3 100644 --- a/drivers/bus/fsl-mc

[PATCH -next] mm/gup_benchmark: Fix unsigned comparison to zero in __gup_benchmark_ioctl

2018-09-21 Thread YueHaibing
get_user_pages_fast will return negative value if no pages were pinned, then be converted to a unsigned, which is compared to zero, giving the wrong result. Fixes: 09e35a4a1ca8 ("mm/gup_benchmark: handle gup failures") Signed-off-by: YueHaibing --- mm/gup_benchmark.c | 3 ++- 1 file

[PATCH net-next] l2tp: fix return type of ndo_start_xmit function

2018-09-26 Thread YueHaibing
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- net

[PATCH -next] PCI: hotplug: Remove set but not used variable 'physical_slot'

2018-09-26 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/pci/hotplug/cpqphp_core.c: In function 'init_SERR': drivers/pci/hotplug/cpqphp_core.c:124:5: warning: variable 'physical_slot' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/pci/hotplug/cpqphp_core.c

[PATCH -next] ASoC: qcom: qdsp6: remove duplicated include

2018-09-26 Thread YueHaibing
Remove duplicated includes linux/of_platform.h and linux/wait.h Signed-off-by: YueHaibing --- sound/soc/qcom/qdsp6/q6asm.c | 1 - sound/soc/qcom/qdsp6/q6core.c | 1 - 2 files changed, 2 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c index 2b2c723

[PATCH -next] nfsd: remove set but not used variable 'dirp'

2018-09-25 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: fs/nfsd/vfs.c: In function 'nfsd_create': fs/nfsd/vfs.c:1279:16: warning: variable 'dirp' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- fs/nfsd/vfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/nfsd/vfs.c

[PATCH -next] RDMA/core: Properly return the error code of rdma_set_src_addr_rcu

2018-09-19 Thread YueHaibing
;) Signed-off-by: YueHaibing --- drivers/infiniband/core/addr.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 7a0356c..8a31b11 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/add

Re: [PATCH -next] serial: imx: remove set but not used variable 'rtsirq'

2018-09-20 Thread YueHaibing
On 2018/9/20 17:41, Andy Duan wrote: > From: Leonard Crestez Sent: 2018年9月20日 16:51 >> On Thu, 2018-09-20 at 08:45 +0200, Jiri Slaby wrote: >>> On 09/20/2018, 03:58 AM, YueHaibing wrote: >>>> Fixes gcc '-Wunused-but-set-variable' warning: >>>>

[PATCH net-next 00/22] net: fix return type of ndo_start_xmit function

2018-09-20 Thread YueHaibing
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. YueHaibing (22): net: micrel: fix return type

[PATCH net-next 05/22] net: sgi: fix return type of ndo_start_xmit function

2018-09-20 Thread YueHaibing
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing

[PATCH net-next 02/22] net: freescale: fix return type of ndo_start_xmit function

2018-09-20 Thread YueHaibing
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing

[PATCH net-next 09/22] net: smsc: fix return type of ndo_start_xmit function

2018-09-20 Thread YueHaibing
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing

[PATCH net-next 11/22] net: faraday: fix return type of ndo_start_xmit function

2018-09-20 Thread YueHaibing
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- drivers/net/ethernet/faraday

[PATCH net-next 14/22] net: caif: fix return type of ndo_start_xmit function

2018-09-20 Thread YueHaibing
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing

  1   2   >