[PATCH] ASoC: core: replace PTR_RET with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
PTR_RET is deprecated. Do not recommend its usage anymore.
Use PTR_ERR_OR_ZERO instead.

Signed-off-by: Duan Jiong 
---
 sound/soc/soc-core.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 051c006..bb7382e 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2153,28 +2153,28 @@ static int snd_soc_ac97_parse_pinctl(struct device *dev,
p = devm_pinctrl_get(dev);
if (IS_ERR(p)) {
dev_err(dev, "Failed to get pinctrl\n");
-   return PTR_RET(p);
+   return PTR_ERR_OR_ZERO(p);
}
cfg->pctl = p;
 
state = pinctrl_lookup_state(p, "ac97-reset");
if (IS_ERR(state)) {
dev_err(dev, "Can't find pinctrl state ac97-reset\n");
-   return PTR_RET(state);
+   return PTR_ERR_OR_ZERO(state);
}
cfg->pstate_reset = state;
 
state = pinctrl_lookup_state(p, "ac97-warm-reset");
if (IS_ERR(state)) {
dev_err(dev, "Can't find pinctrl state ac97-warm-reset\n");
-   return PTR_RET(state);
+   return PTR_ERR_OR_ZERO(state);
}
cfg->pstate_warm_reset = state;
 
state = pinctrl_lookup_state(p, "ac97-running");
if (IS_ERR(state)) {
dev_err(dev, "Can't find pinctrl state ac97-running\n");
-   return PTR_RET(state);
+   return PTR_ERR_OR_ZERO(state);
}
cfg->pstate_run = state;
 
-- 
1.8.3.1

--
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] x86, cpuid: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 arch/x86/kernel/cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index 3225ae6c..83741a7 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -143,7 +143,7 @@ static int cpuid_device_create(int cpu)
 
dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu), NULL,
"cpu%d", cpu);
-   return IS_ERR(dev) ? PTR_ERR(dev) : 0;
+   return PTR_ERR_OR_ZERO(dev);
 }
 
 static void cpuid_device_destroy(int cpu)
-- 
1.8.3.1

--
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] x86, msr: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 arch/x86/kernel/msr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index c9603ac..6e4f77f 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -206,7 +206,7 @@ static int msr_device_create(int cpu)
 
dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, cpu), NULL,
"msr%d", cpu);
-   return IS_ERR(dev) ? PTR_ERR(dev) : 0;
+   return PTR_ERR_OR_ZERO(dev);
 }
 
 static void msr_device_destroy(int cpu)
-- 
1.8.3.1

--
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] serial: imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 arch/arm/mach-imx/mach-mx31moboard.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/mach-mx31moboard.c 
b/arch/arm/mach-imx/mach-mx31moboard.c
index 8f45afe..c05d711 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -434,10 +434,7 @@ static int __init moboard_usbh2_init(void)
return -ENODEV;
 
pdev = imx31_add_mxc_ehci_hs(2, _pdata);
-   if (IS_ERR(pdev))
-   return PTR_ERR(pdev);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(pdev);
 }
 
 static const struct gpio_led mx31moboard_leds[] __initconst = {
-- 
1.8.3.1

--
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] rbd: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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/block/rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 4c95b50..552a2ed 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -4752,7 +4752,7 @@ static int rbd_dev_image_id(struct rbd_device *rbd_dev)
 
image_id = ceph_extract_encoded_string(, p + ret,
NULL, GFP_NOIO);
-   ret = IS_ERR(image_id) ? PTR_ERR(image_id) : 0;
+   ret = PTR_ERR_OR_ZERO(image_id);
if (!ret)
rbd_dev->image_format = 2;
} else {
-- 
1.8.3.1

--
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] PHY: sunxi: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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/phy/phy-sun4i-usb.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index e6e6c4b..f7bffe2 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -302,10 +302,7 @@ static int sun4i_usb_phy_probe(struct platform_device 
*pdev)
 
dev_set_drvdata(dev, data);
phy_provider = devm_of_phy_provider_register(dev, sun4i_usb_phy_xlate);
-   if (IS_ERR(phy_provider))
-   return PTR_ERR(phy_provider);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(phy_provider);
 }
 
 static const struct of_device_id sun4i_usb_phy_of_match[] = {
-- 
1.8.3.1

--
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] phy: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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/phy/phy-exynos-mipi-video.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/phy/phy-exynos-mipi-video.c 
b/drivers/phy/phy-exynos-mipi-video.c
index 7f13932..6277ea2 100644
--- a/drivers/phy/phy-exynos-mipi-video.c
+++ b/drivers/phy/phy-exynos-mipi-video.c
@@ -149,10 +149,7 @@ static int exynos_mipi_video_phy_probe(struct 
platform_device *pdev)
 
phy_provider = devm_of_phy_provider_register(dev,
exynos_mipi_video_phy_xlate);
-   if (IS_ERR(phy_provider))
-   return PTR_ERR(phy_provider);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(phy_provider);
 }
 
 static const struct of_device_id exynos_mipi_video_phy_of_match[] = {
-- 
1.8.3.1

--
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] drivers/misc: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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 14d90ea..55e913b 100644
--- a/drivers/misc/carma/carma-fpga.c
+++ b/drivers/misc/carma/carma-fpga.c
@@ -954,10 +954,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);
 }
 
 static void data_debugfs_exit(struct fpga_device *priv)
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 block/blk-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index a0e3096..2cf62fc 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1654,7 +1654,7 @@ static int __init fail_make_request_debugfs(void)
struct dentry *dir = fault_create_debugfs_attr("fail_make_request",
NULL, _make_request);
 
-   return IS_ERR(dir) ? PTR_ERR(dir) : 0;
+   return PTR_ERR_OR_ZERO(dir);
 }
 
 late_initcall(fail_make_request_debugfs);
-- 
1.8.3.1

--
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] ARM: imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 arch/arm/mach-imx/mx31moboard-smartbot.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c 
b/arch/arm/mach-imx/mx31moboard-smartbot.c
index 04ae45d..af6550e 100644
--- a/arch/arm/mach-imx/mx31moboard-smartbot.c
+++ b/arch/arm/mach-imx/mx31moboard-smartbot.c
@@ -141,10 +141,7 @@ static int __init smartbot_otg_host_init(void)
return -ENODEV;
 
pdev = imx31_add_mxc_ehci_otg(_host_pdata);
-   if (IS_ERR(pdev))
-   return PTR_ERR(pdev);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(pdev);
 }
 #else
 static inline int smartbot_otg_host_init(void) { return 0; }
-- 
1.8.3.1

--
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] ARM: imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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
---
 arch/arm/mach-imx/mx31moboard-smartbot.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c 
b/arch/arm/mach-imx/mx31moboard-smartbot.c
index 04ae45d..af6550e 100644
--- a/arch/arm/mach-imx/mx31moboard-smartbot.c
+++ b/arch/arm/mach-imx/mx31moboard-smartbot.c
@@ -141,10 +141,7 @@ static int __init smartbot_otg_host_init(void)
return -ENODEV;
 
pdev = imx31_add_mxc_ehci_otg(otg_host_pdata);
-   if (IS_ERR(pdev))
-   return PTR_ERR(pdev);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(pdev);
 }
 #else
 static inline int smartbot_otg_host_init(void) { return 0; }
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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
---
 block/blk-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index a0e3096..2cf62fc 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1654,7 +1654,7 @@ static int __init fail_make_request_debugfs(void)
struct dentry *dir = fault_create_debugfs_attr(fail_make_request,
NULL, fail_make_request);
 
-   return IS_ERR(dir) ? PTR_ERR(dir) : 0;
+   return PTR_ERR_OR_ZERO(dir);
 }
 
 late_initcall(fail_make_request_debugfs);
-- 
1.8.3.1

--
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] drivers/misc: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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 14d90ea..55e913b 100644
--- a/drivers/misc/carma/carma-fpga.c
+++ b/drivers/misc/carma/carma-fpga.c
@@ -954,10 +954,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);
 }
 
 static void data_debugfs_exit(struct fpga_device *priv)
-- 
1.8.3.1

--
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] phy: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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/phy/phy-exynos-mipi-video.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/phy/phy-exynos-mipi-video.c 
b/drivers/phy/phy-exynos-mipi-video.c
index 7f13932..6277ea2 100644
--- a/drivers/phy/phy-exynos-mipi-video.c
+++ b/drivers/phy/phy-exynos-mipi-video.c
@@ -149,10 +149,7 @@ static int exynos_mipi_video_phy_probe(struct 
platform_device *pdev)
 
phy_provider = devm_of_phy_provider_register(dev,
exynos_mipi_video_phy_xlate);
-   if (IS_ERR(phy_provider))
-   return PTR_ERR(phy_provider);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(phy_provider);
 }
 
 static const struct of_device_id exynos_mipi_video_phy_of_match[] = {
-- 
1.8.3.1

--
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] rbd: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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/block/rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 4c95b50..552a2ed 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -4752,7 +4752,7 @@ static int rbd_dev_image_id(struct rbd_device *rbd_dev)
 
image_id = ceph_extract_encoded_string(p, p + ret,
NULL, GFP_NOIO);
-   ret = IS_ERR(image_id) ? PTR_ERR(image_id) : 0;
+   ret = PTR_ERR_OR_ZERO(image_id);
if (!ret)
rbd_dev-image_format = 2;
} else {
-- 
1.8.3.1

--
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] PHY: sunxi: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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/phy/phy-sun4i-usb.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index e6e6c4b..f7bffe2 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -302,10 +302,7 @@ static int sun4i_usb_phy_probe(struct platform_device 
*pdev)
 
dev_set_drvdata(dev, data);
phy_provider = devm_of_phy_provider_register(dev, sun4i_usb_phy_xlate);
-   if (IS_ERR(phy_provider))
-   return PTR_ERR(phy_provider);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(phy_provider);
 }
 
 static const struct of_device_id sun4i_usb_phy_of_match[] = {
-- 
1.8.3.1

--
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] serial: imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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
---
 arch/arm/mach-imx/mach-mx31moboard.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/mach-mx31moboard.c 
b/arch/arm/mach-imx/mach-mx31moboard.c
index 8f45afe..c05d711 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -434,10 +434,7 @@ static int __init moboard_usbh2_init(void)
return -ENODEV;
 
pdev = imx31_add_mxc_ehci_hs(2, usbh2_pdata);
-   if (IS_ERR(pdev))
-   return PTR_ERR(pdev);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(pdev);
 }
 
 static const struct gpio_led mx31moboard_leds[] __initconst = {
-- 
1.8.3.1

--
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] x86, msr: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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
---
 arch/x86/kernel/msr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index c9603ac..6e4f77f 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -206,7 +206,7 @@ static int msr_device_create(int cpu)
 
dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, cpu), NULL,
msr%d, cpu);
-   return IS_ERR(dev) ? PTR_ERR(dev) : 0;
+   return PTR_ERR_OR_ZERO(dev);
 }
 
 static void msr_device_destroy(int cpu)
-- 
1.8.3.1

--
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] x86, cpuid: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
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
---
 arch/x86/kernel/cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index 3225ae6c..83741a7 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -143,7 +143,7 @@ static int cpuid_device_create(int cpu)
 
dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu), NULL,
cpu%d, cpu);
-   return IS_ERR(dev) ? PTR_ERR(dev) : 0;
+   return PTR_ERR_OR_ZERO(dev);
 }
 
 static void cpuid_device_destroy(int cpu)
-- 
1.8.3.1

--
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: core: replace PTR_RET with PTR_ERR_OR_ZERO

2014-04-11 Thread Duan Jiong
PTR_RET is deprecated. Do not recommend its usage anymore.
Use PTR_ERR_OR_ZERO instead.

Signed-off-by: Duan Jiong duanj.f...@cn.fujitsu.com
---
 sound/soc/soc-core.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 051c006..bb7382e 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2153,28 +2153,28 @@ static int snd_soc_ac97_parse_pinctl(struct device *dev,
p = devm_pinctrl_get(dev);
if (IS_ERR(p)) {
dev_err(dev, Failed to get pinctrl\n);
-   return PTR_RET(p);
+   return PTR_ERR_OR_ZERO(p);
}
cfg-pctl = p;
 
state = pinctrl_lookup_state(p, ac97-reset);
if (IS_ERR(state)) {
dev_err(dev, Can't find pinctrl state ac97-reset\n);
-   return PTR_RET(state);
+   return PTR_ERR_OR_ZERO(state);
}
cfg-pstate_reset = state;
 
state = pinctrl_lookup_state(p, ac97-warm-reset);
if (IS_ERR(state)) {
dev_err(dev, Can't find pinctrl state ac97-warm-reset\n);
-   return PTR_RET(state);
+   return PTR_ERR_OR_ZERO(state);
}
cfg-pstate_warm_reset = state;
 
state = pinctrl_lookup_state(p, ac97-running);
if (IS_ERR(state)) {
dev_err(dev, Can't find pinctrl state ac97-running\n);
-   return PTR_RET(state);
+   return PTR_ERR_OR_ZERO(state);
}
cfg-pstate_run = state;
 
-- 
1.8.3.1

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

2013-11-11 Thread Duan Jiong
于 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.

Thanks,
  Duan

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

2013-11-11 Thread Duan Jiong
于 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.

Thanks,
  Duan

--
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] drm/tegra: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
于 2013年11月07日 00:49, Stephen Warren 写道:
> On 11/06/2013 12:53 AM, Duan Jiong wrote:
>> This patch fixes coccinelle error regarding usage of IS_ERR and
>> PTR_ERR instead of PTR_ERR_OR_ZERO.
> 
>> diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
> 
>> @@ -199,10 +199,7 @@ int tegra_bo_dumb_create(struct drm_file *file, struct 
>> drm_device *drm,
>>  
>>  bo = tegra_bo_create_with_handle(file, drm, args->size, 0,
>>   >handle);
>> -if (IS_ERR(bo))
>> -return PTR_ERR(bo);
>> -
>> -return 0;
>> +return PTR_ERR_OR_ZERO(bo);
>>  }
> 
> I suppose that's fine, although I wonder if it'll cause churn should we
> ever need to add code to the tail end of the function.
> 
> BTW, why were all the similar patches that had nothing to do with Tegra
> sent to the linux-tegra@ mailing list? You also didn't CC the
> maintainers of drivers/gpu/drm/tegra/ on this patch. Plus this patch has
> nothing to do with the rtc-linux@ mailing list.

I'm sorry for that. i just get the maintainers and the mail lists by the script
get_maintainer.pl.

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

--
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] net:drivers/net: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
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/net/ethernet/i825xx/82596.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/i825xx/82596.c 
b/drivers/net/ethernet/i825xx/82596.c
index a15877a..7ce6379 100644
--- a/drivers/net/ethernet/i825xx/82596.c
+++ b/drivers/net/ethernet/i825xx/82596.c
@@ -1527,9 +1527,7 @@ int __init init_module(void)
if (debug >= 0)
i596_debug = debug;
dev_82596 = i82596_probe(-1);
-   if (IS_ERR(dev_82596))
-   return PTR_ERR(dev_82596);
-   return 0;
+   return PTR_ERR_OR_ZERO(dev_82596);
 }
 
 void __exit cleanup_module(void)
-- 
1.8.3.1

--
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] smsc: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
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/net/ethernet/smsc/smc9194.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/smsc/smc9194.c 
b/drivers/net/ethernet/smsc/smc9194.c
index 6f3491f..67d9fde 100644
--- a/drivers/net/ethernet/smsc/smc9194.c
+++ b/drivers/net/ethernet/smsc/smc9194.c
@@ -1545,9 +1545,7 @@ int __init init_module(void)
 
/* copy the parameters from insmod into the device structure */
devSMC9194 = smc_init(-1);
-   if (IS_ERR(devSMC9194))
-   return PTR_ERR(devSMC9194);
-   return 0;
+   return PTR_ERR_OR_ZERO(devSMC9194);
 }
 
 void __exit cleanup_module(void)
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 block/ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/ioctl.c b/block/ioctl.c
index a31d91d..7d5c3b2 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -64,7 +64,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct 
blkpg_ioctl_arg __user
part = add_partition(disk, partno, start, length,
 ADDPART_FLAG_NONE, NULL);
mutex_unlock(>bd_mutex);
-   return IS_ERR(part) ? PTR_ERR(part) : 0;
+   return PTR_ERR_OR_ZERO(part);
case BLKPG_DEL_PARTITION:
part = disk_get_part(disk, partno);
if (!part)
-- 
1.8.3.1

--
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] smsc: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
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/net/ethernet/smsc/smc9194.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/smsc/smc9194.c 
b/drivers/net/ethernet/smsc/smc9194.c
index 6f3491f..67d9fde 100644
--- a/drivers/net/ethernet/smsc/smc9194.c
+++ b/drivers/net/ethernet/smsc/smc9194.c
@@ -1545,9 +1545,7 @@ int __init init_module(void)
 
/* copy the parameters from insmod into the device structure */
devSMC9194 = smc_init(-1);
-   if (IS_ERR(devSMC9194))
-   return PTR_ERR(devSMC9194);
-   return 0;
+   return PTR_ERR_OR_ZERO(devSMC9194);
 }
 
 void __exit cleanup_module(void)
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
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
---
 block/ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/ioctl.c b/block/ioctl.c
index a31d91d..7d5c3b2 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -64,7 +64,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct 
blkpg_ioctl_arg __user
part = add_partition(disk, partno, start, length,
 ADDPART_FLAG_NONE, NULL);
mutex_unlock(bdev-bd_mutex);
-   return IS_ERR(part) ? PTR_ERR(part) : 0;
+   return PTR_ERR_OR_ZERO(part);
case BLKPG_DEL_PARTITION:
part = disk_get_part(disk, partno);
if (!part)
-- 
1.8.3.1

--
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] net:drivers/net: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
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/net/ethernet/i825xx/82596.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/i825xx/82596.c 
b/drivers/net/ethernet/i825xx/82596.c
index a15877a..7ce6379 100644
--- a/drivers/net/ethernet/i825xx/82596.c
+++ b/drivers/net/ethernet/i825xx/82596.c
@@ -1527,9 +1527,7 @@ int __init init_module(void)
if (debug = 0)
i596_debug = debug;
dev_82596 = i82596_probe(-1);
-   if (IS_ERR(dev_82596))
-   return PTR_ERR(dev_82596);
-   return 0;
+   return PTR_ERR_OR_ZERO(dev_82596);
 }
 
 void __exit cleanup_module(void)
-- 
1.8.3.1

--
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] drm/tegra: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
于 2013年11月07日 00:49, Stephen Warren 写道:
 On 11/06/2013 12:53 AM, Duan Jiong wrote:
 This patch fixes coccinelle error regarding usage of IS_ERR and
 PTR_ERR instead of PTR_ERR_OR_ZERO.
 
 diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
 
 @@ -199,10 +199,7 @@ int tegra_bo_dumb_create(struct drm_file *file, struct 
 drm_device *drm,
  
  bo = tegra_bo_create_with_handle(file, drm, args-size, 0,
   args-handle);
 -if (IS_ERR(bo))
 -return PTR_ERR(bo);
 -
 -return 0;
 +return PTR_ERR_OR_ZERO(bo);
  }
 
 I suppose that's fine, although I wonder if it'll cause churn should we
 ever need to add code to the tail end of the function.
 
 BTW, why were all the similar patches that had nothing to do with Tegra
 sent to the linux-tegra@ mailing list? You also didn't CC the
 maintainers of drivers/gpu/drm/tegra/ on this patch. Plus this patch has
 nothing to do with the rtc-linux@ mailing list.

I'm sorry for that. i just get the maintainers and the mail lists by the script
get_maintainer.pl.

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

--
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] lustre/fld: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/staging/lustre/lustre/fld/fld_request.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c 
b/drivers/staging/lustre/lustre/fld/fld_request.c
index e47fd50..3191a39 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -504,10 +504,7 @@ static int __init fld_mod_init(void)
fld_type_proc_dir = lprocfs_register(LUSTRE_FLD_NAME,
 proc_lustre_root,
 NULL, NULL);
-   if (IS_ERR(fld_type_proc_dir))
-   return PTR_ERR(fld_type_proc_dir);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(fld_type_proc_dir);
 }
 
 static void __exit fld_mod_exit(void)
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 block/blk-timeout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 4e9cfd1..cdf5711 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -32,7 +32,7 @@ static int __init fail_io_timeout_debugfs(void)
struct dentry *dir = fault_create_debugfs_attr("fail_io_timeout",
NULL, _io_timeout);
 
-   return IS_ERR(dir) ? PTR_ERR(dir) : 0;
+   return PTR_ERR_OR_ZERO(dir);
 }
 
 late_initcall(fail_io_timeout_debugfs);
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 block/ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/ioctl.c b/block/ioctl.c
index a31d91d..7d5c3b2 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -64,7 +64,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct 
blkpg_ioctl_arg __user
part = add_partition(disk, partno, start, length,
 ADDPART_FLAG_NONE, NULL);
mutex_unlock(>bd_mutex);
-   return IS_ERR(part) ? PTR_ERR(part) : 0;
+   return PTR_ERR_OR_ZERO(part);
case BLKPG_DEL_PARTITION:
part = disk_get_part(disk, partno);
if (!part)
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 block/blk-timeout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 4e9cfd1..cdf5711 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -32,7 +32,7 @@ static int __init fail_io_timeout_debugfs(void)
struct dentry *dir = fault_create_debugfs_attr("fail_io_timeout",
NULL, _io_timeout);
 
-   return IS_ERR(dir) ? PTR_ERR(dir) : 0;
+   return PTR_ERR_OR_ZERO(dir);
 }
 
 late_initcall(fail_io_timeout_debugfs);
-- 
1.8.3.1

--
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] leds: leds-mc13783: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 arch/arm/mach-imx/mach-mx31moboard.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/mach-mx31moboard.c 
b/arch/arm/mach-imx/mach-mx31moboard.c
index 6f424ec..118ea68 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -446,10 +446,7 @@ static int __init moboard_usbh2_init(void)
return -ENODEV;
 
pdev = imx31_add_mxc_ehci_hs(2, _pdata);
-   if (IS_ERR(pdev))
-   return PTR_ERR(pdev);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(pdev);
 }
 
 static const struct gpio_led mx31moboard_leds[] __initconst = {
-- 
1.8.3.1

--
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] libcrc32c: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 lib/libcrc32c.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/libcrc32c.c b/lib/libcrc32c.c
index 244f548..b3131f5 100644
--- a/lib/libcrc32c.c
+++ b/lib/libcrc32c.c
@@ -62,10 +62,7 @@ EXPORT_SYMBOL(crc32c);
 static int __init libcrc32c_mod_init(void)
 {
tfm = crypto_alloc_shash("crc32c", 0, 0);
-   if (IS_ERR(tfm))
-   return PTR_ERR(tfm);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(tfm);
 }
 
 static void __exit libcrc32c_mod_fini(void)
-- 
1.8.3.1

--
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] Input: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/input/touchscreen/cyttsp4_spi.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/input/touchscreen/cyttsp4_spi.c 
b/drivers/input/touchscreen/cyttsp4_spi.c
index a71e114..b19434c 100644
--- a/drivers/input/touchscreen/cyttsp4_spi.c
+++ b/drivers/input/touchscreen/cyttsp4_spi.c
@@ -171,10 +171,7 @@ static int cyttsp4_spi_probe(struct spi_device *spi)
ts = cyttsp4_probe(_spi_bus_ops, >dev, spi->irq,
  CY_SPI_DATA_BUF_SIZE);
 
-   if (IS_ERR(ts))
-   return PTR_ERR(ts);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(ts);
 }
 
 static int cyttsp4_spi_remove(struct spi_device *spi)
-- 
1.8.3.1

--
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] ethernet: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/net/ethernet/8390/apne.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/8390/apne.c b/drivers/net/ethernet/8390/apne.c
index 912ed7a..e41e3af 100644
--- a/drivers/net/ethernet/8390/apne.c
+++ b/drivers/net/ethernet/8390/apne.c
@@ -551,9 +551,7 @@ static struct net_device *apne_dev;
 static int __init apne_module_init(void)
 {
apne_dev = apne_probe(-1);
-   if (IS_ERR(apne_dev))
-   return PTR_ERR(apne_dev);
-   return 0;
+   return PTR_ERR_OR_ZERO(apne_dev);
 }
 
 static void __exit apne_module_exit(void)
-- 
1.8.3.1

--
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] drm/tegra: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/gpu/drm/tegra/gem.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
index 28a9cbc..ba6a7ac 100644
--- a/drivers/gpu/drm/tegra/gem.c
+++ b/drivers/gpu/drm/tegra/gem.c
@@ -199,10 +199,7 @@ int tegra_bo_dumb_create(struct drm_file *file, struct 
drm_device *drm,
 
bo = tegra_bo_create_with_handle(file, drm, args->size, 0,
 >handle);
-   if (IS_ERR(bo))
-   return PTR_ERR(bo);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(bo);
 }
 
 int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,
-- 
1.8.3.1

--
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] drivers/rtc/rtc-pcf2127.c: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/rtc/rtc-pcf2127.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
index 1ee514a..9bd842e 100644
--- a/drivers/rtc/rtc-pcf2127.c
+++ b/drivers/rtc/rtc-pcf2127.c
@@ -197,10 +197,7 @@ static int pcf2127_probe(struct i2c_client *client,
pcf2127_driver.driver.name,
_rtc_ops, THIS_MODULE);
 
-   if (IS_ERR(pcf2127->rtc))
-   return PTR_ERR(pcf2127->rtc);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(pcf2127->rtc);
 }
 
 static const struct i2c_device_id pcf2127_id[] = {
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/block/rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 3624368..3b6eea3 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -4680,7 +4680,7 @@ static int rbd_dev_image_id(struct rbd_device *rbd_dev)
 
image_id = ceph_extract_encoded_string(, p + ret,
NULL, GFP_NOIO);
-   ret = IS_ERR(image_id) ? PTR_ERR(image_id) : 0;
+   ret = PTR_ERR_OR_ZERO(image_id);
if (!ret)
rbd_dev->image_format = 2;
} else {
-- 
1.8.3.1

--
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] dca: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/dca/dca-sysfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/dca/dca-sysfs.c b/drivers/dca/dca-sysfs.c
index 126cf29..b2f8be0 100644
--- a/drivers/dca/dca-sysfs.c
+++ b/drivers/dca/dca-sysfs.c
@@ -40,9 +40,7 @@ int dca_sysfs_add_req(struct dca_provider *dca, struct device 
*dev, int slot)
 
cd = device_create(dca_class, dca->cd, MKDEV(0, slot + 1), NULL,
   "requester%d", req_count++);
-   if (IS_ERR(cd))
-   return PTR_ERR(cd);
-   return 0;
+   return PTR_ERR_OR_ZERO(cd);
 }
 
 void dca_sysfs_remove_req(struct dca_provider *dca, int slot)
-- 
1.8.3.1

--
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] ARM: imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong 
---
 arch/arm/mach-imx/mx31moboard-smartbot.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c 
b/arch/arm/mach-imx/mx31moboard-smartbot.c
index 04ae45d..af6550e 100644
--- a/arch/arm/mach-imx/mx31moboard-smartbot.c
+++ b/arch/arm/mach-imx/mx31moboard-smartbot.c
@@ -141,10 +141,7 @@ static int __init smartbot_otg_host_init(void)
return -ENODEV;
 
pdev = imx31_add_mxc_ehci_otg(_host_pdata);
-   if (IS_ERR(pdev))
-   return PTR_ERR(pdev);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(pdev);
 }
 #else
 static inline int smartbot_otg_host_init(void) { return 0; }
-- 
1.8.3.1

--
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] [SCSI] fnic: convert to use simple_open()

2013-11-05 Thread Duan Jiong
This removes an open code simple_open() function and replaces file
operations references to the function with simple_open() instead.

Signed-off-by: Duan Jiong 
---
 drivers/scsi/fnic/fnic_debugfs.c | 19 +--
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index b6073f8..9852e4f 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -77,23 +77,6 @@ void fnic_debugfs_terminate(void)
 }
 
 /*
- * fnic_trace_ctrl_open - Open the trace_enable file
- * @inode: The inode pointer.
- * @file: The file pointer to attach the trace enable/disable flag.
- *
- * Description:
- * This routine opens a debugsfs file trace_enable.
- *
- * Returns:
- * This function returns zero if successful.
- */
-static int fnic_trace_ctrl_open(struct inode *inode, struct file *filp)
-{
-   filp->private_data = inode->i_private;
-   return 0;
-}
-
-/*
  * fnic_trace_ctrl_read - Read a trace_enable debugfs file
  * @filp: The file pointer to read from.
  * @ubuf: The buffer to copy the data to.
@@ -274,7 +257,7 @@ static int fnic_trace_debugfs_release(struct inode *inode,
 
 static const struct file_operations fnic_trace_ctrl_fops = {
.owner = THIS_MODULE,
-   .open = fnic_trace_ctrl_open,
+   .open = simple_open,
.read = fnic_trace_ctrl_read,
.write = fnic_trace_ctrl_write,
 };
-- 
1.8.3.1

--
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] [SCSI] fnic: convert to use simple_open()

2013-11-05 Thread Duan Jiong
This removes an open code simple_open() function and replaces file
operations references to the function with simple_open() instead.

Signed-off-by: Duan Jiong duanj.f...@cn.fujitsu.com
---
 drivers/scsi/fnic/fnic_debugfs.c | 19 +--
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index b6073f8..9852e4f 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -77,23 +77,6 @@ void fnic_debugfs_terminate(void)
 }
 
 /*
- * fnic_trace_ctrl_open - Open the trace_enable file
- * @inode: The inode pointer.
- * @file: The file pointer to attach the trace enable/disable flag.
- *
- * Description:
- * This routine opens a debugsfs file trace_enable.
- *
- * Returns:
- * This function returns zero if successful.
- */
-static int fnic_trace_ctrl_open(struct inode *inode, struct file *filp)
-{
-   filp-private_data = inode-i_private;
-   return 0;
-}
-
-/*
  * fnic_trace_ctrl_read - Read a trace_enable debugfs file
  * @filp: The file pointer to read from.
  * @ubuf: The buffer to copy the data to.
@@ -274,7 +257,7 @@ static int fnic_trace_debugfs_release(struct inode *inode,
 
 static const struct file_operations fnic_trace_ctrl_fops = {
.owner = THIS_MODULE,
-   .open = fnic_trace_ctrl_open,
+   .open = simple_open,
.read = fnic_trace_ctrl_read,
.write = fnic_trace_ctrl_write,
 };
-- 
1.8.3.1

--
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] ARM: imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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
---
 arch/arm/mach-imx/mx31moboard-smartbot.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c 
b/arch/arm/mach-imx/mx31moboard-smartbot.c
index 04ae45d..af6550e 100644
--- a/arch/arm/mach-imx/mx31moboard-smartbot.c
+++ b/arch/arm/mach-imx/mx31moboard-smartbot.c
@@ -141,10 +141,7 @@ static int __init smartbot_otg_host_init(void)
return -ENODEV;
 
pdev = imx31_add_mxc_ehci_otg(otg_host_pdata);
-   if (IS_ERR(pdev))
-   return PTR_ERR(pdev);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(pdev);
 }
 #else
 static inline int smartbot_otg_host_init(void) { return 0; }
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/block/rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 3624368..3b6eea3 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -4680,7 +4680,7 @@ static int rbd_dev_image_id(struct rbd_device *rbd_dev)
 
image_id = ceph_extract_encoded_string(p, p + ret,
NULL, GFP_NOIO);
-   ret = IS_ERR(image_id) ? PTR_ERR(image_id) : 0;
+   ret = PTR_ERR_OR_ZERO(image_id);
if (!ret)
rbd_dev-image_format = 2;
} else {
-- 
1.8.3.1

--
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] dca: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/dca/dca-sysfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/dca/dca-sysfs.c b/drivers/dca/dca-sysfs.c
index 126cf29..b2f8be0 100644
--- a/drivers/dca/dca-sysfs.c
+++ b/drivers/dca/dca-sysfs.c
@@ -40,9 +40,7 @@ int dca_sysfs_add_req(struct dca_provider *dca, struct device 
*dev, int slot)
 
cd = device_create(dca_class, dca-cd, MKDEV(0, slot + 1), NULL,
   requester%d, req_count++);
-   if (IS_ERR(cd))
-   return PTR_ERR(cd);
-   return 0;
+   return PTR_ERR_OR_ZERO(cd);
 }
 
 void dca_sysfs_remove_req(struct dca_provider *dca, int slot)
-- 
1.8.3.1

--
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] drivers/rtc/rtc-pcf2127.c: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/rtc/rtc-pcf2127.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
index 1ee514a..9bd842e 100644
--- a/drivers/rtc/rtc-pcf2127.c
+++ b/drivers/rtc/rtc-pcf2127.c
@@ -197,10 +197,7 @@ static int pcf2127_probe(struct i2c_client *client,
pcf2127_driver.driver.name,
pcf2127_rtc_ops, THIS_MODULE);
 
-   if (IS_ERR(pcf2127-rtc))
-   return PTR_ERR(pcf2127-rtc);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(pcf2127-rtc);
 }
 
 static const struct i2c_device_id pcf2127_id[] = {
-- 
1.8.3.1

--
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] drm/tegra: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/gpu/drm/tegra/gem.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
index 28a9cbc..ba6a7ac 100644
--- a/drivers/gpu/drm/tegra/gem.c
+++ b/drivers/gpu/drm/tegra/gem.c
@@ -199,10 +199,7 @@ int tegra_bo_dumb_create(struct drm_file *file, struct 
drm_device *drm,
 
bo = tegra_bo_create_with_handle(file, drm, args-size, 0,
 args-handle);
-   if (IS_ERR(bo))
-   return PTR_ERR(bo);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(bo);
 }
 
 int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,
-- 
1.8.3.1

--
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] Input: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/input/touchscreen/cyttsp4_spi.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/input/touchscreen/cyttsp4_spi.c 
b/drivers/input/touchscreen/cyttsp4_spi.c
index a71e114..b19434c 100644
--- a/drivers/input/touchscreen/cyttsp4_spi.c
+++ b/drivers/input/touchscreen/cyttsp4_spi.c
@@ -171,10 +171,7 @@ static int cyttsp4_spi_probe(struct spi_device *spi)
ts = cyttsp4_probe(cyttsp_spi_bus_ops, spi-dev, spi-irq,
  CY_SPI_DATA_BUF_SIZE);
 
-   if (IS_ERR(ts))
-   return PTR_ERR(ts);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(ts);
 }
 
 static int cyttsp4_spi_remove(struct spi_device *spi)
-- 
1.8.3.1

--
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] ethernet: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/net/ethernet/8390/apne.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/8390/apne.c b/drivers/net/ethernet/8390/apne.c
index 912ed7a..e41e3af 100644
--- a/drivers/net/ethernet/8390/apne.c
+++ b/drivers/net/ethernet/8390/apne.c
@@ -551,9 +551,7 @@ static struct net_device *apne_dev;
 static int __init apne_module_init(void)
 {
apne_dev = apne_probe(-1);
-   if (IS_ERR(apne_dev))
-   return PTR_ERR(apne_dev);
-   return 0;
+   return PTR_ERR_OR_ZERO(apne_dev);
 }
 
 static void __exit apne_module_exit(void)
-- 
1.8.3.1

--
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] leds: leds-mc13783: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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
---
 arch/arm/mach-imx/mach-mx31moboard.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/mach-mx31moboard.c 
b/arch/arm/mach-imx/mach-mx31moboard.c
index 6f424ec..118ea68 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -446,10 +446,7 @@ static int __init moboard_usbh2_init(void)
return -ENODEV;
 
pdev = imx31_add_mxc_ehci_hs(2, usbh2_pdata);
-   if (IS_ERR(pdev))
-   return PTR_ERR(pdev);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(pdev);
 }
 
 static const struct gpio_led mx31moboard_leds[] __initconst = {
-- 
1.8.3.1

--
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] libcrc32c: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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
---
 lib/libcrc32c.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/libcrc32c.c b/lib/libcrc32c.c
index 244f548..b3131f5 100644
--- a/lib/libcrc32c.c
+++ b/lib/libcrc32c.c
@@ -62,10 +62,7 @@ EXPORT_SYMBOL(crc32c);
 static int __init libcrc32c_mod_init(void)
 {
tfm = crypto_alloc_shash(crc32c, 0, 0);
-   if (IS_ERR(tfm))
-   return PTR_ERR(tfm);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(tfm);
 }
 
 static void __exit libcrc32c_mod_fini(void)
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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
---
 block/ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/ioctl.c b/block/ioctl.c
index a31d91d..7d5c3b2 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -64,7 +64,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct 
blkpg_ioctl_arg __user
part = add_partition(disk, partno, start, length,
 ADDPART_FLAG_NONE, NULL);
mutex_unlock(bdev-bd_mutex);
-   return IS_ERR(part) ? PTR_ERR(part) : 0;
+   return PTR_ERR_OR_ZERO(part);
case BLKPG_DEL_PARTITION:
part = disk_get_part(disk, partno);
if (!part)
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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
---
 block/blk-timeout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 4e9cfd1..cdf5711 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -32,7 +32,7 @@ static int __init fail_io_timeout_debugfs(void)
struct dentry *dir = fault_create_debugfs_attr(fail_io_timeout,
NULL, fail_io_timeout);
 
-   return IS_ERR(dir) ? PTR_ERR(dir) : 0;
+   return PTR_ERR_OR_ZERO(dir);
 }
 
 late_initcall(fail_io_timeout_debugfs);
-- 
1.8.3.1

--
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] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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
---
 block/blk-timeout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 4e9cfd1..cdf5711 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -32,7 +32,7 @@ static int __init fail_io_timeout_debugfs(void)
struct dentry *dir = fault_create_debugfs_attr(fail_io_timeout,
NULL, fail_io_timeout);
 
-   return IS_ERR(dir) ? PTR_ERR(dir) : 0;
+   return PTR_ERR_OR_ZERO(dir);
 }
 
 late_initcall(fail_io_timeout_debugfs);
-- 
1.8.3.1

--
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] lustre/fld: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-05 Thread Duan Jiong
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/staging/lustre/lustre/fld/fld_request.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c 
b/drivers/staging/lustre/lustre/fld/fld_request.c
index e47fd50..3191a39 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -504,10 +504,7 @@ static int __init fld_mod_init(void)
fld_type_proc_dir = lprocfs_register(LUSTRE_FLD_NAME,
 proc_lustre_root,
 NULL, NULL);
-   if (IS_ERR(fld_type_proc_dir))
-   return PTR_ERR(fld_type_proc_dir);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(fld_type_proc_dir);
 }
 
 static void __exit fld_mod_exit(void)
-- 
1.8.3.1

--
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] drivers: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-01 Thread Duan Jiong
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);
 }
 
 static void data_debugfs_exit(struct fpga_device *priv)
-- 
1.8.3.1

--
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] drivers/net: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-01 Thread Duan Jiong
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/net/appletalk/ipddp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c
index 10d0dba..78f06cb 100644
--- a/drivers/net/appletalk/ipddp.c
+++ b/drivers/net/appletalk/ipddp.c
@@ -312,9 +312,7 @@ module_param(ipddp_mode, int, 0);
 static int __init ipddp_init_module(void)
 {
dev_ipddp = ipddp_init();
-if (IS_ERR(dev_ipddp))
-return PTR_ERR(dev_ipddp);
-   return 0;
+return PTR_ERR_OR_ZERO(dev_ipddp);
 }
 
 static void __exit ipddp_cleanup_module(void)
-- 
1.8.3.1

--
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] drivers/net: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-01 Thread Duan Jiong
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/net/appletalk/ipddp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c
index 10d0dba..78f06cb 100644
--- a/drivers/net/appletalk/ipddp.c
+++ b/drivers/net/appletalk/ipddp.c
@@ -312,9 +312,7 @@ module_param(ipddp_mode, int, 0);
 static int __init ipddp_init_module(void)
 {
dev_ipddp = ipddp_init();
-if (IS_ERR(dev_ipddp))
-return PTR_ERR(dev_ipddp);
-   return 0;
+return PTR_ERR_OR_ZERO(dev_ipddp);
 }
 
 static void __exit ipddp_cleanup_module(void)
-- 
1.8.3.1

--
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] drivers: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-01 Thread Duan Jiong
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);
 }
 
 static void data_debugfs_exit(struct fpga_device *priv)
-- 
1.8.3.1

--
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] DRM: Armada: convert to use simple_open()

2013-10-31 Thread Duan Jiong

This removes an open coded simple_open() function and replaces file
operations references to the function with simple_open() instead.

Signed-off-by: Duan Jiong 
---
 drivers/gpu/drm/armada/armada_debugfs.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_debugfs.c 
b/drivers/gpu/drm/armada/armada_debugfs.c
index 612f375..471e456 100644
--- a/drivers/gpu/drm/armada/armada_debugfs.c
+++ b/drivers/gpu/drm/armada/armada_debugfs.c
@@ -95,15 +95,9 @@ static int armada_debugfs_write(struct file *file, const 
char __user *ptr,
return len;
 }
 
-static int armada_debugfs_reg_w_open(struct inode *inode, struct file *file)
-{
-   file->private_data = inode->i_private;
-   return 0;
-}
-
 static const struct file_operations fops_reg_w = {
.owner = THIS_MODULE,
-   .open = armada_debugfs_reg_w_open,
+   .open = simple_open,
.write = armada_debugfs_write,
.llseek = noop_llseek,
 };
-- 
1.8.3.1
--
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] DRM: Armada: convert to use simple_open()

2013-10-31 Thread Duan Jiong

This removes an open coded simple_open() function and replaces file
operations references to the function with simple_open() instead.

Signed-off-by: Duan Jiong duanj.f...@cn.fujitsu.com
---
 drivers/gpu/drm/armada/armada_debugfs.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_debugfs.c 
b/drivers/gpu/drm/armada/armada_debugfs.c
index 612f375..471e456 100644
--- a/drivers/gpu/drm/armada/armada_debugfs.c
+++ b/drivers/gpu/drm/armada/armada_debugfs.c
@@ -95,15 +95,9 @@ static int armada_debugfs_write(struct file *file, const 
char __user *ptr,
return len;
 }
 
-static int armada_debugfs_reg_w_open(struct inode *inode, struct file *file)
-{
-   file-private_data = inode-i_private;
-   return 0;
-}
-
 static const struct file_operations fops_reg_w = {
.owner = THIS_MODULE,
-   .open = armada_debugfs_reg_w_open,
+   .open = simple_open,
.write = armada_debugfs_write,
.llseek = noop_llseek,
 };
-- 
1.8.3.1
--
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] digsig: use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

2013-09-26 Thread Duan Jiong


Signed-off-by: Duan Jiong 
---
 lib/digsig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/digsig.c b/lib/digsig.c
index 2f31e6a..8793aed 100644
--- a/lib/digsig.c
+++ b/lib/digsig.c
@@ -209,7 +209,7 @@ int digsig_verify(struct key *keyring, const char *sig, int 
siglen,
kref = keyring_search(make_key_ref(keyring, 1UL),
_type_user, name);
if (IS_ERR(kref))
-   key = ERR_PTR(PTR_ERR(kref));
+   key = ERR_CAST(kref);
else
key = key_ref_to_ptr(kref);
} else {
-- 
1.8.3.1
--
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] usb: gadget: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

2013-09-26 Thread Duan Jiong


Signed-off-by: Duan Jiong 
---
 drivers/usb/gadget/configfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 8f0d614..1bfacbf 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -557,7 +557,7 @@ static struct config_group *function_make(
 
fi = usb_get_function_instance(func_name);
if (IS_ERR(fi))
-   return ERR_PTR(PTR_ERR(fi));
+   return ERR_CAST(fi);
 
ret = config_item_set_name(>group.cg_item, name);
if (ret) {
-- 
1.8.3.1
--
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] usb: gadget: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

2013-09-26 Thread Duan Jiong


Signed-off-by: Duan Jiong duanj.f...@cn.fujitsu.com
---
 drivers/usb/gadget/configfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 8f0d614..1bfacbf 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -557,7 +557,7 @@ static struct config_group *function_make(
 
fi = usb_get_function_instance(func_name);
if (IS_ERR(fi))
-   return ERR_PTR(PTR_ERR(fi));
+   return ERR_CAST(fi);
 
ret = config_item_set_name(fi-group.cg_item, name);
if (ret) {
-- 
1.8.3.1
--
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] digsig: use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

2013-09-26 Thread Duan Jiong


Signed-off-by: Duan Jiong duanj.f...@cn.fujitsu.com
---
 lib/digsig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/digsig.c b/lib/digsig.c
index 2f31e6a..8793aed 100644
--- a/lib/digsig.c
+++ b/lib/digsig.c
@@ -209,7 +209,7 @@ int digsig_verify(struct key *keyring, const char *sig, int 
siglen,
kref = keyring_search(make_key_ref(keyring, 1UL),
key_type_user, name);
if (IS_ERR(kref))
-   key = ERR_PTR(PTR_ERR(kref));
+   key = ERR_CAST(kref);
else
key = key_ref_to_ptr(kref);
} else {
-- 
1.8.3.1
--
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] selinux: Use kmemdup instead of kmalloc + memcpy

2013-09-25 Thread Duan Jiong


Signed-off-by: Duan Jiong 
---
 security/selinux/xfrm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c
index 425b9f9..5c809c1 100644
--- a/security/selinux/xfrm.c
+++ b/security/selinux/xfrm.c
@@ -268,10 +268,10 @@ int selinux_xfrm_policy_clone(struct xfrm_sec_ctx 
*old_ctx,
if (!old_ctx)
return 0;
 
-   new_ctx = kmalloc(sizeof(*old_ctx) + old_ctx->ctx_len, GFP_ATOMIC);
+   new_ctx = kmemdup(old_ctx, sizeof(*old_ctx) + old_ctx->ctx_len,
+   GFP_ATOMIC);
if (!new_ctx)
return -ENOMEM;
-   memcpy(new_ctx, old_ctx, sizeof(*old_ctx) + old_ctx->ctx_len);
atomic_inc(_xfrm_refcount);
*new_ctxp = new_ctx;
 
-- 
1.8.3.1
--
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] selinux: Use kmemdup instead of kmalloc + memcpy

2013-09-25 Thread Duan Jiong


Signed-off-by: Duan Jiong duanj.f...@cn.fujitsu.com
---
 security/selinux/xfrm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c
index 425b9f9..5c809c1 100644
--- a/security/selinux/xfrm.c
+++ b/security/selinux/xfrm.c
@@ -268,10 +268,10 @@ int selinux_xfrm_policy_clone(struct xfrm_sec_ctx 
*old_ctx,
if (!old_ctx)
return 0;
 
-   new_ctx = kmalloc(sizeof(*old_ctx) + old_ctx-ctx_len, GFP_ATOMIC);
+   new_ctx = kmemdup(old_ctx, sizeof(*old_ctx) + old_ctx-ctx_len,
+   GFP_ATOMIC);
if (!new_ctx)
return -ENOMEM;
-   memcpy(new_ctx, old_ctx, sizeof(*old_ctx) + old_ctx-ctx_len);
atomic_inc(selinux_xfrm_refcount);
*new_ctxp = new_ctx;
 
-- 
1.8.3.1
--
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: dgnc: driver.c: casting (void *)value returned by kzalloc is useless

2013-09-05 Thread Duan Jiong
From: Duan Jiong 

Casting (void *) value returned by kzalloc is useless
as mentioned in Documentation/CodingStyle, Chap 14.

Signed-off-by: Duan Jiong 
---
 drivers/staging/dgnc/dgnc_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_driver.c 
b/drivers/staging/dgnc/dgnc_driver.c
index f8c1e22..ac64181 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -499,7 +499,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
 
/* get the board structure and prep it */
brd = dgnc_Board[dgnc_NumBoards] =
-   (struct board_t *) kzalloc(sizeof(struct board_t), GFP_KERNEL);
+   kzalloc(sizeof(struct board_t), GFP_KERNEL);
if (!brd) {
APR(("memory allocation for board structure failed\n"));
return(-ENOMEM);
@@ -507,7 +507,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
 
/* make a temporary message buffer for the boot messages */
brd->msgbuf = brd->msgbuf_head =
-   (char *) kzalloc(sizeof(char) * 8192, GFP_KERNEL);
+   kzalloc(sizeof(char) * 8192, GFP_KERNEL);
if (!brd->msgbuf) {
kfree(brd);
APR(("memory allocation for board msgbuf failed\n"));
-- 
1.8.3.1
--
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] ALSA: emu10k1: casting (void *) value returned by kcalloc is useless

2013-09-05 Thread Duan Jiong
于 2013年09月05日 14:12, Joe Perches 写道:
> On Thu, 2013-09-05 at 13:57 +0800, Duan Jiong wrote:
>> From: Duan Jiong 
>>
>> Casting (void *) value returned by kcalloc is useless
>> as mentioned in Documentation/CodingStyle, Chap 14.
> 
> __user is an important marker that is lost here.
> 
>> diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
> []
>> @@ -1183,9 +1183,8 @@ static int _snd_emu10k1_audigy_init_efx(struct 
>> snd_emu10k1 *emu)
>>  mm_segment_t seg;
>>  
>>  if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL ||
>> -(icode->gpr_map = (u_int32_t __user *)
>> - kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t),
>> - GFP_KERNEL)) == NULL ||
>> +(icode->gpr_map = kcalloc(512 + 256 + 256 + 2 * 1024,
>> +sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
>>  (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
>>  sizeof(*controls), GFP_KERNEL)) == NULL) {
>>  err = -ENOMEM;
> 
> I think this would be clearer as
> 
>   err = -ENOMEM;
>   icode = kzalloc(sizeof(*icode), GFP_KERNEL)
>   if (!icode)
>   goto err;
>   icode->gpr_map = (__user)kcalloc(512 + 256 + 256 + 2 * 1024,
>sizeof(u_int32_t), GFP_KERNEL);
>   if (!icode->gpr_map)
>   goto err;
>   controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
>   sizeof(*controls), GFP_KERNEL);
>   if (!controls)
>   goto err;
> 

Maybe it should keep the original style, because i do as you said, and
error messages appear during compiling the kernel.

Thanks,
  Duan

--
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] mtd: bcm47xxsflash: the argument to kfree should not be the address of a structure field

2013-09-05 Thread Duan Jiong
From: Duan Jiong 

Signed-off-by: Duan Jiong 
---
 drivers/mtd/devices/bcm47xxsflash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/devices/bcm47xxsflash.c 
b/drivers/mtd/devices/bcm47xxsflash.c
index 18e7761..9b8aaf3 100644
--- a/drivers/mtd/devices/bcm47xxsflash.c
+++ b/drivers/mtd/devices/bcm47xxsflash.c
@@ -87,7 +87,7 @@ static int bcm47xxsflash_bcma_probe(struct platform_device 
*pdev)
return 0;
 
 err_dev_reg:
-   kfree(>mtd);
+   kfree(b47s);
 out:
return err;
 }
-- 
1.8.3.1
--
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] mtd: bcm47xxsflash: the argument to kfree should not be the address of a structure field

2013-09-05 Thread Duan Jiong
From: Duan Jiong duanj.f...@cn.fujitsu.com

Signed-off-by: Duan Jiong duanj.f...@cn.fujitsu.com
---
 drivers/mtd/devices/bcm47xxsflash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/devices/bcm47xxsflash.c 
b/drivers/mtd/devices/bcm47xxsflash.c
index 18e7761..9b8aaf3 100644
--- a/drivers/mtd/devices/bcm47xxsflash.c
+++ b/drivers/mtd/devices/bcm47xxsflash.c
@@ -87,7 +87,7 @@ static int bcm47xxsflash_bcma_probe(struct platform_device 
*pdev)
return 0;
 
 err_dev_reg:
-   kfree(b47s-mtd);
+   kfree(b47s);
 out:
return err;
 }
-- 
1.8.3.1
--
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] ALSA: emu10k1: casting (void *) value returned by kcalloc is useless

2013-09-05 Thread Duan Jiong
于 2013年09月05日 14:12, Joe Perches 写道:
 On Thu, 2013-09-05 at 13:57 +0800, Duan Jiong wrote:
 From: Duan Jiong duanj.f...@cn.fujitsu.com

 Casting (void *) value returned by kcalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.
 
 __user is an important marker that is lost here.
 
 diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
 []
 @@ -1183,9 +1183,8 @@ static int _snd_emu10k1_audigy_init_efx(struct 
 snd_emu10k1 *emu)
  mm_segment_t seg;
  
  if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL ||
 -(icode-gpr_map = (u_int32_t __user *)
 - kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t),
 - GFP_KERNEL)) == NULL ||
 +(icode-gpr_map = kcalloc(512 + 256 + 256 + 2 * 1024,
 +sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
  (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
  sizeof(*controls), GFP_KERNEL)) == NULL) {
  err = -ENOMEM;
 
 I think this would be clearer as
 
   err = -ENOMEM;
   icode = kzalloc(sizeof(*icode), GFP_KERNEL)
   if (!icode)
   goto err;
   icode-gpr_map = (__user)kcalloc(512 + 256 + 256 + 2 * 1024,
sizeof(u_int32_t), GFP_KERNEL);
   if (!icode-gpr_map)
   goto err;
   controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
   sizeof(*controls), GFP_KERNEL);
   if (!controls)
   goto err;
 

Maybe it should keep the original style, because i do as you said, and
error messages appear during compiling the kernel.

Thanks,
  Duan

--
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: dgnc: driver.c: casting (void *)value returned by kzalloc is useless

2013-09-05 Thread Duan Jiong
From: Duan Jiong duanj.f...@cn.fujitsu.com

Casting (void *) value returned by kzalloc is useless
as mentioned in Documentation/CodingStyle, Chap 14.

Signed-off-by: Duan Jiong duanj.f...@cn.fujitsu.com
---
 drivers/staging/dgnc/dgnc_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_driver.c 
b/drivers/staging/dgnc/dgnc_driver.c
index f8c1e22..ac64181 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -499,7 +499,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
 
/* get the board structure and prep it */
brd = dgnc_Board[dgnc_NumBoards] =
-   (struct board_t *) kzalloc(sizeof(struct board_t), GFP_KERNEL);
+   kzalloc(sizeof(struct board_t), GFP_KERNEL);
if (!brd) {
APR((memory allocation for board structure failed\n));
return(-ENOMEM);
@@ -507,7 +507,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
 
/* make a temporary message buffer for the boot messages */
brd-msgbuf = brd-msgbuf_head =
-   (char *) kzalloc(sizeof(char) * 8192, GFP_KERNEL);
+   kzalloc(sizeof(char) * 8192, GFP_KERNEL);
if (!brd-msgbuf) {
kfree(brd);
APR((memory allocation for board msgbuf failed\n));
-- 
1.8.3.1
--
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] ALSA: emu10k1: casting (void *) value returned by kcalloc is useless

2013-09-04 Thread Duan Jiong
From: Duan Jiong 

Casting (void *) value returned by kcalloc is useless
as mentioned in Documentation/CodingStyle, Chap 14.

Signed-off-by: Duan Jiong 
---
 sound/pci/emu10k1/emufx.c | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 0275209..68edb2d 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -1183,9 +1183,8 @@ static int _snd_emu10k1_audigy_init_efx(struct 
snd_emu10k1 *emu)
mm_segment_t seg;
 
if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL ||
-   (icode->gpr_map = (u_int32_t __user *)
-kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t),
-GFP_KERNEL)) == NULL ||
+   (icode->gpr_map = kcalloc(512 + 256 + 256 + 2 * 1024,
+   sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
(controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
sizeof(*controls), GFP_KERNEL)) == NULL) {
err = -ENOMEM;
@@ -1815,9 +1814,8 @@ static int _snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
 
if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL)
return -ENOMEM;
-   if ((icode->gpr_map = (u_int32_t __user *)
-kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t),
-GFP_KERNEL)) == NULL ||
+   if ((icode->gpr_map = kcalloc(256 + 160 + 160 + 2 * 512,
+   sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
 (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
sizeof(struct snd_emu10k1_fx8010_control_gpr),
GFP_KERNEL)) == NULL ||
-- 
1.8.3.1

--
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] ALSA: emu10k1: casting (void *) value returned by kcalloc is useless

2013-09-04 Thread Duan Jiong
From: Duan Jiong duanj.f...@cn.fujitsu.com

Casting (void *) value returned by kcalloc is useless
as mentioned in Documentation/CodingStyle, Chap 14.

Signed-off-by: Duan Jiong duanj.f...@cn.fujitsu.com
---
 sound/pci/emu10k1/emufx.c | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 0275209..68edb2d 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -1183,9 +1183,8 @@ static int _snd_emu10k1_audigy_init_efx(struct 
snd_emu10k1 *emu)
mm_segment_t seg;
 
if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL ||
-   (icode-gpr_map = (u_int32_t __user *)
-kcalloc(512 + 256 + 256 + 2 * 1024, sizeof(u_int32_t),
-GFP_KERNEL)) == NULL ||
+   (icode-gpr_map = kcalloc(512 + 256 + 256 + 2 * 1024,
+   sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
(controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
sizeof(*controls), GFP_KERNEL)) == NULL) {
err = -ENOMEM;
@@ -1815,9 +1814,8 @@ static int _snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
 
if ((icode = kzalloc(sizeof(*icode), GFP_KERNEL)) == NULL)
return -ENOMEM;
-   if ((icode-gpr_map = (u_int32_t __user *)
-kcalloc(256 + 160 + 160 + 2 * 512, sizeof(u_int32_t),
-GFP_KERNEL)) == NULL ||
+   if ((icode-gpr_map = kcalloc(256 + 160 + 160 + 2 * 512,
+   sizeof(u_int32_t), GFP_KERNEL)) == NULL ||
 (controls = kcalloc(SND_EMU10K1_GPR_CONTROLS,
sizeof(struct snd_emu10k1_fx8010_control_gpr),
GFP_KERNEL)) == NULL ||
-- 
1.8.3.1

--
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] pms.c: remove duplicated include

2012-07-18 Thread Duan Jiong

Signed-off-by: Duan Jiong 
---
 drivers/media/video/pms.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c
index b4c679b..77f9c92 100644
--- a/drivers/media/video/pms.c
+++ b/drivers/media/video/pms.c
@@ -30,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
1.7.9.5

--
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] smiapp-core.c: remove duplicated include

2012-07-18 Thread Duan Jiong

Signed-off-by: Duan Jiong 
---
 drivers/media/video/smiapp/smiapp-core.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/video/smiapp/smiapp-core.c 
b/drivers/media/video/smiapp/smiapp-core.c
index 9cf5bda..297acaf 100644
--- a/drivers/media/video/smiapp/smiapp-core.c
+++ b/drivers/media/video/smiapp/smiapp-core.c
@@ -33,7 +33,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
-- 
1.7.9.5

--
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] sep_crypto.c: remove duplicated include

2012-07-18 Thread Duan Jiong

Signed-off-by: Duan Jiong 
---
 drivers/staging/sep/sep_crypto.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/sep/sep_crypto.c b/drivers/staging/sep/sep_crypto.c
index 1cc790e..1d97e5a 100644
--- a/drivers/staging/sep/sep_crypto.c
+++ b/drivers/staging/sep/sep_crypto.c
@@ -44,7 +44,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
1.7.9.5

--
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] sep_main.c: remove duplicated include

2012-07-18 Thread Duan Jiong

Signed-off-by: Duan Jiong 
---
 drivers/staging/sep/sep_main.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/sep/sep_main.c b/drivers/staging/sep/sep_main.c
index df1d13e..a80c701 100644
--- a/drivers/staging/sep/sep_main.c
+++ b/drivers/staging/sep/sep_main.c
@@ -61,7 +61,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
1.7.9.5

--
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] vme_user.c: remove duplicated include

2012-07-18 Thread Duan Jiong

Signed-off-by: Duan Jiong 
---
 drivers/staging/vme/devices/vme_user.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/vme/devices/vme_user.c 
b/drivers/staging/vme/devices/vme_user.c
index e24a6f9..530e7c6 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -31,7 +31,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
-- 
1.7.9.5

--
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] vme_user.c: remove duplicated include

2012-07-18 Thread Duan Jiong

Signed-off-by: Duan Jiong djduanji...@gmail.com
---
 drivers/staging/vme/devices/vme_user.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/vme/devices/vme_user.c 
b/drivers/staging/vme/devices/vme_user.c
index e24a6f9..530e7c6 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -31,7 +31,6 @@
 #include linux/slab.h
 #include linux/spinlock.h
 #include linux/syscalls.h
-#include linux/mutex.h
 #include linux/types.h
 
 #include linux/io.h
-- 
1.7.9.5

--
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] sep_main.c: remove duplicated include

2012-07-18 Thread Duan Jiong

Signed-off-by: Duan Jiong djduanji...@gmail.com
---
 drivers/staging/sep/sep_main.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/sep/sep_main.c b/drivers/staging/sep/sep_main.c
index df1d13e..a80c701 100644
--- a/drivers/staging/sep/sep_main.c
+++ b/drivers/staging/sep/sep_main.c
@@ -61,7 +61,6 @@
 #include linux/interrupt.h
 #include linux/pagemap.h
 #include asm/cacheflush.h
-#include linux/sched.h
 #include linux/delay.h
 #include linux/jiffies.h
 #include linux/async.h
-- 
1.7.9.5

--
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] sep_crypto.c: remove duplicated include

2012-07-18 Thread Duan Jiong

Signed-off-by: Duan Jiong djduanji...@gmail.com
---
 drivers/staging/sep/sep_crypto.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/sep/sep_crypto.c b/drivers/staging/sep/sep_crypto.c
index 1cc790e..1d97e5a 100644
--- a/drivers/staging/sep/sep_crypto.c
+++ b/drivers/staging/sep/sep_crypto.c
@@ -44,7 +44,6 @@
 #include linux/poll.h
 #include linux/wait.h
 #include linux/pci.h
-#include linux/pci.h
 #include linux/pm_runtime.h
 #include linux/err.h
 #include linux/device.h
-- 
1.7.9.5

--
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] smiapp-core.c: remove duplicated include

2012-07-18 Thread Duan Jiong

Signed-off-by: Duan Jiong djduanji...@gmail.com
---
 drivers/media/video/smiapp/smiapp-core.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/video/smiapp/smiapp-core.c 
b/drivers/media/video/smiapp/smiapp-core.c
index 9cf5bda..297acaf 100644
--- a/drivers/media/video/smiapp/smiapp-core.c
+++ b/drivers/media/video/smiapp/smiapp-core.c
@@ -33,7 +33,6 @@
 #include linux/module.h
 #include linux/slab.h
 #include linux/regulator/consumer.h
-#include linux/slab.h
 #include linux/v4l2-mediabus.h
 #include media/v4l2-device.h
 
-- 
1.7.9.5

--
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] pms.c: remove duplicated include

2012-07-18 Thread Duan Jiong

Signed-off-by: Duan Jiong djduanji...@gmail.com
---
 drivers/media/video/pms.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c
index b4c679b..77f9c92 100644
--- a/drivers/media/video/pms.c
+++ b/drivers/media/video/pms.c
@@ -30,7 +30,6 @@
 #include linux/ioport.h
 #include linux/init.h
 #include linux/mutex.h
-#include linux/slab.h
 #include linux/uaccess.h
 #include linux/isa.h
 #include asm/io.h
-- 
1.7.9.5

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