linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial/efm32-uart: don't slur over failure in probe_dt
@ 2013-07-18 19:55 Uwe Kleine-König
  2013-07-26 23:06 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 9+ messages in thread
From: Uwe Kleine-König @ 2013-07-18 19:55 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: kernel, linux-serial

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/tty/serial/efm32-uart.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/efm32-uart.c b/drivers/tty/serial/efm32-uart.c
index 0d38034..551a629 100644
--- a/drivers/tty/serial/efm32-uart.c
+++ b/drivers/tty/serial/efm32-uart.c
@@ -751,7 +751,8 @@ static int efm32_uart_probe(struct platform_device *pdev)
 
 		if (pdata)
 			efm_port->pdata = *pdata;
-	}
+	} else if (ret < 0)
+		goto err_probe_dt;
 
 	line = efm_port->port.line;
 
@@ -764,6 +765,7 @@ static int efm32_uart_probe(struct platform_device *pdev)
 
 		if (line >= 0 && line < ARRAY_SIZE(efm32_uart_ports))
 			efm32_uart_ports[line] = NULL;
+err_probe_dt:
 err_get_rxirq:
 err_too_small:
 err_get_base:
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] serial/efm32-uart: don't slur over failure in probe_dt
  2013-07-18 19:55 [PATCH] serial/efm32-uart: don't slur over failure in probe_dt Uwe Kleine-König
@ 2013-07-26 23:06 ` Greg Kroah-Hartman
  2013-07-30  8:21   ` Uwe Kleine-König
  0 siblings, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2013-07-26 23:06 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: kernel, linux-serial

On Thu, Jul 18, 2013 at 09:55:42PM +0200, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/tty/serial/efm32-uart.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

This doesn't apply either :(

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] serial/efm32-uart: don't slur over failure in probe_dt
  2013-07-26 23:06 ` Greg Kroah-Hartman
@ 2013-07-30  8:21   ` Uwe Kleine-König
  2013-07-30  8:23     ` [PATCH 1/2] serial/efm32-uart: don't use pdev->id to determine the port's line Uwe Kleine-König
  2013-07-30  8:23     ` [PATCH 2/2] serial/efm32-uart: don't slur over failure in probe_dt Uwe Kleine-König
  0 siblings, 2 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2013-07-30  8:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: kernel, linux-serial

On Fri, Jul 26, 2013 at 04:06:29PM -0700, Greg Kroah-Hartman wrote:
> On Thu, Jul 18, 2013 at 09:55:42PM +0200, Uwe Kleine-König wrote:
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> >  drivers/tty/serial/efm32-uart.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> This doesn't apply either :(
If you take my other patch "serial/efm32-uart: don't use pdev->id to
determine the port's line" first, it should apply well. I'll reply to
this mail with the two patches based on next-20130730.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] serial/efm32-uart: don't use pdev->id to determine the port's line
  2013-07-30  8:21   ` Uwe Kleine-König
@ 2013-07-30  8:23     ` Uwe Kleine-König
  2013-07-30  8:34       ` Uwe Kleine-König
  2013-07-30  8:23     ` [PATCH 2/2] serial/efm32-uart: don't slur over failure in probe_dt Uwe Kleine-König
  1 sibling, 1 reply; 9+ messages in thread
From: Uwe Kleine-König @ 2013-07-30  8:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: kernel, linux-serial

pdev->id is not a valid choice for device-tree probed devices. So use
the (properly determined) line from efm32_uart_probe consistenly

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Forwarded: id:1374043721-30677-1-git-send-email-u.kleine-koenig@pengutronix.de
---
 drivers/tty/serial/efm32-uart.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/tty/serial/efm32-uart.c b/drivers/tty/serial/efm32-uart.c
index 868dbfb..ce1ebbb 100644
--- a/drivers/tty/serial/efm32-uart.c
+++ b/drivers/tty/serial/efm32-uart.c
@@ -698,6 +698,7 @@ static int efm32_uart_probe(struct platform_device *pdev)
 {
 	struct efm32_uart_port *efm_port;
 	struct resource *res;
+	unsigned int line;
 	int ret;
 
 	efm_port = kzalloc(sizeof(*efm_port), GFP_KERNEL);
@@ -752,16 +753,17 @@ static int efm32_uart_probe(struct platform_device *pdev)
 			efm_port->pdata = *pdata;
 	}
 
-	if (efm_port->port.line >= 0 &&
-			efm_port->port.line < ARRAY_SIZE(efm32_uart_ports))
-		efm32_uart_ports[efm_port->port.line] = efm_port;
+	line = efm_port->port.line;
+
+	if (line >= 0 && line < ARRAY_SIZE(efm32_uart_ports))
+		efm32_uart_ports[line] = efm_port;
 
 	ret = uart_add_one_port(&efm32_uart_reg, &efm_port->port);
 	if (ret) {
 		dev_dbg(&pdev->dev, "failed to add port: %d\n", ret);
 
-		if (pdev->id >= 0 && pdev->id < ARRAY_SIZE(efm32_uart_ports))
-			efm32_uart_ports[pdev->id] = NULL;
+		if (line >= 0 && line < ARRAY_SIZE(efm32_uart_ports))
+			efm32_uart_ports[line] = NULL;
 err_get_rxirq:
 err_too_small:
 err_get_base:
@@ -777,11 +779,12 @@ err_get_base:
 static int efm32_uart_remove(struct platform_device *pdev)
 {
 	struct efm32_uart_port *efm_port = platform_get_drvdata(pdev);
+	unsigned int line = efm_port->port.line;
 
 	uart_remove_one_port(&efm32_uart_reg, &efm_port->port);
 
-	if (pdev->id >= 0 && pdev->id < ARRAY_SIZE(efm32_uart_ports))
-		efm32_uart_ports[pdev->id] = NULL;
+	if (line >= 0 && line < ARRAY_SIZE(efm32_uart_ports))
+		efm32_uart_ports[line] = NULL;
 
 	kfree(efm_port);
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] serial/efm32-uart: don't slur over failure in probe_dt
  2013-07-30  8:21   ` Uwe Kleine-König
  2013-07-30  8:23     ` [PATCH 1/2] serial/efm32-uart: don't use pdev->id to determine the port's line Uwe Kleine-König
@ 2013-07-30  8:23     ` Uwe Kleine-König
  1 sibling, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2013-07-30  8:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: kernel, linux-serial

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Forwarded: id:1374177342-23129-1-git-send-email-u.kleine-koenig@pengutronix.de
---
 drivers/tty/serial/efm32-uart.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/efm32-uart.c b/drivers/tty/serial/efm32-uart.c
index ce1ebbb..98adaa1 100644
--- a/drivers/tty/serial/efm32-uart.c
+++ b/drivers/tty/serial/efm32-uart.c
@@ -751,7 +751,8 @@ static int efm32_uart_probe(struct platform_device *pdev)
 
 		if (pdata)
 			efm_port->pdata = *pdata;
-	}
+	} else if (ret < 0)
+		goto err_probe_dt;
 
 	line = efm_port->port.line;
 
@@ -764,6 +765,7 @@ static int efm32_uart_probe(struct platform_device *pdev)
 
 		if (line >= 0 && line < ARRAY_SIZE(efm32_uart_ports))
 			efm32_uart_ports[line] = NULL;
+err_probe_dt:
 err_get_rxirq:
 err_too_small:
 err_get_base:
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] serial/efm32-uart: don't use pdev->id to determine the port's line
  2013-07-30  8:23     ` [PATCH 1/2] serial/efm32-uart: don't use pdev->id to determine the port's line Uwe Kleine-König
@ 2013-07-30  8:34       ` Uwe Kleine-König
  2013-07-30 14:02         ` Greg Kroah-Hartman
  0 siblings, 1 reply; 9+ messages in thread
From: Uwe Kleine-König @ 2013-07-30  8:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: kernel, linux-serial

On Tue, Jul 30, 2013 at 10:23:12AM +0200, Uwe Kleine-König wrote:
> pdev->id is not a valid choice for device-tree probed devices. So use
> the (properly determined) line from efm32_uart_probe consistenly
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Forwarded: id:1374043721-30677-1-git-send-email-u.kleine-koenig@pengutronix.de
I forgot to drop these lines that I use for tracking which patches were
sent for inclusion into mainline. I don't care much, but you might want
to drop them.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] serial/efm32-uart: don't use pdev->id to determine the port's line
  2013-07-30  8:34       ` Uwe Kleine-König
@ 2013-07-30 14:02         ` Greg Kroah-Hartman
  2013-07-30 14:37           ` Uwe Kleine-König
  0 siblings, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2013-07-30 14:02 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: kernel, linux-serial

On Tue, Jul 30, 2013 at 10:34:41AM +0200, Uwe Kleine-König wrote:
> On Tue, Jul 30, 2013 at 10:23:12AM +0200, Uwe Kleine-König wrote:
> > pdev->id is not a valid choice for device-tree probed devices. So use
> > the (properly determined) line from efm32_uart_probe consistenly
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > Forwarded: id:1374043721-30677-1-git-send-email-u.kleine-koenig@pengutronix.de
> I forgot to drop these lines that I use for tracking which patches were
> sent for inclusion into mainline. I don't care much, but you might want
> to drop them.

Please resend so I don't have to hand-edit the messages.  I handle
thousands of patches a month, hand-editing is a pain and slows me
down...

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] serial/efm32-uart: don't use pdev->id to determine the port's line
  2013-07-30 14:02         ` Greg Kroah-Hartman
@ 2013-07-30 14:37           ` Uwe Kleine-König
  2013-07-30 14:51             ` Greg Kroah-Hartman
  0 siblings, 1 reply; 9+ messages in thread
From: Uwe Kleine-König @ 2013-07-30 14:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: kernel, linux-serial

Hi Greg,

On Tue, Jul 30, 2013 at 07:02:50AM -0700, Greg Kroah-Hartman wrote:
> On Tue, Jul 30, 2013 at 10:34:41AM +0200, Uwe Kleine-König wrote:
> > On Tue, Jul 30, 2013 at 10:23:12AM +0200, Uwe Kleine-König wrote:
> > > pdev->id is not a valid choice for device-tree probed devices. So use
> > > the (properly determined) line from efm32_uart_probe consistenly
> > > 
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > Forwarded: id:1374043721-30677-1-git-send-email-u.kleine-koenig@pengutronix.de
> > I forgot to drop these lines that I use for tracking which patches were
> > sent for inclusion into mainline. I don't care much, but you might want
> > to drop them.
> 
> Please resend so I don't have to hand-edit the messages.  I handle
> thousands of patches a month, hand-editing is a pain and slows me
> down...
ok, just resent to you only after doing

	git filter-branch -f --msg-filter 'grep -v "^Forwarded:"' next/master..

(Maybe this is even easier than replying about your pain? No offense
intended, just wondering.)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] serial/efm32-uart: don't use pdev->id to determine the port's line
  2013-07-30 14:37           ` Uwe Kleine-König
@ 2013-07-30 14:51             ` Greg Kroah-Hartman
  0 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2013-07-30 14:51 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: kernel, linux-serial

On Tue, Jul 30, 2013 at 04:37:39PM +0200, Uwe Kleine-König wrote:
> Hi Greg,
> 
> On Tue, Jul 30, 2013 at 07:02:50AM -0700, Greg Kroah-Hartman wrote:
> > On Tue, Jul 30, 2013 at 10:34:41AM +0200, Uwe Kleine-König wrote:
> > > On Tue, Jul 30, 2013 at 10:23:12AM +0200, Uwe Kleine-König wrote:
> > > > pdev->id is not a valid choice for device-tree probed devices. So use
> > > > the (properly determined) line from efm32_uart_probe consistenly
> > > > 
> > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > Forwarded: id:1374043721-30677-1-git-send-email-u.kleine-koenig@pengutronix.de
> > > I forgot to drop these lines that I use for tracking which patches were
> > > sent for inclusion into mainline. I don't care much, but you might want
> > > to drop them.
> > 
> > Please resend so I don't have to hand-edit the messages.  I handle
> > thousands of patches a month, hand-editing is a pain and slows me
> > down...
> ok, just resent to you only after doing
> 
> 	git filter-branch -f --msg-filter 'grep -v "^Forwarded:"' next/master..
> 
> (Maybe this is even easier than replying about your pain? No offense
> intended, just wondering.)

Easier for you, yes :)

But I don't see how that would help me out when applying patches in a
mbox format to a git tree, do you?  What am I missing?

Having to craft a custom grep -v pattern for every message would be a
pain, as people do lots of silly things in patches that need to be
edited out at times...

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-07-30 14:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-18 19:55 [PATCH] serial/efm32-uart: don't slur over failure in probe_dt Uwe Kleine-König
2013-07-26 23:06 ` Greg Kroah-Hartman
2013-07-30  8:21   ` Uwe Kleine-König
2013-07-30  8:23     ` [PATCH 1/2] serial/efm32-uart: don't use pdev->id to determine the port's line Uwe Kleine-König
2013-07-30  8:34       ` Uwe Kleine-König
2013-07-30 14:02         ` Greg Kroah-Hartman
2013-07-30 14:37           ` Uwe Kleine-König
2013-07-30 14:51             ` Greg Kroah-Hartman
2013-07-30  8:23     ` [PATCH 2/2] serial/efm32-uart: don't slur over failure in probe_dt Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).