* [PATCH 0/2] versatile clock: Adjustments for icst_clk_setup()
@ 2017-09-27 19:38 SF Markus Elfring
2017-09-27 19:39 ` [PATCH 1/2] clk/versatile: Delete two error messages for a failed memory allocation in icst_clk_setup() SF Markus Elfring
2017-09-27 19:40 ` [PATCH 2/2] clk/versatile: Improve a size determination " SF Markus Elfring
0 siblings, 2 replies; 7+ messages in thread
From: SF Markus Elfring @ 2017-09-27 19:38 UTC (permalink / raw)
To: linux-clk, Linus Walleij, Michael Turquette, Stephen Boyd
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 27 Sep 2017 21:34:43 +0200
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Delete two error messages for a failed memory allocation
Improve a size determination
drivers/clk/versatile/clk-icst.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
--
2.14.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] clk/versatile: Delete two error messages for a failed memory allocation in icst_clk_setup()
2017-09-27 19:38 [PATCH 0/2] versatile clock: Adjustments for icst_clk_setup() SF Markus Elfring
@ 2017-09-27 19:39 ` SF Markus Elfring
2017-10-03 20:25 ` Linus Walleij
2017-11-14 1:59 ` Stephen Boyd
2017-09-27 19:40 ` [PATCH 2/2] clk/versatile: Improve a size determination " SF Markus Elfring
1 sibling, 2 replies; 7+ messages in thread
From: SF Markus Elfring @ 2017-09-27 19:39 UTC (permalink / raw)
To: linux-clk, Linus Walleij, Michael Turquette, Stephen Boyd
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 27 Sep 2017 21:21:23 +0200
Omit extra messages 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/clk/versatile/clk-icst.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c
index 09fbe66f1f11..20ab4ceffb28 100644
--- a/drivers/clk/versatile/clk-icst.c
+++ b/drivers/clk/versatile/clk-icst.c
@@ -360,15 +360,12 @@ static struct clk *icst_clk_setup(struct device *dev,
struct icst_params *pclone;
icst = kzalloc(sizeof(struct clk_icst), GFP_KERNEL);
- if (!icst) {
- pr_err("could not allocate ICST clock!\n");
+ if (!icst)
return ERR_PTR(-ENOMEM);
- }
pclone = kmemdup(desc->params, sizeof(*pclone), GFP_KERNEL);
if (!pclone) {
kfree(icst);
- pr_err("could not clone ICST params\n");
return ERR_PTR(-ENOMEM);
}
--
2.14.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] clk/versatile: Improve a size determination in icst_clk_setup()
2017-09-27 19:38 [PATCH 0/2] versatile clock: Adjustments for icst_clk_setup() SF Markus Elfring
2017-09-27 19:39 ` [PATCH 1/2] clk/versatile: Delete two error messages for a failed memory allocation in icst_clk_setup() SF Markus Elfring
@ 2017-09-27 19:40 ` SF Markus Elfring
2017-10-03 20:26 ` Linus Walleij
2017-11-14 1:59 ` Stephen Boyd
1 sibling, 2 replies; 7+ messages in thread
From: SF Markus Elfring @ 2017-09-27 19:40 UTC (permalink / raw)
To: linux-clk, Linus Walleij, Michael Turquette, Stephen Boyd
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 27 Sep 2017 21:24:43 +0200
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.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/clk/versatile/clk-icst.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c
index 20ab4ceffb28..dafe7a45875d 100644
--- a/drivers/clk/versatile/clk-icst.c
+++ b/drivers/clk/versatile/clk-icst.c
@@ -359,7 +359,7 @@ static struct clk *icst_clk_setup(struct device *dev,
struct clk_init_data init;
struct icst_params *pclone;
- icst = kzalloc(sizeof(struct clk_icst), GFP_KERNEL);
+ icst = kzalloc(sizeof(*icst), GFP_KERNEL);
if (!icst)
return ERR_PTR(-ENOMEM);
--
2.14.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] clk/versatile: Delete two error messages for a failed memory allocation in icst_clk_setup()
2017-09-27 19:39 ` [PATCH 1/2] clk/versatile: Delete two error messages for a failed memory allocation in icst_clk_setup() SF Markus Elfring
@ 2017-10-03 20:25 ` Linus Walleij
2017-11-14 1:59 ` Stephen Boyd
1 sibling, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2017-10-03 20:25 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-clk, Michael Turquette, Stephen Boyd, LKML, kernel-janitors
On Wed, Sep 27, 2017 at 9:39 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Sep 2017 21:21:23 +0200
>
> Omit extra messages 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>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] clk/versatile: Improve a size determination in icst_clk_setup()
2017-09-27 19:40 ` [PATCH 2/2] clk/versatile: Improve a size determination " SF Markus Elfring
@ 2017-10-03 20:26 ` Linus Walleij
2017-11-14 1:59 ` Stephen Boyd
1 sibling, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2017-10-03 20:26 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-clk, Michael Turquette, Stephen Boyd, LKML, kernel-janitors
On Wed, Sep 27, 2017 at 9:40 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Sep 2017 21:24:43 +0200
>
> 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.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] clk/versatile: Improve a size determination in icst_clk_setup()
2017-09-27 19:40 ` [PATCH 2/2] clk/versatile: Improve a size determination " SF Markus Elfring
2017-10-03 20:26 ` Linus Walleij
@ 2017-11-14 1:59 ` Stephen Boyd
1 sibling, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2017-11-14 1:59 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-clk, Linus Walleij, Michael Turquette, LKML,
kernel-janitors
On 09/27, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Sep 2017 21:24:43 +0200
>
> 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.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] clk/versatile: Delete two error messages for a failed memory allocation in icst_clk_setup()
2017-09-27 19:39 ` [PATCH 1/2] clk/versatile: Delete two error messages for a failed memory allocation in icst_clk_setup() SF Markus Elfring
2017-10-03 20:25 ` Linus Walleij
@ 2017-11-14 1:59 ` Stephen Boyd
1 sibling, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2017-11-14 1:59 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-clk, Linus Walleij, Michael Turquette, LKML,
kernel-janitors
On 09/27, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Sep 2017 21:21:23 +0200
>
> Omit extra messages 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>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-11-14 1:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-27 19:38 [PATCH 0/2] versatile clock: Adjustments for icst_clk_setup() SF Markus Elfring
2017-09-27 19:39 ` [PATCH 1/2] clk/versatile: Delete two error messages for a failed memory allocation in icst_clk_setup() SF Markus Elfring
2017-10-03 20:25 ` Linus Walleij
2017-11-14 1:59 ` Stephen Boyd
2017-09-27 19:40 ` [PATCH 2/2] clk/versatile: Improve a size determination " SF Markus Elfring
2017-10-03 20:26 ` Linus Walleij
2017-11-14 1:59 ` Stephen Boyd
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).