* [PATCH] drivers: spi: Use PTR_RET function
@ 2013-03-14 9:07 ` Alexandru Gheorghiu
0 siblings, 0 replies; 6+ messages in thread
From: Alexandru Gheorghiu @ 2013-03-14 9:07 UTC (permalink / raw)
To: Grant Likely
Cc: Mark Brown, spi-devel-general, linux-kernel, Alexandru Gheorghiu
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
---
drivers/spi/spi-fsl-spi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index 086a9ee..1985ba3 100644
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -1134,9 +1134,7 @@ static int plat_mpc8xxx_spi_probe(struct platform_device *pdev)
return -EINVAL;
master = fsl_spi_probe(&pdev->dev, mem, irq);
- if (IS_ERR(master))
- return PTR_ERR(master);
- return 0;
+ return PTR_RET(master);
}
static int plat_mpc8xxx_spi_remove(struct platform_device *pdev)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drivers: spi: Use PTR_RET function
@ 2013-03-14 9:07 ` Alexandru Gheorghiu
0 siblings, 0 replies; 6+ messages in thread
From: Alexandru Gheorghiu @ 2013-03-14 9:07 UTC (permalink / raw)
To: Grant Likely
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Mark Brown,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Alexandru Gheorghiu
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/spi/spi-fsl-spi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index 086a9ee..1985ba3 100644
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -1134,9 +1134,7 @@ static int plat_mpc8xxx_spi_probe(struct platform_device *pdev)
return -EINVAL;
master = fsl_spi_probe(&pdev->dev, mem, irq);
- if (IS_ERR(master))
- return PTR_ERR(master);
- return 0;
+ return PTR_RET(master);
}
static int plat_mpc8xxx_spi_remove(struct platform_device *pdev)
--
1.7.9.5
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: spi: Use PTR_RET function
2013-03-14 9:07 ` Alexandru Gheorghiu
(?)
@ 2013-04-01 13:33 ` Mark Brown
-1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-04-01 13:33 UTC (permalink / raw)
To: Alexandru Gheorghiu; +Cc: Grant Likely, spi-devel-general, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 240 bytes --]
On Thu, Mar 14, 2013 at 11:07:31AM +0200, Alexandru Gheorghiu wrote:
> Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
> Patch found using coccinelle.
Applied, but please always use subject lines appropraite for the
subsystem.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: spi: Use PTR_RET function
2013-03-14 9:18 ` Alexandru Gheorghiu
(?)
@ 2013-04-01 13:33 ` Mark Brown
-1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-04-01 13:33 UTC (permalink / raw)
To: Alexandru Gheorghiu; +Cc: Grant Likely, spi-devel-general, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
On Thu, Mar 14, 2013 at 11:18:18AM +0200, Alexandru Gheorghiu wrote:
> Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
> Patch found using coccinelle.
Applied, but please always use subject lines appropraite for the
subsystem.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] drivers: spi: Use PTR_RET function
@ 2013-03-14 9:18 ` Alexandru Gheorghiu
0 siblings, 0 replies; 6+ messages in thread
From: Alexandru Gheorghiu @ 2013-03-14 9:18 UTC (permalink / raw)
To: Grant Likely
Cc: Mark Brown, spi-devel-general, linux-kernel, Alexandru Gheorghiu
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
---
drivers/spi/spidev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 2e0655d..911e9e0 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -603,7 +603,7 @@ static int spidev_probe(struct spi_device *spi)
dev = device_create(spidev_class, &spi->dev, spidev->devt,
spidev, "spidev%d.%d",
spi->master->bus_num, spi->chip_select);
- status = IS_ERR(dev) ? PTR_ERR(dev) : 0;
+ status = PTR_RET(dev);
} else {
dev_dbg(&spi->dev, "no minor number available!\n");
status = -ENODEV;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drivers: spi: Use PTR_RET function
@ 2013-03-14 9:18 ` Alexandru Gheorghiu
0 siblings, 0 replies; 6+ messages in thread
From: Alexandru Gheorghiu @ 2013-03-14 9:18 UTC (permalink / raw)
To: Grant Likely
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Mark Brown,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Alexandru Gheorghiu
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/spi/spidev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 2e0655d..911e9e0 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -603,7 +603,7 @@ static int spidev_probe(struct spi_device *spi)
dev = device_create(spidev_class, &spi->dev, spidev->devt,
spidev, "spidev%d.%d",
spi->master->bus_num, spi->chip_select);
- status = IS_ERR(dev) ? PTR_ERR(dev) : 0;
+ status = PTR_RET(dev);
} else {
dev_dbg(&spi->dev, "no minor number available!\n");
status = -ENODEV;
--
1.7.9.5
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-01 13:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-14 9:07 [PATCH] drivers: spi: Use PTR_RET function Alexandru Gheorghiu
2013-03-14 9:07 ` Alexandru Gheorghiu
2013-04-01 13:33 ` Mark Brown
2013-03-14 9:18 Alexandru Gheorghiu
2013-03-14 9:18 ` Alexandru Gheorghiu
2013-04-01 13:33 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.