[PATCH -next] mm/slab: use list_move instead of list_del/list_add
From: Wei Yongjun Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun --- mm/slab.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index 32c2296..cc6d816 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3452,8 +3452,7 @@ static void free_block(struct kmem_cache *cachep, void **objpp, n->free_objects -= cachep->num; page = list_last_entry(>slabs_free, struct page, lru); - list_del(>lru); - list_add(>lru, list); + list_move(>lru, list); } }
[PATCH -next] x86: ce4100: Remove duplicated include from ce4100.c
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- arch/x86/platform/ce4100/ce4100.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c index 7ab4d3f..b27bccd 100644 --- a/arch/x86/platform/ce4100/ce4100.c +++ b/arch/x86/platform/ce4100/ce4100.c @@ -11,11 +11,9 @@ #include #include #include -#include #include #include #include -#include #include #include
[PATCH -next] x86: ce4100: Remove duplicated include from ce4100.c
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- arch/x86/platform/ce4100/ce4100.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c index 7ab4d3f..b27bccd 100644 --- a/arch/x86/platform/ce4100/ce4100.c +++ b/arch/x86/platform/ce4100/ce4100.c @@ -11,11 +11,9 @@ #include #include #include -#include #include #include #include -#include #include #include
[PATCH -next] drm/arc: Remove redundant dev_err call in arcpgu_load()
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/gpu/drm/arc/arcpgu_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index 0226ec0..ef1d702 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -104,10 +104,8 @@ static int arcpgu_load(struct drm_device *drm) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); arcpgu->regs = devm_ioremap_resource(>dev, res); - if (IS_ERR(arcpgu->regs)) { - dev_err(drm->dev, "Could not remap IO mem\n"); + if (IS_ERR(arcpgu->regs)) return PTR_ERR(arcpgu->regs); - } dev_info(drm->dev, "arc_pgu ID: 0x%x\n", arc_pgu_read(arcpgu, ARCPGU_REG_ID));
[PATCH -next] drm/arc: Remove redundant dev_err call in arcpgu_load()
From: Wei Yongjun There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/arc/arcpgu_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index 0226ec0..ef1d702 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -104,10 +104,8 @@ static int arcpgu_load(struct drm_device *drm) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); arcpgu->regs = devm_ioremap_resource(>dev, res); - if (IS_ERR(arcpgu->regs)) { - dev_err(drm->dev, "Could not remap IO mem\n"); + if (IS_ERR(arcpgu->regs)) return PTR_ERR(arcpgu->regs); - } dev_info(drm->dev, "arc_pgu ID: 0x%x\n", arc_pgu_read(arcpgu, ARCPGU_REG_ID));
[PATCH -next] drm/amdgpu: use list_move instead of list_del/list_add
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 0307ff5..aba38ec 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -414,8 +414,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, if (e->robj->tbo.ttm->state != tt_bound && !e->user_pages) { - list_del(>tv.head); - list_add(>tv.head, _pages); + list_move(>tv.head, _pages); amdgpu_bo_unreserve(e->robj); }
[PATCH -next] x86, apic: Remove duplicated include from probe_64.c
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- arch/x86/kernel/apic/probe_64.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c index d4880a3..c303054 100644 --- a/arch/x86/kernel/apic/probe_64.c +++ b/arch/x86/kernel/apic/probe_64.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include
[PATCH -next] drm/amdgpu: use list_move instead of list_del/list_add
From: Wei Yongjun Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 0307ff5..aba38ec 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -414,8 +414,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, if (e->robj->tbo.ttm->state != tt_bound && !e->user_pages) { - list_del(>tv.head); - list_add(>tv.head, _pages); + list_move(>tv.head, _pages); amdgpu_bo_unreserve(e->robj); }
[PATCH -next] x86, apic: Remove duplicated include from probe_64.c
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- arch/x86/kernel/apic/probe_64.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c index d4880a3..c303054 100644 --- a/arch/x86/kernel/apic/probe_64.c +++ b/arch/x86/kernel/apic/probe_64.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include
[PATCH -next] mtd: atmel-quadspi: remove redundant dev_err call in atmel_qspi_probe()
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/mtd/spi-nor/atmel-quadspi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mtd/spi-nor/atmel-quadspi.c b/drivers/mtd/spi-nor/atmel-quadspi.c index 47937d9..f0c04bb 100644 --- a/drivers/mtd/spi-nor/atmel-quadspi.c +++ b/drivers/mtd/spi-nor/atmel-quadspi.c @@ -615,7 +615,6 @@ static int atmel_qspi_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qspi_base"); aq->regs = devm_ioremap_resource(>dev, res); if (IS_ERR(aq->regs)) { - dev_err(>dev, "missing registers\n"); err = PTR_ERR(aq->regs); goto exit; } @@ -624,7 +623,6 @@ static int atmel_qspi_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qspi_mmap"); aq->mem = devm_ioremap_resource(>dev, res); if (IS_ERR(aq->mem)) { - dev_err(>dev, "missing AHB memory\n"); err = PTR_ERR(aq->mem); goto exit; }
[PATCH -next] mtd: atmel-quadspi: remove redundant dev_err call in atmel_qspi_probe()
From: Wei Yongjun There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun --- drivers/mtd/spi-nor/atmel-quadspi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mtd/spi-nor/atmel-quadspi.c b/drivers/mtd/spi-nor/atmel-quadspi.c index 47937d9..f0c04bb 100644 --- a/drivers/mtd/spi-nor/atmel-quadspi.c +++ b/drivers/mtd/spi-nor/atmel-quadspi.c @@ -615,7 +615,6 @@ static int atmel_qspi_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qspi_base"); aq->regs = devm_ioremap_resource(>dev, res); if (IS_ERR(aq->regs)) { - dev_err(>dev, "missing registers\n"); err = PTR_ERR(aq->regs); goto exit; } @@ -624,7 +623,6 @@ static int atmel_qspi_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "qspi_mmap"); aq->mem = devm_ioremap_resource(>dev, res); if (IS_ERR(aq->mem)) { - dev_err(>dev, "missing AHB memory\n"); err = PTR_ERR(aq->mem); goto exit; }
[PATCH -next] drm/rockchip: analogix_dp: add missing clk_disable_unprepare() on error
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> Add the missing clk_disable_unprepare() before return in the error handling case. Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index e81e19a..89aadbf 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -96,6 +96,7 @@ static int rockchip_dp_poweron(struct analogix_dp_plat_data *plat_data) ret = rockchip_dp_pre_init(dp); if (ret < 0) { dev_err(dp->dev, "failed to dp pre init %d\n", ret); + clk_disable_unprepare(dp->pclk); return ret; } @@ -272,6 +273,7 @@ static int rockchip_dp_init(struct rockchip_dp_device *dp) ret = rockchip_dp_pre_init(dp); if (ret < 0) { dev_err(dp->dev, "failed to pre init %d\n", ret); + clk_disable_unprepare(dp->pclk); return ret; }
[PATCH -next] drm/rockchip: analogix_dp: add missing clk_disable_unprepare() on error
From: Wei Yongjun Add the missing clk_disable_unprepare() before return in the error handling case. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index e81e19a..89aadbf 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -96,6 +96,7 @@ static int rockchip_dp_poweron(struct analogix_dp_plat_data *plat_data) ret = rockchip_dp_pre_init(dp); if (ret < 0) { dev_err(dp->dev, "failed to dp pre init %d\n", ret); + clk_disable_unprepare(dp->pclk); return ret; } @@ -272,6 +273,7 @@ static int rockchip_dp_init(struct rockchip_dp_device *dp) ret = rockchip_dp_pre_init(dp); if (ret < 0) { dev_err(dp->dev, "failed to pre init %d\n", ret); + clk_disable_unprepare(dp->pclk); return ret; }
[PATCH -next] drm/rockchip: analogix_dp: remove .owner field for driver
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index e81e19a..6e36e0f 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -443,7 +443,6 @@ static struct platform_driver rockchip_dp_driver = { .remove = rockchip_dp_remove, .driver = { .name = "rockchip-dp", - .owner = THIS_MODULE, .pm = _dp_pm_ops, .of_match_table = of_match_ptr(rockchip_dp_dt_ids), },
[PATCH -next] drm/hisilicon: Fix error handling of ade_power_up()
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> Fix the reset_control_deassert() fail and clk_prepare_enable() fail error handling of ade_power_up(). Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index c3707d4..e2bd1e6 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -258,18 +258,24 @@ static int ade_power_up(struct ade_hw_ctx *ctx) ret = reset_control_deassert(ctx->reset); if (ret) { DRM_ERROR("failed to deassert reset\n"); - return ret; + goto err_reset; } ret = clk_prepare_enable(ctx->ade_core_clk); if (ret) { DRM_ERROR("failed to enable ade_core_clk (%d)\n", ret); - return ret; + goto err_prepare_enable; } ade_init(ctx); ctx->power_on = true; return 0; + +err_prepare_enable: + reset_control_assert(ctx->reset); +err_reset: + clk_disable_unprepare(ctx->media_noc_clk); + return ret; } static void ade_power_down(struct ade_hw_ctx *ctx)
[PATCH -next] drm/rockchip: analogix_dp: remove .owner field for driver
From: Wei Yongjun Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index e81e19a..6e36e0f 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -443,7 +443,6 @@ static struct platform_driver rockchip_dp_driver = { .remove = rockchip_dp_remove, .driver = { .name = "rockchip-dp", - .owner = THIS_MODULE, .pm = _dp_pm_ops, .of_match_table = of_match_ptr(rockchip_dp_dt_ids), },
[PATCH -next] drm/hisilicon: Fix error handling of ade_power_up()
From: Wei Yongjun Fix the reset_control_deassert() fail and clk_prepare_enable() fail error handling of ade_power_up(). Signed-off-by: Wei Yongjun --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index c3707d4..e2bd1e6 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -258,18 +258,24 @@ static int ade_power_up(struct ade_hw_ctx *ctx) ret = reset_control_deassert(ctx->reset); if (ret) { DRM_ERROR("failed to deassert reset\n"); - return ret; + goto err_reset; } ret = clk_prepare_enable(ctx->ade_core_clk); if (ret) { DRM_ERROR("failed to enable ade_core_clk (%d)\n", ret); - return ret; + goto err_prepare_enable; } ade_init(ctx); ctx->power_on = true; return 0; + +err_prepare_enable: + reset_control_assert(ctx->reset); +err_reset: + clk_disable_unprepare(ctx->media_noc_clk); + return ret; } static void ade_power_down(struct ade_hw_ctx *ctx)
[PATCH -next] coresight: etm4x: remove duplicated include from coresight-etm4x.c
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/hwtracing/coresight/coresight-etm4x.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 0d8ebfa..6e639b9 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include
[PATCH -next] coresight: etm4x: remove duplicated include from coresight-etm4x.c
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- drivers/hwtracing/coresight/coresight-etm4x.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 0d8ebfa..6e639b9 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include
[PATCH -next] ARM: ux500: remove duplicated include from cpu-db8500.c
From: Wei Yongjun <yongjun_...@trendmicro.com.cn> Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- arch/arm/mach-ux500/cpu-db8500.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 46b1da1..c0c36b97 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include
[PATCH -next] ARM: ux500: remove duplicated include from cpu-db8500.c
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- arch/arm/mach-ux500/cpu-db8500.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 46b1da1..c0c36b97 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include
[tip:locking/core] locking/static_keys: Fix non static symbol Sparse warning
Commit-ID: 885885f6b88d22f81e67ee6a61561e480b27d27a Gitweb: http://git.kernel.org/tip/885885f6b88d22f81e67ee6a61561e480b27d27a Author: Wei Yongjun <yongjun_...@trendmicro.com.cn> AuthorDate: Fri, 17 Jun 2016 17:19:40 + Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Thu, 7 Jul 2016 09:06:46 +0200 locking/static_keys: Fix non static symbol Sparse warning Fix the following sparse warnings: kernel/jump_label.c:473:23: warning: symbol 'jump_label_module_nb' was not declared. Should it be static? Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> Cc: Andrew Morton <a...@linux-foundation.org> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Paul E. McKenney <paul...@linux.vnet.ibm.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Thomas Gleixner <t...@linutronix.de> Link: http://lkml.kernel.org/r/1466183980-8903-1-git-send-email-weiyj...@163.com Signed-off-by: Ingo Molnar <mi...@kernel.org> --- kernel/jump_label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/jump_label.c b/kernel/jump_label.c index 05254ee..ac4ab95 100644 --- a/kernel/jump_label.c +++ b/kernel/jump_label.c @@ -422,7 +422,7 @@ jump_label_module_notify(struct notifier_block *self, unsigned long val, return notifier_from_errno(ret); } -struct notifier_block jump_label_module_nb = { +static struct notifier_block jump_label_module_nb = { .notifier_call = jump_label_module_notify, .priority = 1, /* higher than tracepoints */ };
[tip:locking/core] locking/static_keys: Fix non static symbol Sparse warning
Commit-ID: 885885f6b88d22f81e67ee6a61561e480b27d27a Gitweb: http://git.kernel.org/tip/885885f6b88d22f81e67ee6a61561e480b27d27a Author: Wei Yongjun AuthorDate: Fri, 17 Jun 2016 17:19:40 + Committer: Ingo Molnar CommitDate: Thu, 7 Jul 2016 09:06:46 +0200 locking/static_keys: Fix non static symbol Sparse warning Fix the following sparse warnings: kernel/jump_label.c:473:23: warning: symbol 'jump_label_module_nb' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1466183980-8903-1-git-send-email-weiyj...@163.com Signed-off-by: Ingo Molnar --- kernel/jump_label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/jump_label.c b/kernel/jump_label.c index 05254ee..ac4ab95 100644 --- a/kernel/jump_label.c +++ b/kernel/jump_label.c @@ -422,7 +422,7 @@ jump_label_module_notify(struct notifier_block *self, unsigned long val, return notifier_from_errno(ret); } -struct notifier_block jump_label_module_nb = { +static struct notifier_block jump_label_module_nb = { .notifier_call = jump_label_module_notify, .priority = 1, /* higher than tracepoints */ };
Re: [PATCH -next] memory: atmel-ebi: use PTR_ERR_OR_ZERO() to simplify the code
Hi, On 07/06/2016 08:18 PM, Alexandre Belloni wrote: > Hi, > > On 06/07/2016 at 12:08:05 +, weiyj...@163.com wrote : >> From: Wei Yongjun <yongjun_...@trendmicro.com.cn> >> >> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. >> > I'm guessing you found that using coccinnelle or any other static > analysis tool. Can you mention that in the commit message? > Your are right, this patch is found by coccinelle and created by scripts. (I called it dpatch, a kernel patch IDE, which had integrated coccinelle, sparse engine, scripts to found and create kernel patch. REF: https://github.com/weiyj/dpatch-devel). I mentioned those in passed, but no all of people like this. Regards, Wei Yongjun
Re: [PATCH -next] memory: atmel-ebi: use PTR_ERR_OR_ZERO() to simplify the code
Hi, On 07/06/2016 08:18 PM, Alexandre Belloni wrote: > Hi, > > On 06/07/2016 at 12:08:05 +, weiyj...@163.com wrote : >> From: Wei Yongjun >> >> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. >> > I'm guessing you found that using coccinnelle or any other static > analysis tool. Can you mention that in the commit message? > Your are right, this patch is found by coccinelle and created by scripts. (I called it dpatch, a kernel patch IDE, which had integrated coccinelle, sparse engine, scripts to found and create kernel patch. REF: https://github.com/weiyj/dpatch-devel). I mentioned those in passed, but no all of people like this. Regards, Wei Yongjun
[PATCH -next] clocksource: keystone: Fix return value check in keystone_timer_init()
From: Wei Yongjun In case of error, function of_clk_get() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun --- drivers/clocksource/timer-keystone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-keystone.c b/drivers/clocksource/timer-keystone.c index cbac8d0..4ca05ec 100644 --- a/drivers/clocksource/timer-keystone.c +++ b/drivers/clocksource/timer-keystone.c @@ -168,7 +168,7 @@ static void __init keystone_timer_init(struct device_node *np) } clk = of_clk_get(np, 0); - if (!clk) { + if (IS_ERR(clk)) { pr_err("%s: failed to get clock\n", __func__); iounmap(timer.base); return; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] clocksource: keystone: Fix return value check in keystone_timer_init()
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, function of_clk_get() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/clocksource/timer-keystone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-keystone.c b/drivers/clocksource/timer-keystone.c index cbac8d0..4ca05ec 100644 --- a/drivers/clocksource/timer-keystone.c +++ b/drivers/clocksource/timer-keystone.c @@ -168,7 +168,7 @@ static void __init keystone_timer_init(struct device_node *np) } clk = of_clk_get(np, 0); - if (!clk) { + if (IS_ERR(clk)) { pr_err(%s: failed to get clock\n, __func__); iounmap(timer.base); return; -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/kaslr] x86, kaslr: Remove unused including
Commit-ID: 19259943f0954dcd1817f94776376bf51c6a46d5 Gitweb: http://git.kernel.org/tip/19259943f0954dcd1817f94776376bf51c6a46d5 Author: Wei Yongjun AuthorDate: Sat, 7 Dec 2013 21:02:36 +0800 Committer: H. Peter Anvin CommitDate: Tue, 14 Jan 2014 10:45:56 -0800 x86, kaslr: Remove unused including Remove including that don't need it. Signed-off-by: Wei Yongjun Link: http://lkml.kernel.org/r/capglhd-fjx1rybjwfau1vhrftvhwwmll3x46bouc5unxhpj...@mail.gmail.com Acked-by: Kees Cook Signed-off-by: H. Peter Anvin --- arch/x86/boot/compressed/aslr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c index 84be175..90a21f4 100644 --- a/arch/x86/boot/compressed/aslr.c +++ b/arch/x86/boot/compressed/aslr.c @@ -10,7 +10,6 @@ #include #include #include -#include /* Simplified build-specific string for starting entropy. */ static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@" -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/kaslr] x86, kaslr: Remove unused including linux/ version.h
Commit-ID: 19259943f0954dcd1817f94776376bf51c6a46d5 Gitweb: http://git.kernel.org/tip/19259943f0954dcd1817f94776376bf51c6a46d5 Author: Wei Yongjun yongjun_...@trendmicro.com.cn AuthorDate: Sat, 7 Dec 2013 21:02:36 +0800 Committer: H. Peter Anvin h...@linux.intel.com CommitDate: Tue, 14 Jan 2014 10:45:56 -0800 x86, kaslr: Remove unused including linux/version.h Remove including linux/version.h that don't need it. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn Link: http://lkml.kernel.org/r/capglhd-fjx1rybjwfau1vhrftvhwwmll3x46bouc5unxhpj...@mail.gmail.com Acked-by: Kees Cook keesc...@chromium.org Signed-off-by: H. Peter Anvin h...@linux.intel.com --- arch/x86/boot/compressed/aslr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c index 84be175..90a21f4 100644 --- a/arch/x86/boot/compressed/aslr.c +++ b/arch/x86/boot/compressed/aslr.c @@ -10,7 +10,6 @@ #include linux/uts.h #include linux/utsname.h #include generated/utsrelease.h -#include linux/version.h /* Simplified build-specific string for starting entropy. */ static const char build_str[] = UTS_RELEASE ( LINUX_COMPILE_BY @ -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] ion: Fix sparse non static symbol warnings
From: Wei Yongjun Fixes the following sparse warnings: drivers/staging/android/ion/ion_dummy_driver.c:26:19: warning: symbol 'idev' was not declared. Should it be static? drivers/staging/android/ion/ion_dummy_driver.c:27:17: warning: symbol 'heaps' was not declared. Should it be static? drivers/staging/android/ion/ion_dummy_driver.c:29:6: warning: symbol 'carveout_ptr' was not declared. Should it be static? drivers/staging/android/ion/ion_dummy_driver.c:30:6: warning: symbol 'chunk_ptr' was not declared. Should it be static? drivers/staging/android/ion/ion_dummy_driver.c:32:26: warning: symbol 'dummy_heaps' was not declared. Should it be static? drivers/staging/android/ion/ion_dummy_driver.c:59:26: warning: symbol 'dummy_ion_pdata' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/staging/android/ion/ion_dummy_driver.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c index 55b2002..b89004a 100644 --- a/drivers/staging/android/ion/ion_dummy_driver.c +++ b/drivers/staging/android/ion/ion_dummy_driver.c @@ -23,13 +23,13 @@ #include "ion.h" #include "ion_priv.h" -struct ion_device *idev; -struct ion_heap **heaps; +static struct ion_device *idev; +static struct ion_heap **heaps; -void *carveout_ptr; -void *chunk_ptr; +static void *carveout_ptr; +static void *chunk_ptr; -struct ion_platform_heap dummy_heaps[] = { +static struct ion_platform_heap dummy_heaps[] = { { .id = ION_HEAP_TYPE_SYSTEM, .type = ION_HEAP_TYPE_SYSTEM, @@ -56,7 +56,7 @@ struct ion_platform_heap dummy_heaps[] = { }, }; -struct ion_platform_data dummy_ion_pdata = { +static struct ion_platform_data dummy_ion_pdata = { .nr = 4, .heaps = dummy_heaps, }; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] ion: Fix sparse non static symbol warnings
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fixes the following sparse warnings: drivers/staging/android/ion/ion_dummy_driver.c:26:19: warning: symbol 'idev' was not declared. Should it be static? drivers/staging/android/ion/ion_dummy_driver.c:27:17: warning: symbol 'heaps' was not declared. Should it be static? drivers/staging/android/ion/ion_dummy_driver.c:29:6: warning: symbol 'carveout_ptr' was not declared. Should it be static? drivers/staging/android/ion/ion_dummy_driver.c:30:6: warning: symbol 'chunk_ptr' was not declared. Should it be static? drivers/staging/android/ion/ion_dummy_driver.c:32:26: warning: symbol 'dummy_heaps' was not declared. Should it be static? drivers/staging/android/ion/ion_dummy_driver.c:59:26: warning: symbol 'dummy_ion_pdata' was not declared. Should it be static? Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/staging/android/ion/ion_dummy_driver.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c index 55b2002..b89004a 100644 --- a/drivers/staging/android/ion/ion_dummy_driver.c +++ b/drivers/staging/android/ion/ion_dummy_driver.c @@ -23,13 +23,13 @@ #include ion.h #include ion_priv.h -struct ion_device *idev; -struct ion_heap **heaps; +static struct ion_device *idev; +static struct ion_heap **heaps; -void *carveout_ptr; -void *chunk_ptr; +static void *carveout_ptr; +static void *chunk_ptr; -struct ion_platform_heap dummy_heaps[] = { +static struct ion_platform_heap dummy_heaps[] = { { .id = ION_HEAP_TYPE_SYSTEM, .type = ION_HEAP_TYPE_SYSTEM, @@ -56,7 +56,7 @@ struct ion_platform_heap dummy_heaps[] = { }, }; -struct ion_platform_data dummy_ion_pdata = { +static struct ion_platform_data dummy_ion_pdata = { .nr = 4, .heaps = dummy_heaps, }; -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] ASoC: wm_adsp: Fix sparse non static symbol warning
From: Wei Yongjun Fixes the following sparse warning: sound/soc/codecs/wm_adsp.c:1500:6: warning: symbol 'wm_adsp2_boot_work' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 41669ad..444626f 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -1497,7 +1497,7 @@ static int wm_adsp2_ena(struct wm_adsp *dsp) return 0; } -void wm_adsp2_boot_work(struct work_struct *work) +static void wm_adsp2_boot_work(struct work_struct *work) { struct wm_adsp *dsp = container_of(work, struct wm_adsp, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] ASoC: wm_adsp: Fix sparse non static symbol warning
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fixes the following sparse warning: sound/soc/codecs/wm_adsp.c:1500:6: warning: symbol 'wm_adsp2_boot_work' was not declared. Should it be static? Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 41669ad..444626f 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -1497,7 +1497,7 @@ static int wm_adsp2_ena(struct wm_adsp *dsp) return 0; } -void wm_adsp2_boot_work(struct work_struct *work) +static void wm_adsp2_boot_work(struct work_struct *work) { struct wm_adsp *dsp = container_of(work, struct wm_adsp, -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] ASoC: ux500: Fix sparse non static symbol warning
From: Wei Yongjun Fixes the following sparse warning: sound/soc/ux500/ux500_msp_i2s.c:649:5: warning: symbol 'ux500_msp_i2s_of_init_msp' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- sound/soc/ux500/ux500_msp_i2s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c index 7f2a4ac..959d7b4 100644 --- a/sound/soc/ux500/ux500_msp_i2s.c +++ b/sound/soc/ux500/ux500_msp_i2s.c @@ -646,9 +646,9 @@ int ux500_msp_i2s_close(struct ux500_msp *msp, unsigned int dir) } -int ux500_msp_i2s_of_init_msp(struct platform_device *pdev, - struct ux500_msp *msp, - struct msp_i2s_platform_data **platform_data) +static int ux500_msp_i2s_of_init_msp(struct platform_device *pdev, + struct ux500_msp *msp, + struct msp_i2s_platform_data **platform_data) { struct msp_i2s_platform_data *pdata; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] ASoC: ux500: Fix sparse non static symbol warning
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fixes the following sparse warning: sound/soc/ux500/ux500_msp_i2s.c:649:5: warning: symbol 'ux500_msp_i2s_of_init_msp' was not declared. Should it be static? Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- sound/soc/ux500/ux500_msp_i2s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c index 7f2a4ac..959d7b4 100644 --- a/sound/soc/ux500/ux500_msp_i2s.c +++ b/sound/soc/ux500/ux500_msp_i2s.c @@ -646,9 +646,9 @@ int ux500_msp_i2s_close(struct ux500_msp *msp, unsigned int dir) } -int ux500_msp_i2s_of_init_msp(struct platform_device *pdev, - struct ux500_msp *msp, - struct msp_i2s_platform_data **platform_data) +static int ux500_msp_i2s_of_init_msp(struct platform_device *pdev, + struct ux500_msp *msp, + struct msp_i2s_platform_data **platform_data) { struct msp_i2s_platform_data *pdata; -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] drivers/rtc/rtc-isl12057.c: remove duplicated include
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- drivers/rtc/rtc-isl12057.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c index 7854a65..7e5ead9 100644 --- a/drivers/rtc/rtc-isl12057.c +++ b/drivers/rtc/rtc-isl12057.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mtd: nuc900_nand: remove redundant return value check of platform_get_resource()
From: Wei Yongjun Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun --- drivers/mtd/nand/nuc900_nand.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mtd/nand/nuc900_nand.c b/drivers/mtd/nand/nuc900_nand.c index 661fd14..9ee09a8 100644 --- a/drivers/mtd/nand/nuc900_nand.c +++ b/drivers/mtd/nand/nuc900_nand.c @@ -268,9 +268,6 @@ static int nuc900_nand_probe(struct platform_device *pdev) chip->ecc.mode = NAND_ECC_SOFT; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENXIO; - nuc900_nand->reg = devm_ioremap_resource(>dev, res); if (IS_ERR(nuc900_nand->reg)) return PTR_ERR(nuc900_nand->reg); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] xen/pvh: remove duplicated include from enlighten.c
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- arch/x86/xen/enlighten.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index a4e2f30..b6d61c3 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] xen/evtchn_fifo: fix error return code in evtchn_fifo_setup()
From: Wei Yongjun Fix to return -ENOMEM from the error handling case instead of 0 (overwrited to 0 by the HYPERVISOR_event_channel_op call), otherwise the error condition cann't be reflected from the return value. Signed-off-by: Wei Yongjun --- drivers/xen/events/events_fifo.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/xen/events/events_fifo.c b/drivers/xen/events/events_fifo.c index e2bf957..89e4893 100644 --- a/drivers/xen/events/events_fifo.c +++ b/drivers/xen/events/events_fifo.c @@ -109,7 +109,7 @@ static int evtchn_fifo_setup(struct irq_info *info) { unsigned port = info->evtchn; unsigned new_array_pages; - int ret = -ENOMEM; + int ret; new_array_pages = port / EVENT_WORDS_PER_PAGE + 1; @@ -124,8 +124,10 @@ static int evtchn_fifo_setup(struct irq_info *info) array_page = event_array[event_array_pages]; if (!array_page) { array_page = (void *)__get_free_page(GFP_KERNEL); - if (array_page == NULL) + if (array_page == NULL) { + ret = -ENOMEM; goto error; + } event_array[event_array_pages] = array_page; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] isp1704_charger: remove useless check in isp1704_charger_probe()
From: Wei Yongjun Neither devm_usb_get_phy_by_phandle() nor devm_usb_get_phy() can return a NULL result, so remove the useless !isp->phy check. Signed-off-by: Wei Yongjun --- drivers/power/isp1704_charger.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c index 80edb7d..0b4cf9d 100644 --- a/drivers/power/isp1704_charger.c +++ b/drivers/power/isp1704_charger.c @@ -444,8 +444,6 @@ static int isp1704_charger_probe(struct platform_device *pdev) ret = PTR_ERR(isp->phy); goto fail0; } - if (!isp->phy) - goto fail0; isp->dev = >dev; platform_set_drvdata(pdev, isp); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] xen-platform: fix error return code in platform_pci_init()
From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, otherwise the error condition cann't be reflected from the return value. Signed-off-by: Wei Yongjun --- drivers/xen/platform-pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c index f1947ac..a1361c3 100644 --- a/drivers/xen/platform-pci.c +++ b/drivers/xen/platform-pci.c @@ -156,7 +156,8 @@ static int platform_pci_init(struct pci_dev *pdev, max_nr_gframes = gnttab_max_grant_frames(); grant_frames = alloc_xen_mmio(PAGE_SIZE * max_nr_gframes); - if (gnttab_setup_auto_xlat_frames(grant_frames)) + ret = gnttab_setup_auto_xlat_frames(grant_frames); + if (ret) goto out; ret = gnttab_init(); if (ret) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] misc: genwqe: fix return value check in genwqe_device_create()
From: Wei Yongjun In case of error, the function device_create_with_groups() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun --- drivers/misc/genwqe/card_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/genwqe/card_dev.c b/drivers/misc/genwqe/card_dev.c index 9b231bb..46fa2ca 100644 --- a/drivers/misc/genwqe/card_dev.c +++ b/drivers/misc/genwqe/card_dev.c @@ -1378,8 +1378,8 @@ int genwqe_device_create(struct genwqe_dev *cd) genwqe_attribute_groups, GENWQE_DEVNAME "%u_card", cd->card_idx); - if (cd->dev == NULL) { - rc = -ENODEV; + if (IS_ERR(cd->dev)) { + rc = PTR_ERR(cd->dev); goto err_cdev; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] misc: genwqe: fix return value check in genwqe_device_create()
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function device_create_with_groups() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/misc/genwqe/card_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/genwqe/card_dev.c b/drivers/misc/genwqe/card_dev.c index 9b231bb..46fa2ca 100644 --- a/drivers/misc/genwqe/card_dev.c +++ b/drivers/misc/genwqe/card_dev.c @@ -1378,8 +1378,8 @@ int genwqe_device_create(struct genwqe_dev *cd) genwqe_attribute_groups, GENWQE_DEVNAME %u_card, cd-card_idx); - if (cd-dev == NULL) { - rc = -ENODEV; + if (IS_ERR(cd-dev)) { + rc = PTR_ERR(cd-dev); goto err_cdev; } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] xen-platform: fix error return code in platform_pci_init()
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, otherwise the error condition cann't be reflected from the return value. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/xen/platform-pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c index f1947ac..a1361c3 100644 --- a/drivers/xen/platform-pci.c +++ b/drivers/xen/platform-pci.c @@ -156,7 +156,8 @@ static int platform_pci_init(struct pci_dev *pdev, max_nr_gframes = gnttab_max_grant_frames(); grant_frames = alloc_xen_mmio(PAGE_SIZE * max_nr_gframes); - if (gnttab_setup_auto_xlat_frames(grant_frames)) + ret = gnttab_setup_auto_xlat_frames(grant_frames); + if (ret) goto out; ret = gnttab_init(); if (ret) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] isp1704_charger: remove useless check in isp1704_charger_probe()
From: Wei Yongjun yongjun_...@trendmicro.com.cn Neither devm_usb_get_phy_by_phandle() nor devm_usb_get_phy() can return a NULL result, so remove the useless !isp-phy check. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/power/isp1704_charger.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c index 80edb7d..0b4cf9d 100644 --- a/drivers/power/isp1704_charger.c +++ b/drivers/power/isp1704_charger.c @@ -444,8 +444,6 @@ static int isp1704_charger_probe(struct platform_device *pdev) ret = PTR_ERR(isp-phy); goto fail0; } - if (!isp-phy) - goto fail0; isp-dev = pdev-dev; platform_set_drvdata(pdev, isp); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] xen/evtchn_fifo: fix error return code in evtchn_fifo_setup()
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENOMEM from the error handling case instead of 0 (overwrited to 0 by the HYPERVISOR_event_channel_op call), otherwise the error condition cann't be reflected from the return value. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/xen/events/events_fifo.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/xen/events/events_fifo.c b/drivers/xen/events/events_fifo.c index e2bf957..89e4893 100644 --- a/drivers/xen/events/events_fifo.c +++ b/drivers/xen/events/events_fifo.c @@ -109,7 +109,7 @@ static int evtchn_fifo_setup(struct irq_info *info) { unsigned port = info-evtchn; unsigned new_array_pages; - int ret = -ENOMEM; + int ret; new_array_pages = port / EVENT_WORDS_PER_PAGE + 1; @@ -124,8 +124,10 @@ static int evtchn_fifo_setup(struct irq_info *info) array_page = event_array[event_array_pages]; if (!array_page) { array_page = (void *)__get_free_page(GFP_KERNEL); - if (array_page == NULL) + if (array_page == NULL) { + ret = -ENOMEM; goto error; + } event_array[event_array_pages] = array_page; } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] xen/pvh: remove duplicated include from enlighten.c
From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove duplicated include. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- arch/x86/xen/enlighten.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index a4e2f30..b6d61c3 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -46,7 +46,6 @@ #include xen/hvm.h #include xen/hvc-console.h #include xen/acpi.h -#include xen/features.h #include asm/paravirt.h #include asm/apic.h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mtd: nuc900_nand: remove redundant return value check of platform_get_resource()
From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/mtd/nand/nuc900_nand.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mtd/nand/nuc900_nand.c b/drivers/mtd/nand/nuc900_nand.c index 661fd14..9ee09a8 100644 --- a/drivers/mtd/nand/nuc900_nand.c +++ b/drivers/mtd/nand/nuc900_nand.c @@ -268,9 +268,6 @@ static int nuc900_nand_probe(struct platform_device *pdev) chip-ecc.mode = NAND_ECC_SOFT; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENXIO; - nuc900_nand-reg = devm_ioremap_resource(pdev-dev, res); if (IS_ERR(nuc900_nand-reg)) return PTR_ERR(nuc900_nand-reg); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] drivers/rtc/rtc-isl12057.c: remove duplicated include
From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove duplicated include. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/rtc/rtc-isl12057.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c index 7854a65..7e5ead9 100644 --- a/drivers/rtc/rtc-isl12057.c +++ b/drivers/rtc/rtc-isl12057.c @@ -26,7 +26,6 @@ #include linux/rtc.h #include linux/i2c.h #include linux/bcd.h -#include linux/rtc.h #include linux/of.h #include linux/of_device.h #include linux/regmap.h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] Staging: silicom: fix sparse non static symbol warnings
From: Wei Yongjun Fixes the following sparse warnings: drivers/staging/silicom/bypasslib/bypass.c:528:12: warning: symbol 'init_lib_module' was not declared. Should it be static? drivers/staging/silicom/bypasslib/bypass.c:534:13: warning: symbol 'cleanup_lib_module' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/staging/silicom/bypasslib/bypass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/silicom/bypasslib/bypass.c b/drivers/staging/silicom/bypasslib/bypass.c index 9b771c9..09e00da 100644 --- a/drivers/staging/silicom/bypasslib/bypass.c +++ b/drivers/staging/silicom/bypasslib/bypass.c @@ -525,13 +525,13 @@ static int get_bypass_info(int if_index, struct bp_info *bp_info) } EXPORT_SYMBOL(get_bypass_info); -int __init init_lib_module(void) +static int __init init_lib_module(void) { printk(VERSION); return 0; } -void __exit cleanup_lib_module(void) +static void __exit cleanup_lib_module(void) { } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] Staging: silicom: fix sparse non static symbol warnings
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fixes the following sparse warnings: drivers/staging/silicom/bypasslib/bypass.c:528:12: warning: symbol 'init_lib_module' was not declared. Should it be static? drivers/staging/silicom/bypasslib/bypass.c:534:13: warning: symbol 'cleanup_lib_module' was not declared. Should it be static? Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/staging/silicom/bypasslib/bypass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/silicom/bypasslib/bypass.c b/drivers/staging/silicom/bypasslib/bypass.c index 9b771c9..09e00da 100644 --- a/drivers/staging/silicom/bypasslib/bypass.c +++ b/drivers/staging/silicom/bypasslib/bypass.c @@ -525,13 +525,13 @@ static int get_bypass_info(int if_index, struct bp_info *bp_info) } EXPORT_SYMBOL(get_bypass_info); -int __init init_lib_module(void) +static int __init init_lib_module(void) { printk(VERSION); return 0; } -void __exit cleanup_lib_module(void) +static void __exit cleanup_lib_module(void) { } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] misc: genwqe: remove unused including
From: Wei Yongjun Remove including that don't need it. Signed-off-by: Wei Yongjun --- drivers/misc/genwqe/card_sysfs.c | 1 - drivers/misc/genwqe/card_base.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/misc/genwqe/card_sysfs.c b/drivers/misc/genwqe/card_sysfs.c index a72a992..acd97f3 100644 --- a/drivers/misc/genwqe/card_sysfs.c +++ b/drivers/misc/genwqe/card_sysfs.c @@ -24,7 +24,6 @@ * debugging, please also see the debugfs interfaces of this driver. */ -#include #include #include #include diff --git a/drivers/misc/genwqe/card_base.h b/drivers/misc/genwqe/card_base.h index 41953e3..f034bd7 100644 --- a/drivers/misc/genwqe/card_base.h +++ b/drivers/misc/genwqe/card_base.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] misc: genwqe: remove unused including linux/version.h
From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove including linux/version.h that don't need it. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/misc/genwqe/card_sysfs.c | 1 - drivers/misc/genwqe/card_base.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/misc/genwqe/card_sysfs.c b/drivers/misc/genwqe/card_sysfs.c index a72a992..acd97f3 100644 --- a/drivers/misc/genwqe/card_sysfs.c +++ b/drivers/misc/genwqe/card_sysfs.c @@ -24,7 +24,6 @@ * debugging, please also see the debugfs interfaces of this driver. */ -#include linux/version.h #include linux/kernel.h #include linux/types.h #include linux/module.h diff --git a/drivers/misc/genwqe/card_base.h b/drivers/misc/genwqe/card_base.h index 41953e3..f034bd7 100644 --- a/drivers/misc/genwqe/card_base.h +++ b/drivers/misc/genwqe/card_base.h @@ -34,7 +34,6 @@ #include linux/semaphore.h #include linux/uaccess.h #include linux/io.h -#include linux/version.h #include linux/debugfs.h #include linux/genwqe/genwqe_card.h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mfd: twl6040: fix sparse non static symbol warning
From: Wei Yongjun Fixes the following sparse warning: drivers/mfd/twl6040.c:89:20: warning: symbol 'twl6040_patch' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/mfd/twl6040.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c index 51b6df1..75316fb 100644 --- a/drivers/mfd/twl6040.c +++ b/drivers/mfd/twl6040.c @@ -86,7 +86,7 @@ static struct reg_default twl6040_defaults[] = { { 0x2E, 0x00 }, /* REG_STATUS (ro) */ }; -struct reg_default twl6040_patch[] = { +static struct reg_default twl6040_patch[] = { /* Select I2C bus access to dual access registers */ { TWL6040_REG_ACCCTL, 0x09 }, }; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mfd: twl6040: fix sparse non static symbol warning
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fixes the following sparse warning: drivers/mfd/twl6040.c:89:20: warning: symbol 'twl6040_patch' was not declared. Should it be static? Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/mfd/twl6040.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c index 51b6df1..75316fb 100644 --- a/drivers/mfd/twl6040.c +++ b/drivers/mfd/twl6040.c @@ -86,7 +86,7 @@ static struct reg_default twl6040_defaults[] = { { 0x2E, 0x00 }, /* REG_STATUS (ro) */ }; -struct reg_default twl6040_patch[] = { +static struct reg_default twl6040_patch[] = { /* Select I2C bus access to dual access registers */ { TWL6040_REG_ACCCTL, 0x09 }, }; -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: lustre: fix return value check in capa_hmac()
From: Wei Yongjun In case of error, the function crypto_alloc_hash() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun --- drivers/staging/lustre/lustre/obdclass/capa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/capa.c b/drivers/staging/lustre/lustre/obdclass/capa.c index 68d797b..039232d 100644 --- a/drivers/staging/lustre/lustre/obdclass/capa.c +++ b/drivers/staging/lustre/lustre/obdclass/capa.c @@ -273,10 +273,10 @@ int capa_hmac(__u8 *hmac, struct lustre_capa *capa, __u8 *key) alg = _hmac_algs[capa_alg(capa)]; tfm = crypto_alloc_hash(alg->ha_name, 0, 0); - if (!tfm) { + if (IS_ERR(tfm)) { CERROR("crypto_alloc_tfm failed, check whether your kernel" "has crypto support!\n"); - return -ENOMEM; + return PTR_ERR(tfm); } keylen = alg->ha_keylen; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: sep: add missing destroy_workqueue() in sep_crypto.c
From: Wei Yongjun Add the missing destroy_workqueue() before return from sep_crypto_setup() and sep_crypto_takedown(). Signed-off-by: Wei Yongjun --- drivers/staging/sep/sep_crypto.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/sep/sep_crypto.c b/drivers/staging/sep/sep_crypto.c index b9262a7..1c62101 100644 --- a/drivers/staging/sep/sep_crypto.c +++ b/drivers/staging/sep/sep_crypto.c @@ -3927,6 +3927,7 @@ int sep_crypto_setup(void) err_algs: for (k = 0; k < i; k++) crypto_unregister_ahash(_algs[k]); + destroy_workqueue(sep_dev->workqueue); return err; err_crypto_algs: @@ -3945,6 +3946,7 @@ void sep_crypto_takedown(void) for (i = 0; i < ARRAY_SIZE(crypto_algs); i++) crypto_unregister_alg(_algs[i]); + destroy_workqueue(sep_dev->workqueue); tasklet_kill(_dev->finish_tasklet); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mfd: rtsx: fix sparse non static symbol warning
From: Wei Yongjun Fixes the following sparse warning: drivers/mfd/rtl8411.c:473:6: warning: symbol 'rtl8411_init_common_params' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/mfd/rtl8411.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/rtl8411.c b/drivers/mfd/rtl8411.c index ada38ad..fdd34c8 100644 --- a/drivers/mfd/rtl8411.c +++ b/drivers/mfd/rtl8411.c @@ -470,7 +470,7 @@ static const u32 rtl8411b_qfn48_ms_pull_ctl_disable_tbl[] = { 0, }; -void rtl8411_init_common_params(struct rtsx_pcr *pcr) +static void rtl8411_init_common_params(struct rtsx_pcr *pcr) { pcr->extra_caps = EXTRA_CAPS_SD_SDR50 | EXTRA_CAPS_SD_SDR104; pcr->num_slots = 2; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mfd: rtsx: fix sparse non static symbol warning
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fixes the following sparse warning: drivers/mfd/rtl8411.c:473:6: warning: symbol 'rtl8411_init_common_params' was not declared. Should it be static? Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/mfd/rtl8411.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/rtl8411.c b/drivers/mfd/rtl8411.c index ada38ad..fdd34c8 100644 --- a/drivers/mfd/rtl8411.c +++ b/drivers/mfd/rtl8411.c @@ -470,7 +470,7 @@ static const u32 rtl8411b_qfn48_ms_pull_ctl_disable_tbl[] = { 0, }; -void rtl8411_init_common_params(struct rtsx_pcr *pcr) +static void rtl8411_init_common_params(struct rtsx_pcr *pcr) { pcr-extra_caps = EXTRA_CAPS_SD_SDR50 | EXTRA_CAPS_SD_SDR104; pcr-num_slots = 2; -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: sep: add missing destroy_workqueue() in sep_crypto.c
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing destroy_workqueue() before return from sep_crypto_setup() and sep_crypto_takedown(). Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/staging/sep/sep_crypto.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/sep/sep_crypto.c b/drivers/staging/sep/sep_crypto.c index b9262a7..1c62101 100644 --- a/drivers/staging/sep/sep_crypto.c +++ b/drivers/staging/sep/sep_crypto.c @@ -3927,6 +3927,7 @@ int sep_crypto_setup(void) err_algs: for (k = 0; k i; k++) crypto_unregister_ahash(hash_algs[k]); + destroy_workqueue(sep_dev-workqueue); return err; err_crypto_algs: @@ -3945,6 +3946,7 @@ void sep_crypto_takedown(void) for (i = 0; i ARRAY_SIZE(crypto_algs); i++) crypto_unregister_alg(crypto_algs[i]); + destroy_workqueue(sep_dev-workqueue); tasklet_kill(sep_dev-finish_tasklet); } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: lustre: fix return value check in capa_hmac()
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function crypto_alloc_hash() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/staging/lustre/lustre/obdclass/capa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/capa.c b/drivers/staging/lustre/lustre/obdclass/capa.c index 68d797b..039232d 100644 --- a/drivers/staging/lustre/lustre/obdclass/capa.c +++ b/drivers/staging/lustre/lustre/obdclass/capa.c @@ -273,10 +273,10 @@ int capa_hmac(__u8 *hmac, struct lustre_capa *capa, __u8 *key) alg = capa_hmac_algs[capa_alg(capa)]; tfm = crypto_alloc_hash(alg-ha_name, 0, 0); - if (!tfm) { + if (IS_ERR(tfm)) { CERROR(crypto_alloc_tfm failed, check whether your kernel has crypto support!\n); - return -ENOMEM; + return PTR_ERR(tfm); } keylen = alg-ha_keylen; -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] drm/i915: fix return value check of debugfs_create_file()
From: Wei Yongjun In case of error, the function debugfs_create_file() returns NULL pointer not ERR_PTR() if debugfs is enabled. The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/i915/i915_debugfs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 7008aac..856e18b 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1920,8 +1920,8 @@ static int i915_pipe_crc_create(struct dentry *root, struct drm_minor *minor, info->dev = dev; ent = debugfs_create_file(info->name, S_IRUGO, root, info, _pipe_crc_fops); - if (IS_ERR(ent)) - return PTR_ERR(ent); + if (!ent) + return -ENOMEM; return drm_add_fake_info_node(minor, ent, info); } @@ -2931,8 +2931,8 @@ static int i915_forcewake_create(struct dentry *root, struct drm_minor *minor) S_IRUSR, root, dev, _forcewake_fops); - if (IS_ERR(ent)) - return PTR_ERR(ent); + if (!ent) + return -ENOMEM; return drm_add_fake_info_node(minor, ent, _forcewake_fops); } @@ -2949,8 +2949,8 @@ static int i915_debugfs_create(struct dentry *root, S_IRUGO | S_IWUSR, root, dev, fops); - if (IS_ERR(ent)) - return PTR_ERR(ent); + if (!ent) + return -ENOMEM; return drm_add_fake_info_node(minor, ent, fops); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] staging: xillybus: fix error return code in xilly_probe()
From: Wei Yongjun Fix to return negative error code -EIO from the error handling case instead of 0. Signed-off-by: Wei Yongjun --- drivers/staging/xillybus/xillybus_pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/xillybus/xillybus_pcie.c b/drivers/staging/xillybus/xillybus_pcie.c index 0564f97..51426d8 100644 --- a/drivers/staging/xillybus/xillybus_pcie.c +++ b/drivers/staging/xillybus/xillybus_pcie.c @@ -168,9 +168,9 @@ static int xilly_probe(struct pci_dev *pdev, } endpoint->registers = pci_iomap(pdev, 0, 128); - if (!endpoint->registers) { dev_err(endpoint->dev, "Failed to map BAR 0. Aborting.\n"); + rc = -EIO; goto failed_iomap0; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] staging: xillybus: fix error return code in xilly_probe()
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return negative error code -EIO from the error handling case instead of 0. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/staging/xillybus/xillybus_pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/xillybus/xillybus_pcie.c b/drivers/staging/xillybus/xillybus_pcie.c index 0564f97..51426d8 100644 --- a/drivers/staging/xillybus/xillybus_pcie.c +++ b/drivers/staging/xillybus/xillybus_pcie.c @@ -168,9 +168,9 @@ static int xilly_probe(struct pci_dev *pdev, } endpoint-registers = pci_iomap(pdev, 0, 128); - if (!endpoint-registers) { dev_err(endpoint-dev, Failed to map BAR 0. Aborting.\n); + rc = -EIO; goto failed_iomap0; } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] drm/i915: fix return value check of debugfs_create_file()
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function debugfs_create_file() returns NULL pointer not ERR_PTR() if debugfs is enabled. The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/gpu/drm/i915/i915_debugfs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 7008aac..856e18b 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1920,8 +1920,8 @@ static int i915_pipe_crc_create(struct dentry *root, struct drm_minor *minor, info-dev = dev; ent = debugfs_create_file(info-name, S_IRUGO, root, info, i915_pipe_crc_fops); - if (IS_ERR(ent)) - return PTR_ERR(ent); + if (!ent) + return -ENOMEM; return drm_add_fake_info_node(minor, ent, info); } @@ -2931,8 +2931,8 @@ static int i915_forcewake_create(struct dentry *root, struct drm_minor *minor) S_IRUSR, root, dev, i915_forcewake_fops); - if (IS_ERR(ent)) - return PTR_ERR(ent); + if (!ent) + return -ENOMEM; return drm_add_fake_info_node(minor, ent, i915_forcewake_fops); } @@ -2949,8 +2949,8 @@ static int i915_debugfs_create(struct dentry *root, S_IRUGO | S_IWUSR, root, dev, fops); - if (IS_ERR(ent)) - return PTR_ERR(ent); + if (!ent) + return -ENOMEM; return drm_add_fake_info_node(minor, ent, fops); } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] ARM: pxa: fix return value check in em_x270_sensor_init()
From: Wei Yongjun In case of error, the function regulator_get() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun --- arch/arm/mach-pxa/em-x270.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index 6915a9f..339b422 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c @@ -971,9 +971,9 @@ static int em_x270_sensor_init(void) gpio_direction_output(cam_reset, 0); em_x270_camera_ldo = regulator_get(NULL, "vcc cam"); - if (em_x270_camera_ldo == NULL) { + if (IS_ERR(em_x270_camera_ldo)) { gpio_free(cam_reset); - return -ENODEV; + return PTR_ERR(em_x270_camera_ldo); } ret = regulator_enable(em_x270_camera_ldo); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] ARM: pxa: fix return value check in em_x270_sensor_init()
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function regulator_get() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- arch/arm/mach-pxa/em-x270.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index 6915a9f..339b422 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c @@ -971,9 +971,9 @@ static int em_x270_sensor_init(void) gpio_direction_output(cam_reset, 0); em_x270_camera_ldo = regulator_get(NULL, vcc cam); - if (em_x270_camera_ldo == NULL) { + if (IS_ERR(em_x270_camera_ldo)) { gpio_free(cam_reset); - return -ENODEV; + return PTR_ERR(em_x270_camera_ldo); } ret = regulator_enable(em_x270_camera_ldo); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] x86, kaslr: remove unused including
From: Wei Yongjun Remove including that don't need it. Signed-off-by: Wei Yongjun --- arch/x86/boot/compressed/aslr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c index 84be175..90a21f4 100644 --- a/arch/x86/boot/compressed/aslr.c +++ b/arch/x86/boot/compressed/aslr.c @@ -10,7 +10,6 @@ #include #include #include -#include /* Simplified build-specific string for starting entropy. */ static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@" -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] x86, kaslr: remove unused including linux/version.h
From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove including linux/version.h that don't need it. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- arch/x86/boot/compressed/aslr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c index 84be175..90a21f4 100644 --- a/arch/x86/boot/compressed/aslr.c +++ b/arch/x86/boot/compressed/aslr.c @@ -10,7 +10,6 @@ #include linux/uts.h #include linux/utsname.h #include generated/utsrelease.h -#include linux/version.h /* Simplified build-specific string for starting entropy. */ static const char build_str[] = UTS_RELEASE ( LINUX_COMPILE_BY @ -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] sysfs, kernfs: remove duplicated include from file.c
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- fs/kernfs/file.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c index 990c97f..4a5863b 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include "kernfs-internal.h" -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mfd: sta2x11-mfd: fix return value check in sta2x11_mfd_platform_probe()
From: Wei Yongjun In case of error, the function devm_regmap_init_mmio() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun --- drivers/mfd/sta2x11-mfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/sta2x11-mfd.c b/drivers/mfd/sta2x11-mfd.c index 53ab686..0d42e40 100644 --- a/drivers/mfd/sta2x11-mfd.c +++ b/drivers/mfd/sta2x11-mfd.c @@ -339,7 +339,7 @@ static int sta2x11_mfd_platform_probe(struct platform_device *dev, regmap_config->cache_type = REGCACHE_NONE; mfd->regmap[index] = devm_regmap_init_mmio(>dev, mfd->regs[index], regmap_config); - WARN_ON(!mfd->regmap[index]); + WARN_ON(IS_ERR(mfd->regmap[index])); return 0; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mfd: sec: fix sparse NULL pointer warning
From: Wei Yongjun Fixes the following sparse warning: drivers/mfd/sec-core.c:202:16: warning: Using plain integer as NULL pointer Signed-off-by: Wei Yongjun --- drivers/mfd/sec-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 3a20b47..87fa1e6 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -199,7 +199,7 @@ static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata( static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata( struct device *dev) { - return 0; + return NULL; } #endif -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mfd: sec: fix sparse NULL pointer warning
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fixes the following sparse warning: drivers/mfd/sec-core.c:202:16: warning: Using plain integer as NULL pointer Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/mfd/sec-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 3a20b47..87fa1e6 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -199,7 +199,7 @@ static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata( static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata( struct device *dev) { - return 0; + return NULL; } #endif -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mfd: sta2x11-mfd: fix return value check in sta2x11_mfd_platform_probe()
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function devm_regmap_init_mmio() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/mfd/sta2x11-mfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/sta2x11-mfd.c b/drivers/mfd/sta2x11-mfd.c index 53ab686..0d42e40 100644 --- a/drivers/mfd/sta2x11-mfd.c +++ b/drivers/mfd/sta2x11-mfd.c @@ -339,7 +339,7 @@ static int sta2x11_mfd_platform_probe(struct platform_device *dev, regmap_config-cache_type = REGCACHE_NONE; mfd-regmap[index] = devm_regmap_init_mmio(dev-dev, mfd-regs[index], regmap_config); - WARN_ON(!mfd-regmap[index]); + WARN_ON(IS_ERR(mfd-regmap[index])); return 0; } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] sysfs, kernfs: remove duplicated include from file.c
From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove duplicated include. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- fs/kernfs/file.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c index 990c97f..4a5863b 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c @@ -13,7 +13,6 @@ #include linux/slab.h #include linux/poll.h #include linux/pagemap.h -#include linux/poll.h #include linux/sched.h #include kernfs-internal.h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] platform/chrome: unregister platform driver/device when module exit
From: Wei Yongjun We have registered platform driver and device when module init, and need unregister them when module exit. Signed-off-by: Wei Yongjun --- drivers/platform/chrome/chromeos_laptop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c index 446ef0f..7f3aad0 100644 --- a/drivers/platform/chrome/chromeos_laptop.c +++ b/drivers/platform/chrome/chromeos_laptop.c @@ -511,6 +511,9 @@ static void __exit chromeos_laptop_exit(void) i2c_unregister_device(tp); if (ts) i2c_unregister_device(ts); + + platform_device_unregister(cros_platform_device); + platform_driver_unregister(_platform_driver); } module_init(chromeos_laptop_init); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] staging: rts5208: fix error return code in rtsx_probe()
From: Wei Yongjun Fix to return -ENOMEM instead of 0 when the memory alloc fail in probe error handling path. Signed-off-by: Wei Yongjun --- drivers/staging/rts5208/rtsx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 7882f57..8586ac5 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -896,8 +896,10 @@ static int rtsx_probe(struct pci_dev *pci, memset(dev, 0, sizeof(struct rtsx_dev)); dev->chip = kzalloc(sizeof(struct rtsx_chip), GFP_KERNEL); - if (dev->chip == NULL) + if (dev->chip == NULL) { + err = -ENOMEM; goto errout; + } spin_lock_init(>reg_lock); mutex_init(&(dev->dev_mutex)); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] staging: rts5208: fix error return code in rtsx_probe()
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENOMEM instead of 0 when the memory alloc fail in probe error handling path. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/staging/rts5208/rtsx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 7882f57..8586ac5 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -896,8 +896,10 @@ static int rtsx_probe(struct pci_dev *pci, memset(dev, 0, sizeof(struct rtsx_dev)); dev-chip = kzalloc(sizeof(struct rtsx_chip), GFP_KERNEL); - if (dev-chip == NULL) + if (dev-chip == NULL) { + err = -ENOMEM; goto errout; + } spin_lock_init(dev-reg_lock); mutex_init((dev-dev_mutex)); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] platform/chrome: unregister platform driver/device when module exit
From: Wei Yongjun yongjun_...@trendmicro.com.cn We have registered platform driver and device when module init, and need unregister them when module exit. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/platform/chrome/chromeos_laptop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c index 446ef0f..7f3aad0 100644 --- a/drivers/platform/chrome/chromeos_laptop.c +++ b/drivers/platform/chrome/chromeos_laptop.c @@ -511,6 +511,9 @@ static void __exit chromeos_laptop_exit(void) i2c_unregister_device(tp); if (ts) i2c_unregister_device(ts); + + platform_device_unregister(cros_platform_device); + platform_driver_unregister(cros_platform_driver); } module_init(chromeos_laptop_init); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] dma: k3dma: add missing clk_disable_unprepare() on error in k3_dma_probe()
From: Wei Yongjun Add the missing clk_disable_unprepare() before return from k3_dma_probe() in the error handling case. Signed-off-by: Wei Yongjun --- drivers/dma/k3dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index a2c330f..892704f 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -750,7 +750,7 @@ static int k3_dma_probe(struct platform_device *op) ret = dma_async_device_register(>slave); if (ret) - return ret; + goto dma_async_register_fail; ret = of_dma_controller_register((>dev)->of_node, k3_of_dma_simple_xlate, d); @@ -767,6 +767,8 @@ static int k3_dma_probe(struct platform_device *op) of_dma_register_fail: dma_async_device_unregister(>slave); +dma_async_register_fail: + clk_disable_unprepare(d->clk); return ret; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] dma: k3dma: add missing clk_disable_unprepare() on error in k3_dma_probe()
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing clk_disable_unprepare() before return from k3_dma_probe() in the error handling case. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/dma/k3dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index a2c330f..892704f 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -750,7 +750,7 @@ static int k3_dma_probe(struct platform_device *op) ret = dma_async_device_register(d-slave); if (ret) - return ret; + goto dma_async_register_fail; ret = of_dma_controller_register((op-dev)-of_node, k3_of_dma_simple_xlate, d); @@ -767,6 +767,8 @@ static int k3_dma_probe(struct platform_device *op) of_dma_register_fail: dma_async_device_unregister(d-slave); +dma_async_register_fail: + clk_disable_unprepare(d-clk); return ret; } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] drivers: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
On 11/11/2013 04:38 PM, Duan Jiong wrote: > 于 2013å¹´11月11æ—¥ 15:43, Wei Yongjun 写é“: >> On 11/01/2013 06:09 PM, Duan Jiong wrote: >>> This patch fixes coccinelle error regarding usage of IS_ERR and >>> PTR_ERR instead of PTR_ERR_OR_ZERO. >>> >>> Signed-off-by: Duan Jiong >>> --- >>> drivers/misc/carma/carma-fpga.c | 5 + >>> 1 file changed, 1 insertion(+), 4 deletions(-) >>> >>> diff --git a/drivers/misc/carma/carma-fpga.c >>> b/drivers/misc/carma/carma-fpga.c >>> index 08b18f3..9a32e98 100644 >>> --- a/drivers/misc/carma/carma-fpga.c >>> +++ b/drivers/misc/carma/carma-fpga.c >>> @@ -956,10 +956,7 @@ static int data_debugfs_init(struct fpga_device *priv) >>> { >>> priv->dbg_entry = debugfs_create_file(drv_name, S_IRUGO, NULL, priv, >>> _debug_fops); >>> - if (IS_ERR(priv->dbg_entry)) >>> - return PTR_ERR(priv->dbg_entry); >>> - >>> - return 0; >>> + return PTR_ERR_OR_ZERO(priv->dbg_entry); >>> } >> Those code has make sure that CONFIG_DEBUG_FS is enabled, so >> debugfs_create_file() never return PTR_ERR(), only NULL will >> be returned when error occurs. >> >> > You can see the definition about PTR_ERR_OR_ZERO in include/linux/err.h, > it is merely used to simplify the code. I means that the orig code has bug. You should fix the bug, not only do some cleanup like this. Also, the module name should be 'carma-fpga', not 'drivers'. You should send something like this: [PATCH] carma-fpga: fix the return value check in data_debugfs_init() In case of error, the function debugfs_create_file() returns NULL pointer not ERR_PTR() if CONFIG_DEBUG_FS is enabled. The IS_ERR() test in the return value check should be replaced with NULL test. ... - if (IS_ERR(priv->dbg_entry)) - return PTR_ERR(priv->dbg_entry); + if (!priv->dbg_entry) + return -ENOMEM; ... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] drivers: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
On 11/11/2013 04:38 PM, Duan Jiong wrote: 于 2013å¹´11月11æ—¥ 15:43, Wei Yongjun 写é“: On 11/01/2013 06:09 PM, Duan Jiong wrote: This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong duanj.f...@cn.fujitsu.com --- drivers/misc/carma/carma-fpga.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c index 08b18f3..9a32e98 100644 --- a/drivers/misc/carma/carma-fpga.c +++ b/drivers/misc/carma/carma-fpga.c @@ -956,10 +956,7 @@ static int data_debugfs_init(struct fpga_device *priv) { priv-dbg_entry = debugfs_create_file(drv_name, S_IRUGO, NULL, priv, data_debug_fops); - if (IS_ERR(priv-dbg_entry)) - return PTR_ERR(priv-dbg_entry); - - return 0; + return PTR_ERR_OR_ZERO(priv-dbg_entry); } Those code has make sure that CONFIG_DEBUG_FS is enabled, so debugfs_create_file() never return PTR_ERR(), only NULL will be returned when error occurs. You can see the definition about PTR_ERR_OR_ZERO in include/linux/err.h, it is merely used to simplify the code. I means that the orig code has bug. You should fix the bug, not only do some cleanup like this. Also, the module name should be 'carma-fpga', not 'drivers'. You should send something like this: [PATCH] carma-fpga: fix the return value check in data_debugfs_init() In case of error, the function debugfs_create_file() returns NULL pointer not ERR_PTR() if CONFIG_DEBUG_FS is enabled. The IS_ERR() test in the return value check should be replaced with NULL test. ... - if (IS_ERR(priv-dbg_entry)) - return PTR_ERR(priv-dbg_entry); + if (!priv-dbg_entry) + return -ENOMEM; ... -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] drivers: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
On 11/01/2013 06:09 PM, Duan Jiong wrote: > This patch fixes coccinelle error regarding usage of IS_ERR and > PTR_ERR instead of PTR_ERR_OR_ZERO. > > Signed-off-by: Duan Jiong > --- > drivers/misc/carma/carma-fpga.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c > index 08b18f3..9a32e98 100644 > --- a/drivers/misc/carma/carma-fpga.c > +++ b/drivers/misc/carma/carma-fpga.c > @@ -956,10 +956,7 @@ static int data_debugfs_init(struct fpga_device *priv) > { > priv->dbg_entry = debugfs_create_file(drv_name, S_IRUGO, NULL, priv, > _debug_fops); > - if (IS_ERR(priv->dbg_entry)) > - return PTR_ERR(priv->dbg_entry); > - > - return 0; > + return PTR_ERR_OR_ZERO(priv->dbg_entry); > } Those code has make sure that CONFIG_DEBUG_FS is enabled, so debugfs_create_file() never return PTR_ERR(), only NULL will be returned when error occurs. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] MIPS: Alchemy: add missing platform_set_drvdata() in au1550nd_probe()
From: Wei Yongjun Add missing platform_set_drvdata() in au1550nd_probe(), otherwise calling platform_get_drvdata() in remove returns NULL. Signed-off-by: Wei Yongjun --- drivers/mtd/nand/au1550nd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c index ae8dd7c..909b673 100644 --- a/drivers/mtd/nand/au1550nd.c +++ b/drivers/mtd/nand/au1550nd.c @@ -480,6 +480,8 @@ static int au1550nd_probe(struct platform_device *pdev) mtd_device_register(>info, pd->parts, pd->num_parts); + platform_set_drvdata(pdev, ctx); + return 0; out3: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] MIPS: Alchemy: add missing platform_set_drvdata() in au1550nd_probe()
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add missing platform_set_drvdata() in au1550nd_probe(), otherwise calling platform_get_drvdata() in remove returns NULL. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/mtd/nand/au1550nd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c index ae8dd7c..909b673 100644 --- a/drivers/mtd/nand/au1550nd.c +++ b/drivers/mtd/nand/au1550nd.c @@ -480,6 +480,8 @@ static int au1550nd_probe(struct platform_device *pdev) mtd_device_register(ctx-info, pd-parts, pd-num_parts); + platform_set_drvdata(pdev, ctx); + return 0; out3: -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] drivers: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
On 11/01/2013 06:09 PM, Duan Jiong wrote: This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong duanj.f...@cn.fujitsu.com --- drivers/misc/carma/carma-fpga.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c index 08b18f3..9a32e98 100644 --- a/drivers/misc/carma/carma-fpga.c +++ b/drivers/misc/carma/carma-fpga.c @@ -956,10 +956,7 @@ static int data_debugfs_init(struct fpga_device *priv) { priv-dbg_entry = debugfs_create_file(drv_name, S_IRUGO, NULL, priv, data_debug_fops); - if (IS_ERR(priv-dbg_entry)) - return PTR_ERR(priv-dbg_entry); - - return 0; + return PTR_ERR_OR_ZERO(priv-dbg_entry); } Those code has make sure that CONFIG_DEBUG_FS is enabled, so debugfs_create_file() never return PTR_ERR(), only NULL will be returned when error occurs. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] ASoC: fsl: set correct platform drvdata in pcm030_fabric_probe()
From: Wei Yongjun platform_set_drvdata(op, pdata) in pcm030_fabric_probe() will be overwrited when calling snd_soc_register_card(card), but cm030_fabric_remove() use drvdata as a type of struct pcm030_audio_data, so we should move platform_set_drvdata() below snd_soc_register_card() call. Signed-off-by: Wei Yongjun --- sound/soc/fsl/pcm030-audio-fabric.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c index eb43738..3665f61 100644 --- a/sound/soc/fsl/pcm030-audio-fabric.c +++ b/sound/soc/fsl/pcm030-audio-fabric.c @@ -69,7 +69,6 @@ static int pcm030_fabric_probe(struct platform_device *op) return -ENOMEM; card->dev = >dev; - platform_set_drvdata(op, pdata); pdata->card = card; @@ -98,6 +97,8 @@ static int pcm030_fabric_probe(struct platform_device *op) if (ret) dev_err(>dev, "snd_soc_register_card() failed: %d\n", ret); + platform_set_drvdata(op, pdata); + return ret; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] ASoC: fsl: set correct platform drvdata in pcm030_fabric_probe()
From: Wei Yongjun yongjun_...@trendmicro.com.cn platform_set_drvdata(op, pdata) in pcm030_fabric_probe() will be overwrited when calling snd_soc_register_card(card), but cm030_fabric_remove() use drvdata as a type of struct pcm030_audio_data, so we should move platform_set_drvdata() below snd_soc_register_card() call. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- sound/soc/fsl/pcm030-audio-fabric.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c index eb43738..3665f61 100644 --- a/sound/soc/fsl/pcm030-audio-fabric.c +++ b/sound/soc/fsl/pcm030-audio-fabric.c @@ -69,7 +69,6 @@ static int pcm030_fabric_probe(struct platform_device *op) return -ENOMEM; card-dev = op-dev; - platform_set_drvdata(op, pdata); pdata-card = card; @@ -98,6 +97,8 @@ static int pcm030_fabric_probe(struct platform_device *op) if (ret) dev_err(op-dev, snd_soc_register_card() failed: %d\n, ret); + platform_set_drvdata(op, pdata); + return ret; } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mtd: nand: omap: fix error return code in omap_nand_probe()
From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/mtd/nand/omap2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index ec40b8d..f777250 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1953,7 +1953,8 @@ static int omap_nand_probe(struct platform_device *pdev) nand_chip->ecc.read_page= omap_read_page_bch; nand_chip->ecc.write_page = omap_write_page_bch; /* This ECC scheme requires ELM H/W block */ - if (is_elm_present(info, pdata->elm_of_node, BCH8_ECC) < 0) { + err = is_elm_present(info, pdata->elm_of_node, BCH8_ECC); + if (err < 0) { pr_err("nand: error: could not initialize ELM\n"); goto return_error; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] clk: keystone: fix return value check in _of_pll_clk_init()
From: Wei Yongjun clk_register_pll() returns ERR_PTR() when memory alloc fail and NULL in the other case, the user of this function should used IS_ERR_OR_NULL() to check the return value. this patch change clk_register_pll() to return only ERR_PTR(), and also fixed the user. Signed-off-by: Wei Yongjun --- drivers/clk/keystone/pll.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/clk/keystone/pll.c b/drivers/clk/keystone/pll.c index 47a1bd9..78a6e0e 100644 --- a/drivers/clk/keystone/pll.c +++ b/drivers/clk/keystone/pll.c @@ -127,12 +127,9 @@ static struct clk *clk_register_pll(struct device *dev, clk = clk_register(NULL, >hw); if (IS_ERR(clk)) - goto out; + kfree(pll); return clk; -out: - kfree(pll); - return NULL; } /** @@ -182,7 +179,7 @@ static void __init _of_pll_clk_init(struct device_node *node, bool pllctrl) } clk = clk_register_pll(NULL, node->name, parent_name, pll_data); - if (clk) { + if (!IS_ERR(clk)) { of_clk_add_provider(node, of_clk_src_simple_get, clk); return; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] pinctrl: imx1: fix return value check in imx1_pinctrl_core_probe()
From: Wei Yongjun In case of error, the function devm_ioremap_nocache() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun --- drivers/pinctrl/pinctrl-imx1-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-imx1-core.c b/drivers/pinctrl/pinctrl-imx1-core.c index 4d5a9e7..f77914a 100644 --- a/drivers/pinctrl/pinctrl-imx1-core.c +++ b/drivers/pinctrl/pinctrl-imx1-core.c @@ -615,8 +615,8 @@ int imx1_pinctrl_core_probe(struct platform_device *pdev, ipctl->base = devm_ioremap_nocache(>dev, res->start, resource_size(res)); - if (IS_ERR(ipctl->base)) - return PTR_ERR(ipctl->base); + if (!ipctl->base) + return -ENOMEM; pctl_desc = _pinctrl_desc; pctl_desc->name = dev_name(>dev); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] pinctrl: imx1: fix return value check in imx1_pinctrl_core_probe()
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function devm_ioremap_nocache() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/pinctrl/pinctrl-imx1-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-imx1-core.c b/drivers/pinctrl/pinctrl-imx1-core.c index 4d5a9e7..f77914a 100644 --- a/drivers/pinctrl/pinctrl-imx1-core.c +++ b/drivers/pinctrl/pinctrl-imx1-core.c @@ -615,8 +615,8 @@ int imx1_pinctrl_core_probe(struct platform_device *pdev, ipctl-base = devm_ioremap_nocache(pdev-dev, res-start, resource_size(res)); - if (IS_ERR(ipctl-base)) - return PTR_ERR(ipctl-base); + if (!ipctl-base) + return -ENOMEM; pctl_desc = imx1_pinctrl_desc; pctl_desc-name = dev_name(pdev-dev); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] clk: keystone: fix return value check in _of_pll_clk_init()
From: Wei Yongjun yongjun_...@trendmicro.com.cn clk_register_pll() returns ERR_PTR() when memory alloc fail and NULL in the other case, the user of this function should used IS_ERR_OR_NULL() to check the return value. this patch change clk_register_pll() to return only ERR_PTR(), and also fixed the user. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/clk/keystone/pll.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/clk/keystone/pll.c b/drivers/clk/keystone/pll.c index 47a1bd9..78a6e0e 100644 --- a/drivers/clk/keystone/pll.c +++ b/drivers/clk/keystone/pll.c @@ -127,12 +127,9 @@ static struct clk *clk_register_pll(struct device *dev, clk = clk_register(NULL, pll-hw); if (IS_ERR(clk)) - goto out; + kfree(pll); return clk; -out: - kfree(pll); - return NULL; } /** @@ -182,7 +179,7 @@ static void __init _of_pll_clk_init(struct device_node *node, bool pllctrl) } clk = clk_register_pll(NULL, node-name, parent_name, pll_data); - if (clk) { + if (!IS_ERR(clk)) { of_clk_add_provider(node, of_clk_src_simple_get, clk); return; } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mtd: nand: omap: fix error return code in omap_nand_probe()
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/mtd/nand/omap2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index ec40b8d..f777250 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1953,7 +1953,8 @@ static int omap_nand_probe(struct platform_device *pdev) nand_chip-ecc.read_page= omap_read_page_bch; nand_chip-ecc.write_page = omap_write_page_bch; /* This ECC scheme requires ELM H/W block */ - if (is_elm_present(info, pdata-elm_of_node, BCH8_ECC) 0) { + err = is_elm_present(info, pdata-elm_of_node, BCH8_ECC); + if (err 0) { pr_err(nand: error: could not initialize ELM\n); goto return_error; } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] ARM i.MX53: remove duplicated include from clk-imx51-imx53.c
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- arch/arm/mach-imx/clk-imx51-imx53.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index ce37af2..2828ea65 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] ARM: ixp4xx: remove duplicated include from dsmg600-setup.c
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- arch/arm/mach-ixp4xx/dsmg600-setup.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c index 736dc69..7740e13 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-setup.c +++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c @@ -26,7 +26,6 @@ #include #include #include -#include #include -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] mtd: remove duplicated include from mtdcore.c
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- drivers/mtd/mtdcore.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 7189089..92311a5 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] tifm: fix error return code in tifm_7xx1_probe()
From: Wei Yongjun Fix to return ENODEV in the pci ioremap error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/misc/tifm_7xx1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c index ae282a1..a606c89 100644 --- a/drivers/misc/tifm_7xx1.c +++ b/drivers/misc/tifm_7xx1.c @@ -356,8 +356,10 @@ static int tifm_7xx1_probe(struct pci_dev *dev, pci_set_drvdata(dev, fm); fm->addr = pci_ioremap_bar(dev, 0); - if (!fm->addr) + if (!fm->addr) { + rc = -ENODEV; goto err_out_free; + } rc = request_irq(dev->irq, tifm_7xx1_isr, IRQF_SHARED, DRIVER_NAME, fm); if (rc) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -next] skd: fix error return code in skd_pci_probe()
From: Wei Yongjun Fix to return -ENOMEM in the skd construct error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/block/skd_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index ab17bff..1a8717f 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c @@ -5321,8 +5321,10 @@ static int skd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } skdev = skd_construct(pdev); - if (skdev == NULL) + if (skdev == NULL) { + rc = -ENOMEM; goto err_out_regions; + } skd_pci_info(skdev, pci_str); pr_info("(%s): %s 64bit\n", skd_name(skdev), pci_str); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/