[PATCH v3] mtd: maps: l440gx: Avoid printing address to dmesg

2019-10-10 Thread Fuqian Huang
Avoid printing the address of l440gx_map.virt every time l440gx init. Signed-off-by: Fuqian Huang --- Changes in v3: -- use pr_debug instead of printk(KERN_DEBUG) drivers/mtd/maps/l440gx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/maps/l440gx.c b/drivers

[PATCH v2] mtd: maps: l440gx: Avoid printing address to dmesg

2019-10-10 Thread Fuqian Huang
Avoid printing the address of l440gx_map.virt every time l440gx init. Signed-off-by: Fuqian Huang --- drivers/mtd/maps/l440gx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/maps/l440gx.c b/drivers/mtd/maps/l440gx.c index 876f12f40018..ebe37edc8e88 100644

[PATCH] xen/grant-table: remove unnecessary printing

2019-10-10 Thread Fuqian Huang
xen_auto_xlat_grant_frames.vaddr is definitely NULL in this case. So the address printing is unnecessary. Signed-off-by: Fuqian Huang --- drivers/xen/grant-table.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index

[PATCH] mtd: maps: l440gx: Avoid print address to dmesg

2019-10-10 Thread Fuqian Huang
Avoid print the address of l440gx_map.virt every time l440gx init. Signed-off-by: Fuqian Huang --- drivers/mtd/maps/l440gx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mtd/maps/l440gx.c b/drivers/mtd/maps/l440gx.c index 876f12f40018..e7e40bca82d1 100644 --- a/drivers/mtd/maps

[PATCH] m68k: q40: Fix info-leak in rtc_ioctl

2019-09-27 Thread Fuqian Huang
. This will leak uninitialized stack content to userland. Fix this by zeroing the uninitialized field. Signed-off-by: Fuqian Huang --- arch/m68k/q40/config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c index e63eb5f06999..f31890078197 100644

Re: [PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-12 Thread Fuqian Huang
Vitaly Kuznetsov 於 2019年9月12日週四 下午6:53寫道: > > Fuqian Huang writes: > > > Vitaly Kuznetsov 於 2019年9月12日週四 下午4:51寫道: > >> > >> Fuqian Huang writes: > >> > >> > Emulation of VMPTRST can incorrectly inject a page fault > >> > when

Re: [PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-12 Thread Fuqian Huang
Vitaly Kuznetsov 於 2019年9月12日週四 下午4:51寫道: > > Fuqian Huang writes: > > > Emulation of VMPTRST can incorrectly inject a page fault > > when passed an operand that points to an MMIO address. > > The page fault will use uninitialized kernel stack memory &g

[PATCH] KVM: x86: work around leak of uninitialized stack contents

2019-09-11 Thread Fuqian Huang
; however, it is not an easy fix, so for now just ensure that the error code and CR2 are zero. Signed-off-by: Fuqian Huang --- arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 290c3c3efb87..7f442d710858 100644 --- a/arch/x86/kvm/x86.c

[PATCH] mfd: ezx-pcap: replace mutex_lock with spin_lock

2019-08-13 Thread Fuqian Huang
As mutex_lock might sleep. Function pcap_adc_irq is an interrupt handler. The use of mutex_lock in pcap_adc_irq may cause sleep in IRQ context. Replace mutex_lock with spin_lock to avoid this. Signed-off-by: Fuqian Huang --- drivers/mfd/ezx-pcap.c | 53

[PATCH] scsi: lpfc: use spin_lock_irqsave instead of spin_lock_irq in IRQ context

2019-08-12 Thread Fuqian Huang
intr_handler <- lpfc_sli_intr_handler and lpfc_sli_intr_handler is an interrupt handler. Interrupts are enabled in interrupt handler. Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_(un)lock_irq in IRQ context to avoid this. Signed-off-by: Fuqian Huang --- drivers/scsi/lpfc/lpfc_hbadisc.c | 5 +++--

[PATCH v2] net: tundra: tsi108: use spin_lock_irqsave instead of spin_lock_irq in IRQ context

2019-08-08 Thread Fuqian Huang
As spin_unlock_irq will enable interrupts. Function tsi108_stat_carry is called from interrupt handler tsi108_irq. Interrupts are enabled in interrupt handler. Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_(un)lock_irq in IRQ context to avoid this. Signed-off-by: Fuqian Huang

[PATCH] scsi: lpfc: remove redundant code

2019-08-07 Thread Fuqian Huang
Remove the redundant initialization code. Signed-off-by: Fuqian Huang --- drivers/scsi/lpfc/lpfc_bsg.c | 1 - drivers/scsi/lpfc/lpfc_sli.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index b7216d694bff..5f66a2da2599 100644

[PATCH] rtc: mxc: use spin_lock_irqsave instead of spin_lock_irq in IRQ context

2019-08-07 Thread Fuqian Huang
As spin_unlock_irq will enable interrupts. mxc_rtc_irq_enable is called from interrupt handler mxc_rtc_interrupt. Interrupts are enabled in interrupt handler. Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_(un)lock_irq in IRQ context to avoid this. Signed-off-by: Fuqian Huang

[PATCH] net: tundra: tsi108: use spin_lock_irqsave instead of spin_lock_irq in IRQ context

2019-08-07 Thread Fuqian Huang
As spin_unlock_irq will enable interrupts. Function tsi108_stat_carry is called from interrupt handler tsi108_irq. Interrupts are enabled in interrupt handler. Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_(un)lock_irq in IRQ context to avoid this. Signed-off-by: Fuqian Huang

[PATCH v2] i2c: avoid sleep in IRQ context

2019-08-07 Thread Fuqian Huang
in interrupt context, use mdelay instead of msleep. Signed-off-by: Fuqian Huang --- drivers/i2c/busses/i2c-pxa.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 2c3c3d6935c0..876e693bafd9 100644 --- a/drivers/i2

Re: [PATCH] i2c: avoid sleep in IRQ context

2019-08-07 Thread Fuqian Huang
Adamski, Krzysztof (Nokia - PL/Wroclaw) 於 2019年8月7日週三 下午2:51寫道: > > On Mon, Aug 05, 2019 at 08:31:34PM +0800, Fuqian Huang wrote: > >i2c_pxa_handler -> i2c_pxa_irq_txempty -> > >i2c_pxa_reset -> i2c_pxa_set_slave -> i2c_pxa_wait_slave > > > >

[PATCH] libata-sff: use spin_lock_irqsave instead of spin_lock_irq in IRQ context.

2019-08-06 Thread Fuqian Huang
nterrupts are enabled in interrupt handler. Use spin_lock_irqsave instead of spin_lock_irq to avoid this. Signed-off-by: Fuqian Huang --- drivers/ata/libata-sff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 10aa2

[PATCH] sgi-xpc: Use GFP_ATOMIC for kmalloc in atomic context.

2019-08-05 Thread Fuqian Huang
c_system_die may be called in atomic context. So the kmalloc in xpc_send_activate_IRQ_uv may be in atomic context. Use GFP_ATOMIC instead of GFP_KERNEL in kmalloc. Signed-off-by: Fuqian Huang --- drivers/misc/sgi-xp/xpc_uv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driv

[PATCH] i2c: avoid sleep in IRQ context

2019-08-05 Thread Fuqian Huang
i2c_pxa_handler -> i2c_pxa_irq_txempty -> i2c_pxa_reset -> i2c_pxa_set_slave -> i2c_pxa_wait_slave As i2c_pxa_handler is an interrupt handler, it will finally calls i2c_pxa_wait_slave which calls msleep. Add in_interrupt check before msleep to avoid sleep in IRQ context. Signed-of

Is it safe to kmalloc a large size of memory in interrupt handler?

2019-08-05 Thread Fuqian Huang
In the implementation of kmalloc. when the allocated size is larger than KMALLOC_MAX_CACHE_SIZE, it will call kmalloc_large to allocate the memory. kmalloc_large ->

Re: [PATCH] drm: use trace_printk rather than printk in drm_dbg.

2019-07-31 Thread Fuqian Huang
Joe Perches 於 2019年7月31日週三 下午2:06寫道: > > On Wed, 2019-07-31 at 10:45 +0800, Fuqian Huang wrote: > > In drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c, > > amdgpu_ih_process calls DRM_DEBUG which calls drm_dbg and > > finally calls printk. > > As amdgpu_ih_process is ca

[PATCH] dmaengine: pl330: use the same attributes when freeing pl330->mcode_cpu

2019-07-26 Thread Fuqian Huang
In function dmac_alloc_resources(), pl330->mcode_cpu is allocated using dma_alloc_attrs() but freed with dma_free_coherent(). Use the correct dma_free_attrs() function to free pl330->mcode_cpu. Signed-off-by: Fuqian Huang --- drivers/dma/pl330.c | 9 + 1 file changed, 5 insertions

Re: [PATCH v3 15/24] media: exynos4-is: Remove call to memset after dma_alloc_coherent

2019-07-15 Thread Fuqian Huang
Sylwester Nawrocki 於 2019年7月15日週一 下午5:00寫道: > > On 7/15/19 05:18, Fuqian Huang wrote: > > In commit 518a2f1925c3 > > ("dma-mapping: zero memory returned from dma_alloc_*"), > > dma_alloc_coherent has already zeroed the memory. > > So memset is not needed

Re: [PATCH v3 04/24] dmaengine: qcom_hidma: Remove call to memset after dmam_alloc_coherent

2019-07-14 Thread Fuqian Huang
Sinan Kaya 於 2019年7月15日週一 下午12:17寫道: > > On 7/14/2019 11:17 PM, Fuqian Huang wrote: > > In commit 518a2f1925c3 > > ("dma-mapping: zero memory returned from dma_alloc_*"), > > dma_alloc_coherent has already zeroed the memory. > > So memset is not needed. &g

[PATCH v3 19/24] vmxnet3: Remove call to memset after dma_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/n

[PATCH v3 22/24] tty: serial: Remove call to memset after pci_alloc_consistent

2019-07-14 Thread Fuqian Huang
pci_alloc_consistent calls dma_alloc_coherent directly. In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit r

[PATCH v3 21/24] scsi: Remove redundant memset

2019-07-14 Thread Fuqian Huang
kcalloc already zeros the memory during allocation. In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So the memset after these functions is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: -

[PATCH v3 16/24] scsi: mptfusion: Remove call to memset after pci_alloc_consistent

2019-07-14 Thread Fuqian Huang
pci_alloc_consistent calls dma_alloc_coherent directly. In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit r

[PATCH v3 17/24] ethernet: remove redundant memset

2019-07-14 Thread Fuqian Huang
not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/net/ethernet/atheros/atlx/atl1.c | 2 -- drivers/net/ethernet/atheros/atlx/atl2.c | 1 - drivers/net/ethernet/broadcom/b

[PATCH v3 15/24] media: exynos4-is: Remove call to memset after dma_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message dri

[PATCH v3 13/24] IB/ipoib: remove unneeded memset

2019-07-14 Thread Fuqian Huang
vzalloc has already zeroed the memory during the allocation. So memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index

[PATCH v3 18/24] hippi: Remove call to memset after pci_alloc_consistent

2019-07-14 Thread Fuqian Huang
pci_alloc_consistent calls dma_alloc_coherent directly. In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit r

[PATCH v3 11/24] RDMA/nes: Remove call to memset after pci_alloc_consistent

2019-07-14 Thread Fuqian Huang
pci_alloc_consitent calls dma_alloc_coherent directly. In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit r

[PATCH v3 14/24] media: ngene: Remove call to memset after pci_alloc_consistent

2019-07-14 Thread Fuqian Huang
pci_alloc_consistent calls dma_alloc_coherent directly. In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit r

[PATCH v3 10/24] IB/mthca: Remove call to memset after dma_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/

[PATCH v3 09/24] rdma/hns: Remove call to memset after dma_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/

[PATCH v3 12/24] RDMA/ocrdma: Remove call to memset after dma_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/

[PATCH v3 08/24] rdma/cxgb4: Remove call to memset after dma_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/

[PATCH v3 06/24] i2c: ismt: Remove call to memset after dmam_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Acked-by: Neil Horman Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the comm

[PATCH v3 07/24] rdma/cxgb3: Remove call to memset after dma_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/

[PATCH v3 01/24] sh: mm: Remove call to memset after dma_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message

[PATCH v3 02/24] atm: idt77252: Remove call to memset after dma_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/at

[PATCH v3 03/24] dmaengine: imx-sdma: Remove call to memset after dma_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drive

[PATCH v3 04/24] dmaengine: qcom_hidma: Remove call to memset after dmam_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message driver

[PATCH 2/2] dmaengine: pl330: use the same attriobutes when freeing pl330->mcode_cpu

2019-07-10 Thread Fuqian Huang
In function dmac_alloc_recources(), pl330->mcode_cpu is allocated using dma_alloc_attrs() but freed with dma_free_coherent(). Use the correct dma_free_attrs() function to free pl330->mcode_cpu. Signed-off-by: Fuqian Huang --- drivers/dma/pl330.c | 9 + 1 file changed, 5 insertions

[PATCH 1/2] drm/ttm: use the same attributes when freeing d_page->vaddr

2019-07-10 Thread Fuqian Huang
In function __ttm_dma_alloc_page(), d_page->addr is allocated by dma_alloc_attrs() but freed with use dma_free_coherent() in __ttm_dma_free_page(). Use the correct dma_free_attrs() to free d_page->vaddr. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 6 +-

[PATCH 14/14] net: phy: Make use of linkmode_mod_bit helper

2019-07-08 Thread Fuqian Huang
linkmode_mod_bit is introduced as a helper function to set/clear bits in a linkmode. Replace the if else code structure with a call to the helper linkmode_mod_bit. Signed-off-by: Fuqian Huang --- drivers/net/phy/phy.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff

[PATCH 12/14] phy: qcom-qmp: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/phy/qualcomm/phy-qcom-qmp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index cd91b4179b10..677916f8968c 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c

[PATCH 08/14] Input: elan_i2c - Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/input/mouse/elan_i2c_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index 420efaab3860..a8d4f3bd09bf 100644 --- a/drivers/input/mouse/elan_i2c_core.c

[PATCH 10/14] Input: auo-pixcir-ts - Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/input/touchscreen/auo-pixcir-ts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/auo-pixcir-ts.c b/drivers/input/touchscreen/auo-pixcir-ts.c index 8e48fbda487a..8e9f3b7b8180 100644 --- a/drivers/input

[PATCH 13/14] thermal: rcar_gen3_thermal: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/thermal/rcar_gen3_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index a56463308694..755d2b5bd2c2 100644 --- a/drivers/thermal/rcar_gen3_thermal.c

[PATCH 09/14] iio: imu: mpu6050: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index 53a59957cc54..e067927317bd 100644 --- a/drivers/iio/imu

[PATCH 06/14] drm/i2c: tda9950: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/i2c/tda9950.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/gpu/drm/i2c/tda9950.c index 8039fc0d83db..042f6487e6fb 100644 --- a/drivers/gpu/drm/i2c/tda9950.c +++ b/drivers/gpu/drm

[PATCH 07/14] Input: cyapa - Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/input/mouse/cyapa.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c index dfd3873513e4..e1d9ab558ecf 100644 --- a/drivers/input/mouse/cyapa.c +++ b/drivers/input

[PATCH 11/14] PCI: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/pci/controller/pci-host-common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c index c742881b5061..c8cb9c5188a4 100644 --- a/drivers/pci

[PATCH 04/14] power: supply: sc27xx: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/power/supply/sc27xx_fuel_gauge.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/power/supply/sc27xx_fuel_gauge.c b/drivers/power/supply/sc27xx_fuel_gauge.c index 9c184d80088b..58b2970cd359 100644 --- a/drivers/power/supply

[PATCH 05/14] drm/drv: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/drm_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 862621494a93..dd004ebbb5fd 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c

[PATCH 02/14] iio: adc: sc27xx: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-08 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/iio/adc/sc27xx_adc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iio/adc/sc27xx_adc.c b/drivers/iio/adc/sc27xx_adc.c index ec86f640e963..d7ca002cbb17 100644 --- a/drivers/iio/adc/sc27xx_adc.c +++ b/drivers/iio/adc

[PATCH 03/14] power: supply: sc27xx: Introduce local variable 'struct device *dev'

2019-07-08 Thread Fuqian Huang
Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatly. Signed-off-by: Fuqian Huang --- drivers/power/supply/sc27xx_fuel_gauge.c | 47 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/drivers/power/supply

[PATCH 01/14] iio: adc: sc27xx: Introduce local variable 'struct device *dev'

2019-07-08 Thread Fuqian Huang
Introduce local variable 'struct device *dev' and use it instead of dereferencing it repeatly. Signed-off-by: Fuqian Huang --- drivers/iio/adc/sc27xx_adc.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/iio/adc

[Patch v2 10/10] platform/x86/asus-wmi: using dev_get_drvdata directly

2019-07-03 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

[Patch v2 09/10] net/ethernet: using dev_get_drvdata directly

2019-07-03 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

[Patch v2 08/10] net/can: using dev_get_drvdata directly

2019-07-03 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

[Patch v2 05/10] iio: using dev_get_drvdata directly

2019-07-03 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

[Patch v2 07/10] mailbox: using dev_get_drvdata directly

2019-07-03 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

[Patch v2 04/10] drm/panfrost: using dev_get_drvdata directly

2019-07-03 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

[Patch v2 03/10] drm/omapdrm: using dev_get_drvdata directly

2019-07-03 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

[PATCH v2 35/35] sound/soc/intel: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) - Split into two patches sound/soc/intel/atom/sst/sst_loader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/

[PATCH v2 34/35] sound/soc/codecs: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Acked-by: Richard Fitzgerald Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) - Split into two patches sound/soc/codecs/wm0010.c | 4 +--- 1 file changed, 1 insertion(+), 3 deleti

[PATCH v2 32/35] omfs: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) 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 08226a835

[PATCH v2 33/35] sound/pci: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) sound/pci/echoaudio/echoaudio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/pci/echoaudio/echoaudio.c b/so

[PATCH v2 31/35] ocfs2: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) fs/ocfs2/alloc.c | 8 +++- fs/ocfs2/localalloc.c | 6 ++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/fs/oc

[PATCH v2 29/35] nfsd: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) fs/nfsd/nfscache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c in

[PATCH v2 28/35] ext4: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) fs/ext4/xattr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 491f9ee40

[PATCH v2 30/35] ntfs: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) fs/ntfs/dir.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c index 3c4811469

[PATCH v2 27/35] ext2: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) fs/ext2/xattr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index 1e33e0ac8

[PATCH v2 26/35] cifs: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) fs/cifs/smb2pdu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 75311a8a6

[PATCH v2 25/35] usb: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/usb/class/cdc-acm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/

[PATCH v2 24/35] scsi/qla4xxx: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/scsi/qla4xxx/ql4_os.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/driv

[PATCH v2 22/35] scsi/aic7xxx: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/scsi/aic7xxx/aic79xx_core.c | 3 +-- drivers/scsi/aic7xxx/aic7xxx_core.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) d

[PATCH v2 23/35] scsi: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/scsi/myrb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c in

[PATCH v2 20/35] platform/x86/asus: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) - Split into two patches. drivers/platform/x86/asus-wmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/driv

[PATCH v2 21/35] platform/x86/thinkpad: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/platform/x86/thinkpad_acpi.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/platform/

[PATCH v2 19/35] pcmcia: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/pcmcia/cistpl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistp

[PATCH v2 14/35] message/fusion: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/message/fusion/mptbase.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/message/fusion/mptbase.

[PATCH v2 17/35] net/wireless: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/net/wireless/ath/ath6kl/wmi.c | 6 ++ drivers/net/wireless/st/cw1200/queue.c | 3 +-- drivers/net/wireless/ti/wlcore/main.c

[PATCH v2 15/35] net/ethernet: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ether

[PATCH v2 16/35] net/wimax: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/net/wimax/i2400m/usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wimax/i2400m/usb.c b/driv

[PATCH v2 11/35] media/dvb: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/media/dvb-core/dvbdev.c | 3 +-- drivers/media/dvb-frontends/drx39xyj/drxj.c | 5 ++--- 2 files changed, 3 insertions(+)

[PATCH v2 12/35] media/tuners: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/media/tuners/tuner-xc2028.c | 3 +-- drivers/media/tuners/xc4000.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) d

[PATCH v2 10/35] macintosh: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/macintosh/adbhid.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/macintosh/adbhid.c b/driv

[PATCH v2 13/35] media/usb: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/media/usb/em28xx/em28xx-cards.c | 3 +-- drivers/media/usb/zr364xx/zr364xx.c | 4 +--- 2 files changed, 2 insertions(+), 5 deleti

[PATCH v2 08/35] drm/i915: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/gpu/drm/i915/gvt/dmabuf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/dmabuf.c

[PATCH v2 07/35] drm/amdgpu: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Reviewed-by: Emil Velikov Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

[PATCH v2 09/35] infiniband: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/infiniband/hw/i40iw/i40iw_cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/i4

[PATCH v2 02/35] powerpc: Add an allocation failure check

2019-07-03 Thread Fuqian Huang
Add an allocation failure check. Signed-off-by: Fuqian Huang --- Changes in v2: - Split into two patches arch/powerpc/platforms/pseries/dlpar.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index

[PATCH v2 04/35] block: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/block/rbd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c in

[PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/crypto/caam/caampkc.c | 11 +++ drivers/crypto/virtio/virtio_crypto_algs.c | 4 +--- 2 files changed, 4 inserti

[PATCH v2 03/35] powerpc: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) arch/powerpc/platforms/pseries/dlpar.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/pser

[PATCH v2 05/35] clk/ti: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/clk/ti/dpll.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c in

  1   2   3   >