[PATCH V2] mtd: phram: Fix error return code in phram_setup()

2021-04-08 Thread Yu Kuai
Return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- drivers/mtd/devices/phram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices

[PATCH 1/3] mtd: rawnand: mtk: remove redundant dev_err call in mtk_ecc_probe()

2021-04-08 Thread Yu Kuai
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- drivers/mtd/nand/raw/mtk_ecc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand

[PATCH 2/3] mtd: plat-ram: remove redundant dev_err call in platram_probe()

2021-04-08 Thread Yu Kuai
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- drivers/mtd/maps/plat-ram.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mtd/maps/plat-ram.c b/drivers

[PATCH 3/3] mtd: phram: Fix error return code in phram_setup()

2021-04-08 Thread Yu Kuai
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- drivers/mtd/devices/phram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd

[PATCH 0/3] code optimization for mtd

2021-04-08 Thread Yu Kuai
Yu Kuai (3): mtd: rawnand: mtk: remove redundant dev_err call in mtk_ecc_probe() mtd: plat-ram: remove redundant dev_err call in platram_probe() mtd: phram: Fix error return code in phram_setup() drivers/mtd/devices/phram.c| 1 + drivers/mtd/maps/plat-ram.c| 1 - drivers/mtd/nand

[PATCH 2/2] powerpc: make 'boot_text_mapped' static

2021-04-07 Thread Yu Kuai
The sparse tool complains as follow: arch/powerpc/kernel/btext.c:48:5: warning: symbol 'boot_text_mapped' was not declared. Should it be static? This symbol is not used outside of btext.c, so this commit make it static. Signed-off-by: Yu Kuai --- arch/powerpc/kernel/btext.c | 2

[PATCH 1/2] powerpc: remove set but not used variable 'force_printk_to_btext'

2021-04-07 Thread Yu Kuai
Fixes gcc '-Wunused-but-set-variable' warning: arch/powerpc/kernel/btext.c:49:12: error: 'force_printk_to_btext' defined but not used. It is never used, and so can be removed. Signed-off-by: Yu Kuai --- arch/powerpc/kernel/btext.c | 1 - 1 file changed, 1 deletion(-

[PATCH 0/2] code optimizations for btext.c

2021-04-07 Thread Yu Kuai
Yu Kuai (2): powerpc: remove set but not used variable 'force_printk_to_btext' powerpc: make 'boot_text_mapped' static arch/powerpc/kernel/btext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.25.4

[PATCH] powerpc: Make some symbols static

2021-04-07 Thread Yu Kuai
are not used outside of btext.c, so this commit marks them static. Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- arch/powerpc/kernel/btext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c index 803c2a45b22a.

[PATCH] powerpc/smp: Make some symbols static

2021-04-07 Thread Yu Kuai
it be static? arch/powerpc/kernel/smp.c:132:1: warning: symbol '__pcpu_scope_thread_group_l2_cache_map' was not declared. Should it be static? These symbols are not used outside of smp.c, so this commit marks them static. Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- arch/powe

[PATCH] tty: hvc: make symbol 'hvc_udbg_dev' static

2021-04-07 Thread Yu Kuai
The sparse tool complains as follows: drivers/tty/hvc/hvc_udbg.c:20:19: warning: symbol 'hvc_udbg_dev' was not declared. Should it be static? This symbol is not used outside of hvc_udbg.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- drive

[PATCH] macintosh/via-pmu: Make some symbols static

2021-04-07 Thread Yu Kuai
used outside of via-pmu.c, so this commit marks them static. Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- drivers/macintosh/via-pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 73e6ae88fafd..47876

[PATCH] macintosh/windfarm: Make symbol 'pm121_sys_state' static

2021-04-07 Thread Yu Kuai
The sparse tool complains as follows: drivers/macintosh/windfarm_pm121.c:436:24: warning: symbol 'pm121_sys_state' was not declared. Should it be static? This symbol is not used outside of windfarm_pm121.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-b

[PATCH] windfarm: make symbol 'wf_thread' static

2021-04-07 Thread Yu Kuai
The sparse tool complains as follows: drivers/macintosh/windfarm_core.c:59:20: warning: symbol 'wf_thread' was not declared. Should it be static? This symbol is not used outside of windfarm_core.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Yu Kuai --

[PATCH] stm class: initialize static variable in declaration

2021-04-07 Thread Yu Kuai
than explicitly calling init_srcu_struct(). Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- drivers/hwtracing/stm/core.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index 2712e699ba08..1e13993e7969

[PATCH] bfq: don't check active group if bfq.weight is not changed

2021-01-14 Thread Yu Kuai
doesn't need idle (e.g. random rw) To fix that, adding check in bfq_io_set_weight_legacy() and bfq_pd_init() to check whether or not group scheduling is used (a non-default weight is used). If not, there is no need to check active group. Signed-off-by: Yu Kuai --- block/bfq-cgroup.c

[PATCH 3/3] blk-mq: decrease pending_queues when it expires

2020-12-26 Thread Yu Kuai
: Yu Kuai --- block/blk-mq-tag.c | 29 ++--- block/blk-mq-tag.h | 6 +++--- block/blk-mq.c | 5 +++-- block/blk-mq.h | 2 +- include/linux/blk-mq.h | 6 +- 5 files changed, 38 insertions(+), 10 deletions(-) diff --git a/block/blk-mq-tag.c b

[PATCH 0/3] fix the performance fluctuation due to shared tagset

2020-12-26 Thread Yu Kuai
r tag, start to restrict as before. b. if the utilization rate of total tags goes below 100%, it can stop to restrict quickly. Yu Kuai (3): blk-mq: allow hardware queue to get more tag while sharing a tag set blk-mq: clear 'active_queues' immediately when 'nr_active' is

[PATCH 1/3] blk-mq: allow hardware queue to get more tag while sharing a tag set

2020-12-26 Thread Yu Kuai
s are still free in the tag set. We add 'pending_queues' in blk_mq_tag_set to count how many queues can't get driver tag. Thus if this value is zero, there is no need to limit the max number of available tags. Signed-off-by: Hou Tao Signed-off-by: Yu Kuai --- block/blk-mq-debugfs.c |

[PATCH 2/3] blk-mq: clear 'active_queues' immediately when 'nr_active' is decreased to 0

2020-12-26 Thread Yu Kuai
an 100% because 'active_queues' is never decreased. Thus clear 'active_queues' immediately when 'nr_active' is decreased to 0. Signed-off-by: Hou Tao Signed-off-by: Yu Kuai --- block/blk-mq.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block

[tip: timers/core] clocksource/drivers/cadence_ttc: Fix memory leak in ttc_setup_clockevent()

2020-12-03 Thread tip-bot2 for Yu Kuai
The following commit has been merged into the timers/core branch of tip: Commit-ID: eee422c46e6840a81c9db18a497b74387a557b29 Gitweb: https://git.kernel.org/tip/eee422c46e6840a81c9db18a497b74387a557b29 Author:Yu Kuai AuthorDate:Mon, 16 Nov 2020 21:51:23 +08:00 Committer

[PATCH] blk-throttle: don't check whether or not lower limit is valid if CONFIG_BLK_DEV_THROTTLING_LOW is off

2020-11-25 Thread Yu Kuai
s do nothing in blk_throtl_update_limit_valid() in such situation. Signed-off-by: Yu Kuai --- block/blk-throttle.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/blk-throttle.c b/block/blk-throttle.c index b771c4299982..d52cac9f3a7c 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @

[RFC PATCH] blk-cgroup: prevent rcu_sched detected stalls warnings in blkg_destroy_all()

2020-11-21 Thread Yu Kuai
to avoid such warnings, release 'q->queue_lock' for a while when a batch of blkg were destroyed. Signed-off-by: Yu Kuai --- block/blk-cgroup.c | 13 + 1 file changed, 13 insertions(+) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index c68bdf58c9a6..566195490f4a 10064

[PATCH V2] pinctrl: falcon: add missing put_device() call in pinctrl_falcon_probe()

2020-11-18 Thread Yu Kuai
if of_find_device_by_node() succeed, pinctrl_falcon_probe() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: e316cb2b16bb ("OF: pinctrl: MIPS: lantiq: adds support for FALCON SoC") Signed-

[PATCH] xfs: return corresponding errcode if xfs_initialize_perag() fail

2020-11-18 Thread Yu Kuai
In xfs_initialize_perag(), if kmem_zalloc(), xfs_buf_hash_init(), or radix_tree_preload() failed, the returned value 'error' is not set accordingly. Fixes: commit 8b26c5825e02 ("xfs: handle ENOMEM correctly during initialisation of perag structures") Reported-by: Hulk Robo

[PATCH] pinctrl: falcon: add missing put_device() call in pinctrl_falcon_probe()

2020-11-16 Thread Yu Kuai
if of_find_device_by_node() succeed, pinctrl_falcon_probe() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: commit e316cb2b16bb ("OF: pinctrl: MIPS: lantiq: adds support for FALCON SoC") Si

[PATCH] soc: amlogic: canvas: add missing put_device() call in meson_canvas_get()

2020-11-16 Thread Yu Kuai
if of_find_device_by_node() succeed, meson_canvas_get() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: commit 382f8be04551 ("soc: amlogic: canvas: Fix meson_canvas_get when probe failed") Si

[PATCH] usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data()

2020-11-16 Thread Yu Kuai
if of_find_device_by_node() succeed, usbmisc_get_init_data() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: commit ef12da914ed6 ("usb: chipidea: imx: properly check for usbmisc") Signed-

[PATCH V4] clocksource/drivers/cadence_ttc: fix memory leak in ttc_setup_clockevent()

2020-11-16 Thread Yu Kuai
If clk_notifier_register() failed, ttc_setup_clockevent() will return without freeing 'ttcce', which will leak memory. Fixes: 70504f311d4b ("clocksource/drivers/cadence_ttc: Convert init function to return error") Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- Changes

[PATCH V3] clocksource/drivers/cadence_ttc: fix memory leak in ttc_setup_clockevent()

2020-11-15 Thread Yu Kuai
If clk_notifier_register() failed, ttc_setup_clockevent() will return without freeing 'ttcce', which will leak memory. Fixes: 70504f311d4b ("clocksource/drivers/cadence_ttc: Convert init function to return error") Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- drive

[PATCH V2] clocksource/drivers/cadence_ttc: fix memory leak in ttc_setup_clockevent()

2020-11-10 Thread Yu Kuai
If clk_notifier_register() failed, ttc_setup_clockevent() will return without freeing 'ttcce', which will leak memory. Fixes: 70504f311d4b ("clocksource/drivers/cadence_ttc: Convert init function to return error") Reported-by: Hulk Robot Signed-off-by: Yu Kuai Revie

[PATCH V3] memory: tegra: add missing put_device() call in error path of tegra_emc_probe()

2020-11-09 Thread Yu Kuai
The reference to device obtained with of_find_device_by_node() should be dropped. Thus add jump target to fix the exception handling for this function implementation. Fixes: 73a7f0a90641("memory: tegra: Add EMC (external memory controller) driver") Signed-off-by: Yu Kuai --- driv

[PATCH] net: xfrm: fix memory leak in xfrm_user_policy()

2020-11-09 Thread Yu Kuai
if xfrm_get_translator() failed, xfrm_user_policy() return without freeing 'data', which is allocated in memdup_sockptr(). Fixes: 96392ee5a13b ("xfrm/compat: Translate 32-bit user_policy from sockptr") Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- net/xfrm/xfrm_stat

[PATCH] "clocksource/drivers/cadence_ttc: fix memory leak in ttc_setup_clockevent()

2020-11-09 Thread Yu Kuai
If clk_notifier_register() failed, ttc_setup_clockevent() will return without freeing 'ttcce', which will leak memory. Fixes: 70504f311d4b ("clocksource/drivers/cadence_ttc: Convert init function to return error") Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- drive

[PATCH V2] memory: tegra: add missing put_devcie() call in error path of tegra_emc_probe()

2020-11-09 Thread Yu Kuai
The reference to device obtained with of_find_device_by_node() should be dropped. Thus add jump target to fix the exception handling for this function implementation. Fixes: 73a7f0a90641("memory: tegra: Add EMC (external memory controller) driver") Signed-off-by: Yu Kuai --- driv

[PATCH V3] fsl/fman: add missing put_devcie() call in fman_port_probe()

2020-11-07 Thread Yu Kuai
if of_find_device_by_node() succeed, fman_port_probe() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 0572054617f3 ("fsl/fman: fix dereference null return value") Signed-off-by: Yu Kuai --

[patch V3 0/6] patches to add missing put_device() call

2020-11-04 Thread Yu Kuai
chagnes in V3: - merge patch 2 and patch 3 into one patch, add a help mtk_jpeg_clk_release(). changes in V2: - add several patches suggested by Hans Yu Kuai (6): media: platform: add missing put_device() call in mtk_jpeg_clk_init() media: platform: add missing put_device() call in

[patch V3 2/6] media: platform: add missing put_device() call in mtk_jpeg_probe() and mtk_jpeg_remove()

2020-11-04 Thread Yu Kuai
if mtk_jpeg_clk_init() succeed, mtk_jpeg_probe() and mtk_jpeg_remove() doesn't have a corresponding put_device(). Thus add a new helper mtk_jpeg_clk_release() to fix it. Fixes: b2f0d2724ba4 ("[media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver") Signed-off-by: Yu Kuai ---

[patch V3 6/6] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_enc_pm()

2020-11-04 Thread Yu Kuai
put_devices() call in mtk_vcodec_release_enc_pm() Signed-off-by: Yu Kuai --- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c

[patch V3 5/6] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_enc_pm()

2020-11-04 Thread Yu Kuai
if of_find_device_by_node() succeed, mtk_vcodec_init_enc_pm() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver") Si

[patch V3 4/6] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_dec_pm()

2020-11-04 Thread Yu Kuai
put_devices() call in mtk_vcodec_release_dec_pm() Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver") Signed-off-by: Yu Kuai --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/medi

[patch V3 3/6] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_dec_pm()

2020-11-04 Thread Yu Kuai
if of_find_device_by_node() succeed, mtk_vcodec_init_dec_pm() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver") Si

[patch V3 1/6] media: platform: add missing put_device() call in mtk_jpeg_clk_init()

2020-11-04 Thread Yu Kuai
eg's clock") Signed-off-by: Yu Kuai --- drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index 227245ccaedc..106543391c46 100644 --- a/driver

[PATCH V2] fsl/fman: add missing put_devcie() call in fman_port_probe()

2020-11-03 Thread Yu Kuai
if of_find_device_by_node() succeed, fman_port_probe() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 0572054617f3 ("fsl/fman: fix dereference null return value") Signed-off-by: Yu Kuai --- .

[PATCH] fsl/fman: add missing put_devcie() call in fman_port_probe()

2020-10-31 Thread Yu Kuai
if of_find_device_by_node() succeed, fman_port_probe() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 0572054617f3 ("fsl/fman: fix dereference null return value") Signed-off-by: Yu Kuai -

[PATCH] mtd: rawnand: ingenic: remove redundant get_device() in ingenic_ecc_get()

2020-10-31 Thread Yu Kuai
of_find_device_by_node() already takes a reference to the device, and ingenic_ecc_release() will drop the reference. So, the get_device() in ingenic_ecc_get() is redundand. Fixes: 15de8c6efd0e("mtd: rawnand: ingenic: Separate top-level and SoC specific code") Signed-off-by: Yu Kuai --

[PATCH] memory: tegra: add missing put_devcie() call in tegra_emc_probe()

2020-10-31 Thread Yu Kuai
if of_find_device_by_node() succeed, tegra_emc_probe() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 73a7f0a90641("memory: tegra: Add EMC (external memory controller) driver") Signed-

[PATCH] leds: various: add missing put_device() call in netxbig_leds_get_of_pdata()

2020-10-29 Thread Yu Kuai
if of_find_device_by_node() succeed, netxbig_leds_get_of_pdata() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 2976b1798909 ("leds: netxbig: add device tree binding") Signed-off-by: Yu Kuai --

[PATCH] iommu/sun50i: check return value of of_find_device_by_node() in sun50i_iommu_of_xlate()

2020-10-29 Thread Yu Kuai
If of_find_device_by_node() failed in sun50i_iommu_of_xlate(), null pointer dereference will be triggered. Thus return error code if of_find_device_by_node() failed. Fixes: 4100b8c229b3("iommu: Add Allwinner H6 IOMMU driver") Signed-off-by: Yu Kuai --- drivers/iommu/sun50i-iommu.c

[PATCH] iommu/rockchip: check return value of of_find_device_by_node() in rk_iommu_of_xlate()

2020-10-29 Thread Yu Kuai
If of_find_device_by_node() failed in rk_iommu_of_xlate(), null pointer dereference will be triggered. Thus return error code if of_find_device_by_node() failed. Fixes: 5fd577c3eac3("iommu/rockchip: Use OF_IOMMU to attach devices automatically") Signed-off-by: Yu Kuai --- dri

[PATCH 1/7] media: platform: add missing put_device() call in mtk_jpeg_clk_init()

2020-10-09 Thread Yu Kuai
eg's clock") Signed-off-by: Yu Kuai --- drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index 227245ccaedc..106543391c46 100644 --- a/driver

[PATCH 2/7] media: platform: add missing put_device() call in mtk_jpeg_probe()

2020-10-09 Thread Yu Kuai
if mtk_jpeg_clk_init() succeed, mtk_jpeg_probe() doesn't have a corresponding put_device(). Thus add put_device() in jump target to fix the exception handling for this function implementation. Fixes: b2f0d2724ba4 ("[media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver") Si

[PATCH 7/7] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_enc_pm()

2020-10-09 Thread Yu Kuai
put_devices() call in mtk_vcodec_release_enc_pm() Signed-off-by: Yu Kuai --- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c

[PATCH 5/7] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_dec_pm()

2020-10-09 Thread Yu Kuai
put_devices() call in mtk_vcodec_release_dec_pm() Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver") Signed-off-by: Yu Kuai --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/medi

[PATCH V2 0/7] patches to add missing put_device() call

2020-10-09 Thread Yu Kuai
changes in V2: - add several patches suggested by Hans Yu Kuai (7): media: platform: add missing put_device() call in mtk_jpeg_clk_init() media: platform: add missing put_device() call in mtk_jpeg_probe() media: platform: add missing put_device() call in mtk_jpeg_remove() media: mtk

[PATCH 4/7] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_dec_pm()

2020-10-09 Thread Yu Kuai
if of_find_device_by_node() succeed, mtk_vcodec_init_dec_pm() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver") Si

[PATCH 3/7] media: platform: add missing put_device() call in mtk_jpeg_remove()

2020-10-09 Thread Yu Kuai
of_find_device_by_node() is called in mtk_jpeg_clk_init() from mtk_jpeg_probe(), and mtk_jpeg_remove() doesn't have a corresponding put_device(). Fixes: b2f0d2724ba4 ("[media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver") Signed-off-by: Yu Kuai --- drivers/media/pl

[PATCH 6/7] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_enc_pm()

2020-10-09 Thread Yu Kuai
if of_find_device_by_node() succeed, mtk_vcodec_init_enc_pm() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver") Si

[PATCH V2] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate()

2020-09-28 Thread Yu Kuai
if of_find_device_by_node() succeed, qcom_iommu_of_xlate() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: 0ae349a0f33fb ("iommu/qcom: Add qcom_iommu") Signed-off-by: Yu Kuai --- Changes in V

[PATCH 1/3] media: platform: add missing put_device() call in mtk_jpeg_clk_init()

2020-09-24 Thread Yu Kuai
eg's clock") Signed-off-by: Yu Kuai --- drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index 227245ccaedc..106543391c46 100644 --- a/driver

[PATCH 2/3] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_dec_pm()

2020-09-24 Thread Yu Kuai
if of_find_device_by_node() succeed, mtk_vcodec_init_dec_pm() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver") Si

[PATCH 3/3] media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_enc_pm()

2020-09-24 Thread Yu Kuai
if of_find_device_by_node() succeed, mtk_vcodec_init_enc_pm() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver") Si

[PATCH] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate()

2020-09-17 Thread Yu Kuai
if of_find_device_by_node() succeed, qcom_iommu_of_xlate() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: e86d1aa8b60f ("iommu/arm-smmu: Move Arm SMMU drivers into their own subdirectory") Si

[PATCH] iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate()

2020-09-17 Thread Yu Kuai
) Signed-off-by: Yu Kuai --- drivers/iommu/exynos-iommu.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index bad3c0ce10cb..de324b4eedfe 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu

[PATCH] drm/mediatek: add missing put_device() call in mtk_hdmi_dt_parse_pdata()

2020-09-11 Thread Yu Kuai
if of_find_device_by_node() succeed, mtk_drm_kms_init() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support") Signed-off-by: Yu Kuai --- drivers/g

[PATCH] drm/mediatek: add missing put_device() call in mtk_drm_kms_init()

2020-09-11 Thread Yu Kuai
if of_find_device_by_node() succeed, mtk_drm_kms_init() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-

[PATCH] drm: rcar-du: add missing put_device() call in rcar_du_vsp_init()

2020-09-10 Thread Yu Kuai
if of_find_device_by_node() succeed, rcar_du_vsp_init() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 6d62ef3ac30b ("drm: rcar-du: Expose the VSP1 compositor through KMS planes") Signed-

[PATCH] drm/mediatek: add exception handing in mtk_drm_probe() if component init fail

2020-09-09 Thread Yu Kuai
Signed-off-by: Yu Kuai drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 040a8f393fe2..75a6cf231fd7 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_d

[PATCH] drm/mediatek: add missing put_device() call in mtk_ddp_comp_init()

2020-09-05 Thread Yu Kuai
if of_find_device_by_node() succeed, mtk_ddp_comp_init() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: d0afe37f5209 ("drm/mediatek: support CMDQ interface in ddp component") Signed-

[PATCH V2] drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux()

2020-08-25 Thread Yu Kuai
If sun8i_r40_tcon_tv_set_mux() succeed, sun8i_r40_tcon_tv_set_mux() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON") Signed-

[PATCH V2] ASoC: fsl: imx-es8328: add missing put_device() call in imx_es8328_probe()

2020-08-25 Thread Yu Kuai
if of_find_device_by_node() succeed, imx_es8328_probe() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 7e7292dba215 ("ASoC: fsl: add imx-es8328 machine driver") Signed-off-by: Yu Kuai ---

[PATCH 1/2] ASoC: fsl: imx-es8328: add missing kfree() call in imx_es8328_probe()

2020-08-25 Thread Yu Kuai
If memory allocation for 'data' or 'comp' succeed, imx_es8328_probe() doesn't have corresponding kfree() in exception handling. Thus add kfree() for this function implementation. Fixes: 7e7292dba215 ("ASoC: fsl: add imx-es8328 machine driver") Signed-off-by: Yu

[PATCH 0/2] do exception handling appropriately in imx_es8328_probe()

2020-08-25 Thread Yu Kuai
Yu Kuai (2): ASoC: fsl: imx-es8328: add missing kfree() call in imx_es8328_probe() ASoC: fsl: imx-es8328: add missing put_device() call in imx_es8328_probe() sound/soc/fsl/imx-es8328.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) -- 2.25.4

[PATCH 2/2] ASoC: fsl: imx-es8328: add missing put_device() call in imx_es8328_probe()

2020-08-25 Thread Yu Kuai
if of_find_device_by_node() succeed, imx_es8328_probe() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 7e7292dba215 ("ASoC: fsl: add imx-es8328 machine driver") Signed-off-by: Yu Kuai --- so

[PATCH] drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux()

2020-08-25 Thread Yu Kuai
If sun8i_r40_tcon_tv_set_mux() succeed, at_dma_xlate() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON") Signed-off-by: Yu Kuai ---

[RFC PATCH V4] iomap: add support to track dirty state of sub pages

2020-08-21 Thread Yu Kuai
00.00%, depth=64 Run status group 0 (all jobs): WRITE: bw=3840KiB/s (3932kB/s), 3840KiB/s-3840KiB/s (3932kB/s-3932kB/s), io=128MiB (134MB), run=34133-34133msec Disk stats (read/write): sda: ios=0/75055, merge=0/8822, ticks=0/40565, in_queue=68469, util=99.80% `

[RFC PATCH V3] iomap: add support to track dirty state of sub pages

2020-08-19 Thread Yu Kuai
tency : target=0, window=0, percentile=100.00%, depth=64 Run status group 0 (all jobs): WRITE: bw=3840KiB/s (3932kB/s), 3840KiB/s-3840KiB/s (3932kB/s-3932kB/s), io=128MiB (134MB), run=34133-34133msec Disk stats (read/write): sda: ios=0/75055, merge=0/8822, ticks=0/40565, in_queue=68469, util=99

[RFC PATCH V2] iomap: add support to track dirty state of sub pages

2020-08-18 Thread Yu Kuai
55, merge=0/8822, ticks=0/40565, in_queue=68469, util=99.80% ``` Signed-off-by: Yu Kuai --- fs/iomap/buffered-io.c | 91 -- 1 file changed, 79 insertions(+), 12 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index bcfc288dba3f..0

[PATCH 2/3] dmaengine: at_hdmac: add missing put_device() call in at_dma_xlate()

2020-08-17 Thread Yu Kuai
If of_find_device_by_node() succeed, at_dma_xlate() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Signed-off-by: Yu Kuai --- drivers

[PATCH 3/3] dmaengine: at_hdmac: add missing kfree() call in at_dma_xlate()

2020-08-17 Thread Yu Kuai
If memory allocation for 'atslave' succeed, at_dma_xlate() doesn't have a corresponding kfree() in exception handling. Thus add kfree() for this function implementation. Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Signed-off-by: Yu Kuai --- drivers/dma

[PATCH 1/3] dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate()

2020-08-17 Thread Yu Kuai
The reurn value of of_find_device_by_node() is not checked, thus null pointer dereference will be triggered if of_find_device_by_node() failed. Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Signed-off-by: Yu Kuai --- drivers/dma/at_hdmac.c | 2 ++ 1 file changed, 2

[PATCH V2 0/3] do exception handling appropriately in at_dma_xlate()

2020-08-17 Thread Yu Kuai
changes from V1: -separate different changes to different patches, as suggested by Vinod. Yu Kuai (3): dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate() dmaengine: at_hdmac: add missing put_device() call in at_dma_xlate() dmaengine: at_hdmac: add

[RFC PATCH] iomap: add support to track dirty state of sub pages

2020-07-29 Thread Yu Kuai
of writeback in each round is from the start of the page to the end offset we just wrote. Thus add support to track dirty state for sub pages in iomap_page. Signed-off-by: Yu Kuai --- fs/iomap/buffered-io.c | 51 +- 1 file changed, 50 insertions(+), 1 de

[PATCH V2] dmaengine: bcm-sba-raid: add missing put_device() call in sba_probe()

2020-07-29 Thread Yu Kuai
if of_find_device_by_node() succeed, sba_probe() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 743e1c8ffe4e ("dmaengine: Add Broadcom SBA RAID driver") Signed-off-by: Yu Kuai --- changes f

[PATCH] dmaengine: bcm-sba-raid: add missing put_device() call in sba_probe()

2020-07-29 Thread Yu Kuai
if of_find_device_by_node() succeed, sba_probe() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 743e1c8ffe4e ("dmaengine: Add Broadcom SBA RAID driver") Signed-off-by: Yu Kuai --- driv

[PATCH] dmaengine: at_hdmac: do exception handling appropriately in at_dma_xlate()

2020-07-29 Thread Yu Kuai
ng") Signed-off-by: Yu Kuai --- drivers/dma/at_hdmac.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 45bbcd6146fd..a2cf25c6e3b3 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -1650,1

[PATCH] MIPS: OCTEON: add missing put_device() call in dwc3_octeon_device_init()

2020-07-21 Thread Yu Kuai
if of_find_device_by_node() succeed, dwc3_octeon_device_init() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: 93e502b3c2d4 ("MIPS: OCTEON: Platform support for OCTEON III USB controller") Si

[PATCH] ARM: socfpga: PM: add missing put_device() call in socfpga_setup_ocram_self_refresh()

2020-07-21 Thread Yu Kuai
if of_find_device_by_node() succeed, socfpga_setup_ocram_self_refresh doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 44fd8c7d4005 ("ARM: socfpga: support suspend to ram") Signed-off-by: Yu

[PATCH] dmaengine: ti: k3-udma: add missing put_device() call in of_xudma_dev_get()

2020-06-18 Thread Yu Kuai
if of_find_device_by_node() succeed and platform_get_drvdata() failed, of_xudma_dev_get() will return without put_device(), which will leak the memory. Signed-off-by: Yu Kuai --- drivers/dma/ti/k3-udma-private.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/ti/k3-udma

[RFC PATCH] fix use after free in xlog_wait()

2020-06-10 Thread Yu Kuai
waitqueue_active(&ctx->push_wait) return false before freeing 'ctx'. Signed-off-by: Yu Kuai --- fs/xfs/xfs_log_cil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index b43f0e8f43f2..59b21485b0fc 100644 --- a/fs/xfs

[PATCH] ARM: socfpga: add missing put_device() call in socfpga_setup_ocram_self_refresh()

2020-06-04 Thread yu kuai
if of_find_device_by_node() succeed, socfpga_setup_ocram_self_refresh() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 44fd8c7d4005 ("ARM: socfpga: support suspend to ram") Signed-off-by: yu

[PATCH] ARM: imx6: add missing put_device() call in imx6q_suspend_init()

2020-06-04 Thread yu kuai
if of_find_device_by_node() succeed, imx6q_suspend_init() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Signed-off-by: yu kuai --- arch/arm/mach-imx/pm-imx6.c | 10 ++ 1 file changed, 6 insertions(

[PATCH] ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram()

2020-06-04 Thread yu kuai
ot;) Signed-off-by: yu kuai --- arch/arm/mach-imx/pm-imx5.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c index f057df813f83..e9962b48e30c 100644 --- a/arch/arm/mach-imx/pm-imx5.c +++ b/arch/arm/mach-imx/pm-im

[PATCH] ARM: at91: pm: add missing put_device() call in at91_pm_sram_init()

2020-06-04 Thread yu kuai
if of_find_device_by_node() succeed, at91_pm_sram_init() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: d2e467905596 ("ARM: at91: pm: use the mmio-sram pool to access SRAM") Signed-off-by: yu

[PATCH V2] pinctrl: sirf: add missing put_device() call in sirfsoc_gpio_probe()

2020-06-02 Thread yu kuai
add a jump target to fix the exception handling for this function implementation. Fixes: 5130216265f6 ("PINCTRL: SiRF: add GPIO and GPIO irq support in CSR SiRFprimaII") Signed-off-by: yu kuai --- drivers/pinctrl/sirf/pinctrl-sirf.c | 20 ++-- 1 file changed, 14 insert

[PATCH] pinctrl: sirf: add missing put_device() in error handling path in sirfsoc_gpio_probe()

2020-06-02 Thread yu kuai
in sirfsoc_gpio_probe(), if of_find_device_by_node() succeed, put_device() is missing in the error handling patch. Signed-off-by: yu kuai --- drivers/pinctrl/sirf/pinctrl-sirf.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/sirf

[PATCH] block/bio-integrity: don't free 'buf' if bio_integrity_add_page() failed

2020-06-01 Thread yu kuai
s set previousy in bio_integrity_alloc(). Fixes: commit e7bf90e5afe3 ("block/bio-integrity: fix a memory leak bug") Signed-off-by: yu kuai --- block/bio-integrity.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/bio-integrity.c b/block/bio-integrity.c index bf62c25cde8f..ae07dd78e

[PATCH] xfs: fix wrong struct type in ioctl definition whih cmd XFS_IOC_GETBMAPAX

2019-10-11 Thread yu kuai
ioctl expect 'getbmapx' as the 'arg' when the cmd is XFS_IOC_GETBMAPX. But the definition in 'xfs_fs.h' is 'getbmap' So, change it to 'getbmapx' Signed-off-by: yu kuai --- fs/xfs/libxfs/xfs_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH] classmate-laptop: remove unused variable

2019-09-29 Thread yu kuai
t not used and can be removed. Fixes: 7125587df4e8 ("classmate-laptop: Add support for Classmate V4 accelerometer.") Reported-by: Hulk Robot Signed-off-by: yu kuai --- drivers/platform/x86/classmate-laptop.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/pl

[PATCH] xfs: include QUOTA, FATAL ASSERT build options in XFS_BUILD_OPTIONS

2019-09-05 Thread yu kuai
S_WARN and CONFIG_XFS_REPAIR. However, this is not enough, add in CONFIG_XFS_QUOTA and CONFIG_XFS_ASSERT_FATAL. Signed-off-by: yu kuai --- fs/xfs/xfs_super.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/fs/xfs/xfs_super.h b/fs/xfs/xfs_super.h index 763e43d..b552cf6 100644 --- a/fs/xfs/xfs_sup

  1   2   >