* [PATCH 0/2] Input-zforce_ts: Adjustments for two function implementations
@ 2018-01-20 20:15 SF Markus Elfring
2018-01-20 20:18 ` [PATCH 1/2] Input: zforce_ts: Delete an error message for a failed memory allocation in zforce_parse_dt() SF Markus Elfring
2018-01-20 20:20 ` [PATCH 2/2] Input: zforce_ts: Delete an unnecessary return statement in zforce_input_close() SF Markus Elfring
0 siblings, 2 replies; 5+ messages in thread
From: SF Markus Elfring @ 2018-01-20 20:15 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov, Heiko Stübner; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 20 Jan 2018 21:07:42 +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 zforce_parse_dt()
Delete an unnecessary return statement in zforce_input_close()
drivers/input/touchscreen/zforce_ts.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
--
2.15.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] Input: zforce_ts: Delete an error message for a failed memory allocation in zforce_parse_dt()
2018-01-20 20:15 [PATCH 0/2] Input-zforce_ts: Adjustments for two function implementations SF Markus Elfring
@ 2018-01-20 20:18 ` SF Markus Elfring
2018-01-20 20:26 ` Heiko Stuebner
2018-01-20 20:20 ` [PATCH 2/2] Input: zforce_ts: Delete an unnecessary return statement in zforce_input_close() SF Markus Elfring
1 sibling, 1 reply; 5+ messages in thread
From: SF Markus Elfring @ 2018-01-20 20:18 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov, Heiko Stübner; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 20 Jan 2018 20:36:33 +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/touchscreen/zforce_ts.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index 7b3845aa5983..9fb6b3f201f9 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -722,10 +722,8 @@ static struct zforce_ts_platdata *zforce_parse_dt(struct device *dev)
return ERR_PTR(-ENOENT);
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata) {
- dev_err(dev, "failed to allocate platform data\n");
+ if (!pdata)
return ERR_PTR(-ENOMEM);
- }
if (of_property_read_u32(np, "x-size", &pdata->x_max)) {
dev_err(dev, "failed to get x-size property\n");
--
2.15.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] Input: zforce_ts: Delete an unnecessary return statement in zforce_input_close()
2018-01-20 20:15 [PATCH 0/2] Input-zforce_ts: Adjustments for two function implementations SF Markus Elfring
2018-01-20 20:18 ` [PATCH 1/2] Input: zforce_ts: Delete an error message for a failed memory allocation in zforce_parse_dt() SF Markus Elfring
@ 2018-01-20 20:20 ` SF Markus Elfring
2018-01-20 20:27 ` Heiko Stuebner
1 sibling, 1 reply; 5+ messages in thread
From: SF Markus Elfring @ 2018-01-20 20:20 UTC (permalink / raw)
To: linux-input, Dmitry Torokhov, Heiko Stübner; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 20 Jan 2018 20:43:06 +0100
The script "checkpatch.pl" pointed information out like the following.
WARNING: void function return statements are not generally useful
Thus remove such a statement in the affected function.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/input/touchscreen/zforce_ts.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index 9fb6b3f201f9..e462a152b4e6 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -612,8 +612,6 @@ static void zforce_input_close(struct input_dev *dev)
ret = zforce_stop(ts);
if (ret)
dev_warn(&client->dev, "stopping zforce failed\n");
-
- return;
}
static int __maybe_unused zforce_suspend(struct device *dev)
--
2.15.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Input: zforce_ts: Delete an error message for a failed memory allocation in zforce_parse_dt()
2018-01-20 20:18 ` [PATCH 1/2] Input: zforce_ts: Delete an error message for a failed memory allocation in zforce_parse_dt() SF Markus Elfring
@ 2018-01-20 20:26 ` Heiko Stuebner
0 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2018-01-20 20:26 UTC (permalink / raw)
To: SF Markus Elfring; +Cc: linux-input, Dmitry Torokhov, LKML, kernel-janitors
Am Samstag, 20. Januar 2018, 21:18:45 CET schrieb SF Markus Elfring:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 20 Jan 2018 20:36:33 +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>
if it helps
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Input: zforce_ts: Delete an unnecessary return statement in zforce_input_close()
2018-01-20 20:20 ` [PATCH 2/2] Input: zforce_ts: Delete an unnecessary return statement in zforce_input_close() SF Markus Elfring
@ 2018-01-20 20:27 ` Heiko Stuebner
0 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2018-01-20 20:27 UTC (permalink / raw)
To: SF Markus Elfring; +Cc: linux-input, Dmitry Torokhov, LKML, kernel-janitors
Am Samstag, 20. Januar 2018, 21:20:38 CET schrieb SF Markus Elfring:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 20 Jan 2018 20:43:06 +0100
>
> The script "checkpatch.pl" pointed information out like the following.
>
> WARNING: void function return statements are not generally useful
>
> Thus remove such a statement in the affected function.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
if it helps
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-20 20:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-20 20:15 [PATCH 0/2] Input-zforce_ts: Adjustments for two function implementations SF Markus Elfring
2018-01-20 20:18 ` [PATCH 1/2] Input: zforce_ts: Delete an error message for a failed memory allocation in zforce_parse_dt() SF Markus Elfring
2018-01-20 20:26 ` Heiko Stuebner
2018-01-20 20:20 ` [PATCH 2/2] Input: zforce_ts: Delete an unnecessary return statement in zforce_input_close() SF Markus Elfring
2018-01-20 20:27 ` Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).