[PATCH -next] coresight: stm: remove set but not used variable 'res_size'

2018-12-01 Thread YueHaibing
237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component") Signed-off-by: YueHaibing --- drivers/hwtracing/coresight/coresight-stm.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing

[PATCH -next] cpuset: Remove set but not used variable 'cs'

2018-11-30 Thread YueHaibing
multi-destination migration from subtree_control enabling") Signed-off-by: YueHaibing --- kernel/cgroup/cpuset.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index e9f6906..48cfe55 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgrou

[PATCH -next] mm/hmm: remove set but not used variable 'devmem'

2018-11-30 Thread YueHaibing
reate() with devm_memremap_pages()") Signed-off-by: YueHaibing --- mm/hmm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index 50fbaf8..361f370 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -992,9 +992,6 @@ static void hmm_devmem_ref_exit(void *data) static void hmm_devmem_ref_kill(struct

[PATCH -next] remoteproc: remove duplicated include from qcom_sysmon.c

2018-11-30 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/remoteproc/qcom_sysmon.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/remoteproc/qcom_sysmon.c b/drivers/remoteproc/qcom_sysmon.c index e976a60..603b813 100644 --- a/drivers/remoteproc/qcom_sysmon.c +++ b/drivers

[PATCH -next] PNP: remove duplicated include from quirks.c

2018-11-30 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/pnp/quirks.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index 803666a..280943d 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c @@ -226,8 +226,6 @@ static void

Re: [PATCH] iwlwifi: mvm: remove duplicated include from ops.c

2018-11-30 Thread YueHaibing
Sorry, pls ignore this On 2018/11/30 19:13, YueHaibing wrote: > Remove duplicated include. > > Signed-off-by: YueHaibing > --- > drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/net/wireless/intel/iwlwifi/mv

[PATCH] iwlwifi: mvm: remove duplicated include from ops.c

2018-11-30 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index a31dc99..b85c877 100644 --- a/drivers/net

Re: [PATCH -next] PNP: remove duplicated include from quirks.c

2018-11-30 Thread YueHaibing
Pls ignore this, the maintainer' email is wrong. On 2018/11/30 19:11, YueHaibing wrote: > Remove duplicated include. > > Signed-off-by: YueHaibing > --- > drivers/pnp/quirks.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/pnp/quirks.c b/drivers/pnp/

[PATCH -next] PNP: remove duplicated include from quirks.c

2018-11-30 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/pnp/quirks.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index 803666a..280943d 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c @@ -226,8 +226,6 @@ static void

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

2018-11-30 Thread YueHaibing
Remove duplicated include. 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/dpbp.c +++ b

[PATCH -next] ocfs2: Use kmemdup rather than duplicating its implementation

2018-11-28 Thread YueHaibing
Use kmemdup rather than duplicating its implementation Signed-off-by: YueHaibing --- fs/ocfs2/localalloc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 308f05b..3572204 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs

[PATCH -next] platform/x86: intel-ips: remove unnecessary checks in ips_debugfs_init

2018-11-26 Thread YueHaibing
/x86/intel_ips.c:1328 ips_debugfs_init() warn: passing zero to 'PTR_ERR' Signed-off-by: YueHaibing --- drivers/platform/x86/intel_ips.c | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c

[PATCH v2 -next] platform/x86: intel-ips: fix 'passing zero to PTR_ERR()' warning

2018-11-26 Thread YueHaibing
is enabled, which should not passing to PTR_ERR. Fixes: aa7ffc01d254 ("x86 platform driver: intelligent power sharing driver") Signed-off-by: YueHaibing --- v2:Fix typo in patch log and title --- drivers/platform/x86/intel_ips.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletion

Re: [PATCH -next] platform/x86: intel-ips: fix 'passing zero to ERR_PTR()' warning

2018-11-26 Thread YueHaibing
On 2018/11/26 21:06, YueHaibing wrote: > Fix a static code checker warning: > drivers/platform/x86/intel_ips.c:1314 > ips_debugfs_init() warn: passing zero to 'PTR_ERR' > drivers/platform/x86/intel_ips.c:1328 > ips_debugfs_init() warn: passing zero to 'PTR_ERR' >

[PATCH -next] platform/x86: intel-ips: fix 'passing zero to ERR_PTR()' warning

2018-11-26 Thread YueHaibing
is enabled, which should not passing to ERR_PTR. Fixes: aa7ffc01d254 ("x86 platform driver: intelligent power sharing driver") Signed-off-by: YueHaibing --- drivers/platform/x86/intel_ips.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/platform/x86/int

[PATCH net-next] e100: Fix passing zero to 'PTR_ERR' warning in e100_load_ucode_wait

2018-11-19 Thread YueHaibing
Fix a static code checker warning: drivers/net/ethernet/intel/e100.c:1349 e100_load_ucode_wait() warn: passing zero to 'PTR_ERR' Signed-off-by: YueHaibing --- drivers/net/ethernet/intel/e100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel

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

2018-11-18 Thread YueHaibing
Fix a static code checker warning: fs/exportfs/expfs.c:171 reconnect_one() warn: passing zero to 'ERR_PTR' The error path for lookup_one_len_unlocked failure should set err to PTR_ERR. Fixes: bbf7a8a3562f ("exportfs: move most of reconnect_path to helper function") Signed-off-by:

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

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

[tip:perf/core] x86/cpu: Drop pointless static qualifier in punit_dev_state_show()

2018-10-12 Thread tip-bot for YueHaibing
Commit-ID: f703fd374ef8fb06e46713b326d255e20d6278ad Gitweb: https://git.kernel.org/tip/f703fd374ef8fb06e46713b326d255e20d6278ad Author: YueHaibing AuthorDate: Fri, 12 Oct 2018 10:40:22 + Committer: Ingo Molnar CommitDate: Fri, 12 Oct 2018 12:48:44 +0200 x86/cpu: Drop pointless

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

[tip:x86/hyperv] x86/hyperv: Remove unused include

2018-09-27 Thread tip-bot for YueHaibing
Commit-ID: 5140a6f471137205687428b0b8f12f7187bffd18 Gitweb: https://git.kernel.org/tip/5140a6f471137205687428b0b8f12f7187bffd18 Author: YueHaibing AuthorDate: Sun, 23 Sep 2018 08:20:22 + Committer: Thomas Gleixner CommitDate: Thu, 27 Sep 2018 21:21:00 +0200 x86/hyperv: Remove

[PATCH -next] VMCI: remove set but not used variable 'cid'

2018-09-27 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/misc/vmw_vmci/vmci_host.c: In function 'vmci_host_do_alloc_queuepair': drivers/misc/vmw_vmci/vmci_host.c:450:6: warning: variable 'cid' set but not used [-Wunused-but-set-variable] u32 cid; ^ Signed-off-by: YueHaibing --- drivers

[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 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] 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] ring-buffer: Fix ring buffer size in rb_write_something

2018-09-23 Thread YueHaibing
'cnt' should be used to calculate ring buffer size rather than data->cnt Signed-off-by: YueHaibing --- kernel/trace/ring_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 65bd461..53538c3 100

[PATCH -next] x86/hyper-v: Remove unused including

2018-09-23 Thread YueHaibing
Remove including that don't need it. Signed-off-by: YueHaibing --- arch/x86/hyperv/hv_apic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c index 2c43e30..8eb6fbee 100644 --- a/arch/x86/hyperv/hv_apic.c +++ b/arch/x86/hyperv/hv_apic.c

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

[PATCH net-next 15/22] net: hamradio: 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 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

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

[PATCH -next] ipc/shm: Use ERR_CAST to return error code

2018-09-19 Thread YueHaibing
Fix gcc warning: ipc/shm.c: In function 'shm_lock' ipc/shm.c:210:2: note: randstruct: casting between randomized structure pointer types (ssa): 'struct shmid_kernel' and 'struct kern_ipc_perm' Signed-off-by: YueHaibing --- ipc/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH 6/6] net: sun: fix return type of ndo_start_xmit function

2018-09-19 Thread YueHaibing
Sorry for wrongly title, will repost. On 2018/9/19 19:07, YueHaibing wrote: > 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.

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

2018-09-19 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 -next] fs/iomap.c: remove duplicated include

2018-09-17 Thread YueHaibing
Remove duplicated include linux/swap.h Signed-off-by: YueHaibing --- fs/iomap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/iomap.c b/fs/iomap.c index 9fb78e5..a5613e5 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -30,7 +30,6 @@ #include #include #include -#include #include

[PATCH] xfs: remove duplicated include from alloc.c

2018-09-17 Thread YueHaibing
Remove duplicated include xfs_alloc.h Signed-off-by: YueHaibing --- fs/xfs/scrub/alloc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/xfs/scrub/alloc.c b/fs/xfs/scrub/alloc.c index 036b5c7..376bcb5 100644 --- a/fs/xfs/scrub/alloc.c +++ b/fs/xfs/scrub/alloc.c @@ -17,7 +17,6 @@ #include

[PATCH -next] mm: swap: remove duplicated include from swap.c

2018-09-17 Thread YueHaibing
Remove duplicated include linux/memremap.h Signed-off-by: YueHaibing --- mm/swap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/swap.c b/mm/swap.c index 26fc9b5..87a54c8 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -29,7 +29,6 @@ #include #include #include -#include #include

Re: [PATCH net-next] net/smc: cast sizeof to int for comparison

2018-09-16 Thread YueHaibing
On 2018/9/15 19:35, Andreas Schwab wrote: > On Sep 15 2018, YueHaibing wrote: > >> Comparing an int to a size, which is unsigned, causes the int to become >> unsigned, giving the wrong result. kernel_sendmsg can return a negative >> error code. >> >> Signed-of

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

2018-09-15 Thread YueHaibing
Ping. 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-mapping: always cle

[PATCH -next] iio: potentiometer: mcp4531: merge calls to of_match_device and of_device_get_match_data

2018-09-15 Thread YueHaibing
Drop call to of_match_device, which is subsumed by the subsequent call to of_device_get_match_data. The code becomes simpler, and a temporary variable can be dropped. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/iio/potentiometer/mcp4531.c | 7 ++- 1 file changed, 2

[PATCH -next] iio: potentiometer: mcp4018: merge calls to of_match_device and of_device_get_match_data

2018-09-15 Thread YueHaibing
Drop call to of_match_device, which is subsumed by the subsequent call to of_device_get_match_data. The code becomes simpler, and a temporary variable can be dropped. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/iio/potentiometer/mcp4018.c | 7 ++- 1 file changed, 2

[PATCH -next] iio: potentiometer: max5481: merge calls to of_match_device and of_device_get_match_data

2018-09-15 Thread YueHaibing
Drop call to of_match_device, which is subsumed by the subsequent call to of_device_get_match_data. The code becomes simpler, and a temporary variable can be dropped. Found by coccinelle. Signed-off-by: YueHaibing --- drivers/iio/potentiometer/max5481.c | 7 ++- 1 file changed, 2

[PATCH -next] ASoC: qdsp6: q6asm-dai: remove duplicated include from q6asm-dai.c

2018-09-13 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- sound/soc/qcom/qdsp6/q6asm-dai.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c index c75fab3..c3806d7 100644 --- a/sound/soc/qcom/qdsp6/q6asm-dai.c +++ b/sound/soc

[PATCH -next] RDMA: Remove duplicated include from ib_addr.h

2018-09-13 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- include/rdma/ib_addr.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index 77c7908..8964e84 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h @@ -46,7 +46,6 @@ #include

[PATCH -next] Smack: remove set but not used variable 'root_inode'

2018-09-13 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: security/smack/smackfs.c: In function 'smk_fill_super': security/smack/smackfs.c:2856:16: warning: variable 'root_inode' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- security/smack/smackfs.c | 3 --- 1 file changed

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

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

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

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

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

[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

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

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

[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

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

[tip:x86/cleanups] x86/platform/pcspeaker: Use PTR_ERR_OR_ZERO() to fix ptr_ret.cocci warning

2018-07-24 Thread tip-bot for YueHaibing
Commit-ID: 2397134ce2d73dcf1d4846579f594c9f3880b2ec Gitweb: https://git.kernel.org/tip/2397134ce2d73dcf1d4846579f594c9f3880b2ec Author: YueHaibing AuthorDate: Fri, 20 Jul 2018 15:32:13 +0800 Committer: Ingo Molnar CommitDate: Tue, 24 Jul 2018 09:46:42 +0200 x86/platform/pcspeaker: Use

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

  1   2   >