* [PATCH 0/2] TTY: small adjustments for the ePAPR hypervisor byte channel device driver
@ 2017-04-11 17:00 ` SF Markus Elfring
0 siblings, 0 replies; 6+ messages in thread
From: SF Markus Elfring @ 2017-04-11 17:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 11 Apr 2017 18:54:03 +0200
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Use kcalloc() in ehv_bc_init()
Fix a typo in two comment lines
drivers/tty/ehv_bytechan.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.12.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/2] TTY: small adjustments for the ePAPR hypervisor byte channel device driver
@ 2017-04-11 17:00 ` SF Markus Elfring
0 siblings, 0 replies; 6+ messages in thread
From: SF Markus Elfring @ 2017-04-11 17:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 11 Apr 2017 18:54:03 +0200
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Use kcalloc() in ehv_bc_init()
Fix a typo in two comment lines
drivers/tty/ehv_bytechan.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.12.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] tty-ehv_bytechan: Use kcalloc() in ehv_bc_init()
2017-04-11 17:00 ` SF Markus Elfring
@ 2017-04-11 17:01 ` SF Markus Elfring
-1 siblings, 0 replies; 6+ messages in thread
From: SF Markus Elfring @ 2017-04-11 17:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 11 Apr 2017 18:24:42 +0200
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kcalloc".
This issue was detected by using the Coccinelle software.
* Replace the specification of a data structure by a pointer dereference
to make the corresponding size determination a bit safer according to
the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/tty/ehv_bytechan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index 7ac9bcdf1e61..e17b7c765466 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -757,7 +757,7 @@ static int __init ehv_bc_init(void)
* array, then you can use pointer math (e.g. "bc - bcs") to get its
* tty index.
*/
- bcs = kzalloc(count * sizeof(struct ehv_bc_data), GFP_KERNEL);
+ bcs = kcalloc(count, sizeof(*bcs), GFP_KERNEL);
if (!bcs)
return -ENOMEM;
--
2.12.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/2] tty-ehv_bytechan: Use kcalloc() in ehv_bc_init()
@ 2017-04-11 17:01 ` SF Markus Elfring
0 siblings, 0 replies; 6+ messages in thread
From: SF Markus Elfring @ 2017-04-11 17:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 11 Apr 2017 18:24:42 +0200
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kcalloc".
This issue was detected by using the Coccinelle software.
* Replace the specification of a data structure by a pointer dereference
to make the corresponding size determination a bit safer according to
the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/tty/ehv_bytechan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index 7ac9bcdf1e61..e17b7c765466 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -757,7 +757,7 @@ static int __init ehv_bc_init(void)
* array, then you can use pointer math (e.g. "bc - bcs") to get its
* tty index.
*/
- bcs = kzalloc(count * sizeof(struct ehv_bc_data), GFP_KERNEL);
+ bcs = kcalloc(count, sizeof(*bcs), GFP_KERNEL);
if (!bcs)
return -ENOMEM;
--
2.12.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] tty-ehv_bytechan: Fix a typo in two comment lines
2017-04-11 17:00 ` SF Markus Elfring
@ 2017-04-11 17:02 ` SF Markus Elfring
-1 siblings, 0 replies; 6+ messages in thread
From: SF Markus Elfring @ 2017-04-11 17:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, trivial; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 11 Apr 2017 18:40:37 +0200
Add a missing character in function descriptions.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/tty/ehv_bytechan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index e17b7c765466..3dcd59cfffe9 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -328,7 +328,7 @@ console_initcall(ehv_bc_console_init);
/******************************** TTY DRIVER ********************************/
/*
- * byte channel receive interupt handler
+ * byte channel receive interrupt handler
*
* This ISR is called whenever data is available on a byte channel.
*/
@@ -428,7 +428,7 @@ static void ehv_bc_tx_dequeue(struct ehv_bc_data *bc)
}
/*
- * byte channel transmit interupt handler
+ * byte channel transmit interrupt handler
*
* This ISR is called whenever space becomes available for transmitting
* characters on a byte channel.
--
2.12.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] tty-ehv_bytechan: Fix a typo in two comment lines
@ 2017-04-11 17:02 ` SF Markus Elfring
0 siblings, 0 replies; 6+ messages in thread
From: SF Markus Elfring @ 2017-04-11 17:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, trivial; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 11 Apr 2017 18:40:37 +0200
Add a missing character in function descriptions.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/tty/ehv_bytechan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index e17b7c765466..3dcd59cfffe9 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -328,7 +328,7 @@ console_initcall(ehv_bc_console_init);
/******************************** TTY DRIVER ********************************/
/*
- * byte channel receive interupt handler
+ * byte channel receive interrupt handler
*
* This ISR is called whenever data is available on a byte channel.
*/
@@ -428,7 +428,7 @@ static void ehv_bc_tx_dequeue(struct ehv_bc_data *bc)
}
/*
- * byte channel transmit interupt handler
+ * byte channel transmit interrupt handler
*
* This ISR is called whenever space becomes available for transmitting
* characters on a byte channel.
--
2.12.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-04-11 17:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 17:00 [PATCH 0/2] TTY: small adjustments for the ePAPR hypervisor byte channel device driver SF Markus Elfring
2017-04-11 17:00 ` SF Markus Elfring
2017-04-11 17:01 ` [PATCH 1/2] tty-ehv_bytechan: Use kcalloc() in ehv_bc_init() SF Markus Elfring
2017-04-11 17:01 ` SF Markus Elfring
2017-04-11 17:02 ` [PATCH 2/2] tty-ehv_bytechan: Fix a typo in two comment lines SF Markus Elfring
2017-04-11 17:02 ` SF Markus Elfring
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.