* [PATCH 0/3] Input-apbps2: Adjustments for two function implementations
@ 2018-01-24 16:33 ` SF Markus Elfring
0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2018-01-24 16:33 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 Jan 2018 17:30:12 +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
Improve a size determination
Fix typos in a comment
drivers/input/serio/apbps2.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--
2.16.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/3] Input-apbps2: Adjustments for two function implementations
@ 2018-01-24 16:33 ` SF Markus Elfring
0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2018-01-24 16:33 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 Jan 2018 17:30:12 +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
Improve a size determination
Fix typos in a comment
drivers/input/serio/apbps2.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--
2.16.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] Input: apbps2: Delete an error message for a failed memory allocation in apbps2_of_probe()
2018-01-24 16:33 ` SF Markus Elfring
@ 2018-01-24 16:34 ` SF Markus Elfring
-1 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2018-01-24 16:34 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 Jan 2018 16:43:04 +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/input/serio/apbps2.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c
index 45d4e08ca4f8..9b75c4e1bc13 100644
--- a/drivers/input/serio/apbps2.c
+++ b/drivers/input/serio/apbps2.c
@@ -140,10 +140,8 @@ static int apbps2_of_probe(struct platform_device *ofdev)
struct resource *res;
priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL);
- if (!priv) {
- dev_err(&ofdev->dev, "memory allocation failed\n");
+ if (!priv)
return -ENOMEM;
- }
/* Find Device Address */
res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
--
2.16.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/3] Input: apbps2: Delete an error message for a failed memory allocation in apbps2_of_probe
@ 2018-01-24 16:34 ` SF Markus Elfring
0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2018-01-24 16:34 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 Jan 2018 16:43:04 +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/input/serio/apbps2.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c
index 45d4e08ca4f8..9b75c4e1bc13 100644
--- a/drivers/input/serio/apbps2.c
+++ b/drivers/input/serio/apbps2.c
@@ -140,10 +140,8 @@ static int apbps2_of_probe(struct platform_device *ofdev)
struct resource *res;
priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL);
- if (!priv) {
- dev_err(&ofdev->dev, "memory allocation failed\n");
+ if (!priv)
return -ENOMEM;
- }
/* Find Device Address */
res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
--
2.16.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] Input: apbps2: Improve a size determination in apbps2_of_probe()
2018-01-24 16:33 ` SF Markus Elfring
@ 2018-01-24 16:35 ` SF Markus Elfring
-1 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2018-01-24 16:35 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 Jan 2018 17:15:39 +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.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/input/serio/apbps2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c
index 9b75c4e1bc13..a1c64df3b6cb 100644
--- a/drivers/input/serio/apbps2.c
+++ b/drivers/input/serio/apbps2.c
@@ -170,7 +170,7 @@ static int apbps2_of_probe(struct platform_device *ofdev)
/* Set reload register to core freq in kHz/10 */
iowrite32be(freq_hz / 10000, &priv->regs->reload);
- priv->io = kzalloc(sizeof(struct serio), GFP_KERNEL);
+ priv->io = kzalloc(sizeof(*priv->io), GFP_KERNEL);
if (!priv->io)
return -ENOMEM;
--
2.16.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] Input: apbps2: Improve a size determination in apbps2_of_probe()
@ 2018-01-24 16:35 ` SF Markus Elfring
0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2018-01-24 16:35 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 Jan 2018 17:15:39 +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.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/input/serio/apbps2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c
index 9b75c4e1bc13..a1c64df3b6cb 100644
--- a/drivers/input/serio/apbps2.c
+++ b/drivers/input/serio/apbps2.c
@@ -170,7 +170,7 @@ static int apbps2_of_probe(struct platform_device *ofdev)
/* Set reload register to core freq in kHz/10 */
iowrite32be(freq_hz / 10000, &priv->regs->reload);
- priv->io = kzalloc(sizeof(struct serio), GFP_KERNEL);
+ priv->io = kzalloc(sizeof(*priv->io), GFP_KERNEL);
if (!priv->io)
return -ENOMEM;
--
2.16.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] Input: apbps2: Fix typos in a comment
2018-01-24 16:33 ` SF Markus Elfring
@ 2018-01-24 16:36 ` SF Markus Elfring
-1 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2018-01-24 16:36 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov; +Cc: LKML, kernel-janitors, trivial
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 Jan 2018 17:21:18 +0100
Adjust two words in this description.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/input/serio/apbps2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c
index a1c64df3b6cb..baa93bad993c 100644
--- a/drivers/input/serio/apbps2.c
+++ b/drivers/input/serio/apbps2.c
@@ -117,7 +117,7 @@ static int apbps2_open(struct serio *io)
while ((ioread32be(&priv->regs->status) & APBPS2_STATUS_DR) && --limit)
tmp = ioread32be(&priv->regs->data);
- /* Enable reciever and it's interrupt */
+ /* Enable receiver and its interrupt */
iowrite32be(APBPS2_CTRL_RE | APBPS2_CTRL_RI, &priv->regs->ctrl);
return 0;
--
2.16.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] Input: apbps2: Fix typos in a comment
@ 2018-01-24 16:36 ` SF Markus Elfring
0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2018-01-24 16:36 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov; +Cc: LKML, kernel-janitors, trivial
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 Jan 2018 17:21:18 +0100
Adjust two words in this description.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/input/serio/apbps2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c
index a1c64df3b6cb..baa93bad993c 100644
--- a/drivers/input/serio/apbps2.c
+++ b/drivers/input/serio/apbps2.c
@@ -117,7 +117,7 @@ static int apbps2_open(struct serio *io)
while ((ioread32be(&priv->regs->status) & APBPS2_STATUS_DR) && --limit)
tmp = ioread32be(&priv->regs->data);
- /* Enable reciever and it's interrupt */
+ /* Enable receiver and its interrupt */
iowrite32be(APBPS2_CTRL_RE | APBPS2_CTRL_RI, &priv->regs->ctrl);
return 0;
--
2.16.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-01-24 16:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 16:33 [PATCH 0/3] Input-apbps2: Adjustments for two function implementations SF Markus Elfring
2018-01-24 16:33 ` SF Markus Elfring
2018-01-24 16:34 ` [PATCH 1/3] Input: apbps2: Delete an error message for a failed memory allocation in apbps2_of_probe() SF Markus Elfring
2018-01-24 16:34 ` [PATCH 1/3] Input: apbps2: Delete an error message for a failed memory allocation in apbps2_of_probe SF Markus Elfring
2018-01-24 16:35 ` [PATCH 2/3] Input: apbps2: Improve a size determination in apbps2_of_probe() SF Markus Elfring
2018-01-24 16:35 ` SF Markus Elfring
2018-01-24 16:36 ` [PATCH 3/3] Input: apbps2: Fix typos in a comment SF Markus Elfring
2018-01-24 16:36 ` 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.