2017-12-07 20:18:50

by SF Markus Elfring

[permalink] [raw]
Subject: [PATCH 0/2] 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(-)

--
2.15.1


2017-12-07 20:20:39

by SF Markus Elfring

[permalink] [raw]
Subject: [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.

Signed-off-by: Markus Elfring <[email protected]>
---
drivers/tty/serial/serial-tegra.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index af2a29cfbbe9..46233c5974f1 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -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)
--
2.15.1

2017-12-07 20:21:39

by SF Markus Elfring

[permalink] [raw]
Subject: [PATCH 2/2] serial: tegra: Fix a typo in a comment line

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

Delete a duplicate character in a word of this description.

Signed-off-by: Markus Elfring <[email protected]>
---
drivers/tty/serial/serial-tegra.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index 46233c5974f1..a731b2d61d3e 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -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
--
2.15.1

2017-12-08 09:39:30

by Laxman Dewangan

[permalink] [raw]
Subject: Re: [PATCH 2/2] serial: tegra: Fix a typo in a comment line



On Friday 08 December 2017 01:51 AM, SF Markus Elfring wrote:
> From: Markus Elfring <[email protected]>
> Date: Thu, 7 Dec 2017 21:06:25 +0100
>
> Delete a duplicate character in a word of this description.
>

Acked-by: Laxman Dewangan <[email protected]>

2017-12-08 10:06:52

by Laxman Dewangan

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



On Friday 08 December 2017 01:49 AM, SF Markus Elfring wrote:
> 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.
>

Acked-by: Laxman Dewangan <[email protected]>

2017-12-08 10:42:13

by Jon Hunter

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


On 08/12/17 09:37, Laxman Dewangan wrote:
> On Friday 08 December 2017 01:49 AM, SF Markus Elfring wrote:
>> 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.
>>
>
> Acked-by: Laxman Dewangan <[email protected]>

Acked-by: Jon Hunter <[email protected]>

Thanks!
Jon

--
nvpublic

2017-12-08 10:42:42

by Jon Hunter

[permalink] [raw]
Subject: Re: [PATCH 2/2] serial: tegra: Fix a typo in a comment line


On 08/12/17 09:37, Laxman Dewangan wrote:
>
>
> On Friday 08 December 2017 01:51 AM, SF Markus Elfring wrote:
>> From: Markus Elfring <[email protected]>
>> Date: Thu, 7 Dec 2017 21:06:25 +0100
>>
>> Delete a duplicate character in a word of this description.
>>
>
> Acked-by: Laxman Dewangan <[email protected]>

Acked-by: Jon Hunter <[email protected]>

Thanks!
Jon

--
nvpublic