Pinctrl-single: Adjustments for two function implementations
Subsystems (4)
cover Pinctrl-single: Adjustments for two function implementations
From: Markus Elfring <[email protected]>
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(-)
Signature · 1 line
2.15.1
PATCH 1/2 pinctrl: single: Delete an error message for a failed memory allocation in pcs_probe()
From: Markus Elfring <[email protected]>
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.
--- drivers/pinctrl/pinctrl-single.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/pinctrl/pinctrl-single.c +2 -3
@@ -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);
Signature · 1 line
2.15.1
Re: [PATCH 1/2] pinctrl: single: Delete an error message for a failed memory allocation in pcs_probe()
Quoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Mon, 25 Dec 2017 11:27:55 +0100Omit 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 <[email protected]>
Patch applied.
Yours,
Linus Walleij
PATCH 2/2 pinctrl: single: Delete an unnecessary return statement in pcs_irq_chain_handler()
In reply to SF Markus ElfringFrom: Markus Elfring <[email protected]>
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.
--- drivers/pinctrl/pinctrl-single.c | 2 -- 1 file changed, 2 deletions(-)
drivers/pinctrl/pinctrl-single.c +0 -2
@@ -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,
Signature · 1 line
2.15.1
Re: [PATCH 2/2] pinctrl: single: Delete an unnecessary return statement in pcs_irq_chain_handler()
Quoted 10 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Mon, 25 Dec 2017 11:35:44 +0100The 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 <[email protected]>
Patch applied.
Yours,
Linus Walleij