* [PATCH 0/2] Pinctrl-single: Adjustments for two function implementations
@ 2017-12-25 13:05 SF Markus Elfring
2017-12-25 13:06 ` [PATCH 1/2] pinctrl: single: Delete an error message for a failed memory allocation in pcs_probe() SF Markus Elfring
2017-12-25 13:07 ` [PATCH 2/2] pinctrl: single: Delete an unnecessary return statement in pcs_irq_chain_handler() SF Markus Elfring
0 siblings, 2 replies; 5+ messages in thread
From: SF Markus Elfring @ 2017-12-25 13:05 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 25 Dec 2017 14:01:23 +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 pcs_probe()
Delete an unnecessary return statement in pcs_irq_chain_handler()
drivers/pinctrl/pinctrl-single.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
--
2.15.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] pinctrl: single: Delete an error message for a failed memory allocation in pcs_probe()
2017-12-25 13:05 [PATCH 0/2] Pinctrl-single: Adjustments for two function implementations SF Markus Elfring
@ 2017-12-25 13:06 ` SF Markus Elfring
2018-01-02 8:49 ` Linus Walleij
2017-12-25 13:07 ` [PATCH 2/2] pinctrl: single: Delete an unnecessary return statement in pcs_irq_chain_handler() SF Markus Elfring
1 sibling, 1 reply; 5+ messages in thread
From: SF Markus Elfring @ 2017-12-25 13:06 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 25 Dec 2017 11:27:55 +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/pinctrl/pinctrl-single.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index e6cd8de793e2..f5ff2111481d 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1646,10 +1646,9 @@ static int pcs_probe(struct platform_device *pdev)
return -EINVAL;
pcs = devm_kzalloc(&pdev->dev, sizeof(*pcs), GFP_KERNEL);
- if (!pcs) {
- dev_err(&pdev->dev, "could not allocate\n");
+ if (!pcs)
return -ENOMEM;
- }
+
pcs->dev = &pdev->dev;
pcs->np = np;
raw_spin_lock_init(&pcs->lock);
--
2.15.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] pinctrl: single: Delete an unnecessary return statement in pcs_irq_chain_handler()
2017-12-25 13:05 [PATCH 0/2] Pinctrl-single: Adjustments for two function implementations SF Markus Elfring
2017-12-25 13:06 ` [PATCH 1/2] pinctrl: single: Delete an error message for a failed memory allocation in pcs_probe() SF Markus Elfring
@ 2017-12-25 13:07 ` SF Markus Elfring
2018-01-02 8:50 ` Linus Walleij
1 sibling, 1 reply; 5+ messages in thread
From: SF Markus Elfring @ 2017-12-25 13:07 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 25 Dec 2017 11:35:44 +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/pinctrl/pinctrl-single.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index f5ff2111481d..16689195e481 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1459,8 +1459,6 @@ static void pcs_irq_chain_handler(struct irq_desc *desc)
pcs_irq_handle(pcs_soc);
/* REVISIT: export and add handle_bad_irq(irq, desc)? */
chained_irq_exit(chip, desc);
-
- return;
}
static int pcs_irqdomain_map(struct irq_domain *d, unsigned int irq,
--
2.15.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 1/2] pinctrl: single: Delete an error message for a failed memory allocation in pcs_probe()
2017-12-25 13:06 ` [PATCH 1/2] pinctrl: single: Delete an error message for a failed memory allocation in pcs_probe() SF Markus Elfring
@ 2018-01-02 8:49 ` Linus Walleij
0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2018-01-02 8:49 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Dec 25, 2017 at 2:06 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 25 Dec 2017 11:27:55 +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>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] pinctrl: single: Delete an unnecessary return statement in pcs_irq_chain_handler()
2017-12-25 13:07 ` [PATCH 2/2] pinctrl: single: Delete an unnecessary return statement in pcs_irq_chain_handler() SF Markus Elfring
@ 2018-01-02 8:50 ` Linus Walleij
0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2018-01-02 8:50 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Dec 25, 2017 at 2:07 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 25 Dec 2017 11:35:44 +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>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-02 8:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-25 13:05 [PATCH 0/2] Pinctrl-single: Adjustments for two function implementations SF Markus Elfring
2017-12-25 13:06 ` [PATCH 1/2] pinctrl: single: Delete an error message for a failed memory allocation in pcs_probe() SF Markus Elfring
2018-01-02 8:49 ` Linus Walleij
2017-12-25 13:07 ` [PATCH 2/2] pinctrl: single: Delete an unnecessary return statement in pcs_irq_chain_handler() SF Markus Elfring
2018-01-02 8:50 ` Linus Walleij
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).