* [PATCH 0/3] tty/serial/ucc_uart: Adjustments for two functions
@ 2017-12-06 21:10 ` SF Markus Elfring
0 siblings, 0 replies; 10+ messages in thread
From: SF Markus Elfring @ 2017-12-06 21:10 UTC (permalink / raw)
To: linuxppc-dev, linux-serial, Greg Kroah-Hartman, Jiri Slaby, Timur Tabi
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Dec 2017 22:06:44 +0100
Three update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Delete an error message for a failed memory allocation in ucc_uart_probe()
Improve a size determination in ucc_uart_probe()
Fix a typo in a comment line
drivers/tty/serial/ucc_uart.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--
2.15.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 0/3] tty/serial/ucc_uart: Adjustments for two functions
@ 2017-12-06 21:10 ` SF Markus Elfring
0 siblings, 0 replies; 10+ messages in thread
From: SF Markus Elfring @ 2017-12-06 21:10 UTC (permalink / raw)
To: linuxppc-dev, linux-serial, Greg Kroah-Hartman, Jiri Slaby, Timur Tabi
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Dec 2017 22:06:44 +0100
Three update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Delete an error message for a failed memory allocation in ucc_uart_probe()
Improve a size determination in ucc_uart_probe()
Fix a typo in a comment line
drivers/tty/serial/ucc_uart.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--
2.15.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] tty/serial/ucc_uart: Delete an error message for a failed memory allocation in ucc_uart_probe()
2017-12-06 21:10 ` SF Markus Elfring
@ 2017-12-06 21:11 ` SF Markus Elfring
-1 siblings, 0 replies; 10+ messages in thread
From: SF Markus Elfring @ 2017-12-06 21:11 UTC (permalink / raw)
To: linuxppc-dev, linux-serial, Greg Kroah-Hartman, Jiri Slaby, Timur Tabi
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Dec 2017 21:41:14 +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 <elfring@users.sourceforge.net>
---
drivers/tty/serial/ucc_uart.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 2b6376e6e5ad..48364f0eba72 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1254,10 +1254,8 @@ static int ucc_uart_probe(struct platform_device *ofdev)
}
qe_port = kzalloc(sizeof(struct uart_qe_port), GFP_KERNEL);
- if (!qe_port) {
- dev_err(&ofdev->dev, "can't allocate QE port structure\n");
+ if (!qe_port)
return -ENOMEM;
- }
/* Search for IRQ and mapbase */
ret = of_address_to_resource(np, 0, &res);
--
2.15.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 1/3] tty/serial/ucc_uart: Delete an error message for a failed memory allocation in ucc_uart_
@ 2017-12-06 21:11 ` SF Markus Elfring
0 siblings, 0 replies; 10+ messages in thread
From: SF Markus Elfring @ 2017-12-06 21:11 UTC (permalink / raw)
To: linuxppc-dev, linux-serial, Greg Kroah-Hartman, Jiri Slaby, Timur Tabi
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Dec 2017 21:41:14 +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 <elfring@users.sourceforge.net>
---
drivers/tty/serial/ucc_uart.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 2b6376e6e5ad..48364f0eba72 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1254,10 +1254,8 @@ static int ucc_uart_probe(struct platform_device *ofdev)
}
qe_port = kzalloc(sizeof(struct uart_qe_port), GFP_KERNEL);
- if (!qe_port) {
- dev_err(&ofdev->dev, "can't allocate QE port structure\n");
+ if (!qe_port)
return -ENOMEM;
- }
/* Search for IRQ and mapbase */
ret = of_address_to_resource(np, 0, &res);
--
2.15.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] tty/serial/ucc_uart: Improve a size determination in ucc_uart_probe()
2017-12-06 21:10 ` SF Markus Elfring
@ 2017-12-06 21:12 ` SF Markus Elfring
-1 siblings, 0 replies; 10+ messages in thread
From: SF Markus Elfring @ 2017-12-06 21:12 UTC (permalink / raw)
To: linuxppc-dev, linux-serial, Greg Kroah-Hartman, Jiri Slaby, Timur Tabi
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Dec 2017 21:45:32 +0100
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/tty/serial/ucc_uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 48364f0eba72..a9ce652899aa 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1253,7 +1253,7 @@ static int ucc_uart_probe(struct platform_device *ofdev)
}
}
- qe_port = kzalloc(sizeof(struct uart_qe_port), GFP_KERNEL);
+ qe_port = kzalloc(sizeof(*qe_port), GFP_KERNEL);
if (!qe_port)
return -ENOMEM;
--
2.15.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] tty/serial/ucc_uart: Improve a size determination in ucc_uart_probe()
@ 2017-12-06 21:12 ` SF Markus Elfring
0 siblings, 0 replies; 10+ messages in thread
From: SF Markus Elfring @ 2017-12-06 21:12 UTC (permalink / raw)
To: linuxppc-dev, linux-serial, Greg Kroah-Hartman, Jiri Slaby, Timur Tabi
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Dec 2017 21:45:32 +0100
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/tty/serial/ucc_uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 48364f0eba72..a9ce652899aa 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1253,7 +1253,7 @@ static int ucc_uart_probe(struct platform_device *ofdev)
}
}
- qe_port = kzalloc(sizeof(struct uart_qe_port), GFP_KERNEL);
+ qe_port = kzalloc(sizeof(*qe_port), GFP_KERNEL);
if (!qe_port)
return -ENOMEM;
--
2.15.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] tty/serial/ucc_uart: Fix a typo in a comment line
2017-12-06 21:10 ` SF Markus Elfring
@ 2017-12-06 21:14 ` SF Markus Elfring
-1 siblings, 0 replies; 10+ messages in thread
From: SF Markus Elfring @ 2017-12-06 21:14 UTC (permalink / raw)
To: linuxppc-dev, linux-serial, Greg Kroah-Hartman, Jiri Slaby, Timur Tabi
Cc: LKML, kernel-janitors, trivial
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Dec 2017 21:56:28 +0100
Add a missing character in a function name of this description.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/tty/serial/ucc_uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index a9ce652899aa..d0f139d897a2 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1154,7 +1154,7 @@ static unsigned int soc_info(unsigned int *rev_h, unsigned int *rev_l)
}
/*
- * requst_firmware_nowait() callback function
+ * request_firmware_nowait() callback function
*
* This function is called by the kernel when a firmware is made available,
* or if it times out waiting for the firmware.
--
2.15.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] tty/serial/ucc_uart: Fix a typo in a comment line
@ 2017-12-06 21:14 ` SF Markus Elfring
0 siblings, 0 replies; 10+ messages in thread
From: SF Markus Elfring @ 2017-12-06 21:14 UTC (permalink / raw)
To: linuxppc-dev, linux-serial, Greg Kroah-Hartman, Jiri Slaby, Timur Tabi
Cc: LKML, kernel-janitors, trivial
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Dec 2017 21:56:28 +0100
Add a missing character in a function name of this description.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/tty/serial/ucc_uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index a9ce652899aa..d0f139d897a2 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1154,7 +1154,7 @@ static unsigned int soc_info(unsigned int *rev_h, unsigned int *rev_l)
}
/*
- * requst_firmware_nowait() callback function
+ * request_firmware_nowait() callback function
*
* This function is called by the kernel when a firmware is made available,
* or if it times out waiting for the firmware.
--
2.15.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] tty/serial/ucc_uart: Adjustments for two functions
2017-12-06 21:10 ` SF Markus Elfring
@ 2017-12-06 22:22 ` Timur Tabi
-1 siblings, 0 replies; 10+ messages in thread
From: Timur Tabi @ 2017-12-06 22:22 UTC (permalink / raw)
To: SF Markus Elfring, linuxppc-dev, linux-serial,
Greg Kroah-Hartman, Jiri Slaby
Cc: LKML, kernel-janitors
On 12/06/2017 03:10 PM, SF Markus Elfring wrote:
>
> Three update suggestions were taken into account
> from static source code analysis.
>
> Markus Elfring (3):
> Delete an error message for a failed memory allocation in ucc_uart_probe()
> Improve a size determination in ucc_uart_probe()
> Fix a typo in a comment line
All three:
Acked-by: Timur Tabi <timur@tabi.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] tty/serial/ucc_uart: Adjustments for two functions
@ 2017-12-06 22:22 ` Timur Tabi
0 siblings, 0 replies; 10+ messages in thread
From: Timur Tabi @ 2017-12-06 22:22 UTC (permalink / raw)
To: SF Markus Elfring, linuxppc-dev, linux-serial,
Greg Kroah-Hartman, Jiri Slaby
Cc: LKML, kernel-janitors
On 12/06/2017 03:10 PM, SF Markus Elfring wrote:
>
> Three update suggestions were taken into account
> from static source code analysis.
>
> Markus Elfring (3):
> Delete an error message for a failed memory allocation in ucc_uart_probe()
> Improve a size determination in ucc_uart_probe()
> Fix a typo in a comment line
All three:
Acked-by: Timur Tabi <timur@tabi.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-12-06 22:22 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 21:10 [PATCH 0/3] tty/serial/ucc_uart: Adjustments for two functions SF Markus Elfring
2017-12-06 21:10 ` SF Markus Elfring
2017-12-06 21:11 ` [PATCH 1/3] tty/serial/ucc_uart: Delete an error message for a failed memory allocation in ucc_uart_probe() SF Markus Elfring
2017-12-06 21:11 ` [PATCH 1/3] tty/serial/ucc_uart: Delete an error message for a failed memory allocation in ucc_uart_ SF Markus Elfring
2017-12-06 21:12 ` [PATCH 2/3] tty/serial/ucc_uart: Improve a size determination in ucc_uart_probe() SF Markus Elfring
2017-12-06 21:12 ` SF Markus Elfring
2017-12-06 21:14 ` [PATCH 3/3] tty/serial/ucc_uart: Fix a typo in a comment line SF Markus Elfring
2017-12-06 21:14 ` SF Markus Elfring
2017-12-06 22:22 ` [PATCH 0/3] tty/serial/ucc_uart: Adjustments for two functions Timur Tabi
2017-12-06 22:22 ` Timur Tabi
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.