Skip to contentSkip to conversation

serial-Tegra: Adjustments for two function implementations

PATCH In review SF Markus Elfring 3 participants 7 messages Dec 7, 2017 – Dec 8, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover serial-Tegra: Adjustments for two function implementations

From: Markus Elfring <[email protected]>
Date: Thu, 7 Dec 2017 21:12:34 +0100

Two update suggestions were taken into account
from static source code analysis.

Markus Elfring (2):
Delete an error message for a failed memory allocation in tegra_uart_probe() Fix a typo in a comment line

 drivers/tty/serial/serial-tegra.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Signature · 1 line
2.15.1
#1 lore raw

PATCH 1/2 serial: tegra: Delete an error message for a failed memory allocation in tegra_uart_probe()

From: Markus Elfring <[email protected]>
Date: Thu, 7 Dec 2017 21:00:05 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 drivers/tty/serial/serial-tegra.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/serial-tegra.c +1 -3
index af2a29cfbbe9..46233c5974f1 100644
@@ -1265,10 +1265,8 @@ static int tegra_uart_probe(struct platform_device *pdev)
 	cdata = match->data;
 
 	tup = devm_kzalloc(&pdev->dev, sizeof(*tup), GFP_KERNEL);
-	if (!tup) {
-		dev_err(&pdev->dev, "Failed to allocate memory for tup\n");
+	if (!tup)
 		return -ENOMEM;
-	}
 
 	ret = tegra_uart_parse_dt(pdev, tup);
 	if (ret < 0)
Signature · 1 line
2.15.1
#4 lore raw

PATCH 2/2 serial: tegra: Fix a typo in a comment line

In reply to SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Thu, 7 Dec 2017 21:06:25 +0100

Delete a duplicate character in a word of this description.

---
 drivers/tty/serial/serial-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/serial-tegra.c +1 -1
index 46233c5974f1..a731b2d61d3e 100644
@@ -888,7 +888,7 @@ static int tegra_uart_hw_init(struct tegra_uart_port *tup)
 	 * EORD is different interrupt than RX_TIMEOUT - RX_TIMEOUT occurs when
 	 * the DATA is sitting in the FIFO and couldn't be transferred to the
 	 * DMA as the DMA size alignment(4 bytes) is not met. EORD will be
-	 * triggered when there is a pause of the incomming data stream for 4
+	 * triggered when there is a pause of the incoming data stream for 4
 	 * characters long.
 	 *
 	 * For pauses in the data which is not aligned to 4 bytes, we get
Signature · 1 line
2.15.1
maintainer Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] serial: tegra: Delete an error message for a failed memory allocation in tegra_uart_probe()

In reply to SF Markus Elfring
Quoted 7 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Thu, 7 Dec 2017 21:00:05 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

maintainer Acked-by
#3 lore raw

Re: [PATCH 1/2] serial: tegra: Delete an error message for a failed memory allocation in tegra_uart_probe()

In reply to Laxman Dewangan
Quoted 10 lines · Laxman Dewangan
Quoted 7 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Thu, 7 Dec 2017 21:00:05 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Thanks!
Jon

Signature · 1 line
nvpublic