linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] clk: Fine-tuning for ten function implementations
@ 2017-04-20  8:20 SF Markus Elfring
  2017-04-20  8:22 ` [PATCH 1/8] clk: si5351: Use devm_kcalloc() in si5351_i2c_probe() SF Markus Elfring
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: SF Markus Elfring @ 2017-04-20  8:20 UTC (permalink / raw)
  To: linux-clk, Michael Turquette, Stephen Boyd; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 20 Apr 2017 10:12:34 +0200

Some update suggestions were taken into account
from static source code analysis.

Markus Elfring (8):
  Use devm_kcalloc() in si5351_i2c_probe()
  Delete an error message for a failed memory allocation in si5351_i2c_probe()
  Adjust a null pointer check in si5351_dt_parse()
  Replace four seq_printf() calls by seq_putc()
  Combine two seq_puts() calls into one call in clk_summary_show()
  Improve a size determination in two functions
  Use seq_puts() in nomadik_src_clk_show()
  Delete error messages for a failed memory allocation in two functions

 drivers/clk/clk-nomadik.c | 12 ++++--------
 drivers/clk/clk-si5351.c  | 10 ++++------
 drivers/clk/clk.c         | 19 +++++++++----------
 3 files changed, 17 insertions(+), 24 deletions(-)

-- 
2.12.2

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/8] clk: si5351: Use devm_kcalloc() in si5351_i2c_probe()
  2017-04-20  8:20 [PATCH 0/8] clk: Fine-tuning for ten function implementations SF Markus Elfring
@ 2017-04-20  8:22 ` SF Markus Elfring
  2017-04-22  2:44   ` Stephen Boyd
  2017-04-20  8:23 ` [PATCH 2/8] clk: si5351: Delete an error message for a failed memory allocation " SF Markus Elfring
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: SF Markus Elfring @ 2017-04-20  8:22 UTC (permalink / raw)
  To: linux-clk, Michael Turquette, Stephen Boyd; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 19 Apr 2017 22:37:30 +0200

Multiplications for the size determination of memory allocations
indicated that array data structures should be processed.
Thus use the corresponding function "devm_kcalloc".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/clk/clk-si5351.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c
index b051db43fae1..a4c009e1e70d 100644
--- a/drivers/clk/clk-si5351.c
+++ b/drivers/clk/clk-si5351.c
@@ -1535,9 +1535,9 @@ static int si5351_i2c_probe(struct i2c_client *client,
 	else
 		parent_names[1] = si5351_pll_names[1];
 
-	drvdata->msynth = devm_kzalloc(&client->dev, num_clocks *
+	drvdata->msynth = devm_kcalloc(&client->dev, num_clocks,
 				       sizeof(*drvdata->msynth), GFP_KERNEL);
-	drvdata->clkout = devm_kzalloc(&client->dev, num_clocks *
+	drvdata->clkout = devm_kcalloc(&client->dev, num_clocks,
 				       sizeof(*drvdata->clkout), GFP_KERNEL);
 	drvdata->num_clkout = num_clocks;
 
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/8] clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe()
  2017-04-20  8:20 [PATCH 0/8] clk: Fine-tuning for ten function implementations SF Markus Elfring
  2017-04-20  8:22 ` [PATCH 1/8] clk: si5351: Use devm_kcalloc() in si5351_i2c_probe() SF Markus Elfring
@ 2017-04-20  8:23 ` SF Markus Elfring
  2017-04-22  2:45   ` Stephen Boyd
  2017-04-20  8:26 ` [PATCH 3/8] clk: si5351: Adjust a null pointer check in si5351_dt_parse() SF Markus Elfring
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: SF Markus Elfring @ 2017-04-20  8:23 UTC (permalink / raw)
  To: linux-clk, Michael Turquette, Stephen Boyd; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 20 Apr 2017 07:34:54 +0200

The script "checkpatch.pl" pointed information out like the following.

* CHECK: Comparison to NULL could be written "!drvdata"

  Thus adjust this expression.


* WARNING: Possible unnecessary 'out of memory' message

  Thus remove such a statement here.

  Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/clk/clk-si5351.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c
index a4c009e1e70d..2492442eea77 100644
--- a/drivers/clk/clk-si5351.c
+++ b/drivers/clk/clk-si5351.c
@@ -1354,10 +1354,8 @@ static int si5351_i2c_probe(struct i2c_client *client,
 		return -EINVAL;
 
 	drvdata = devm_kzalloc(&client->dev, sizeof(*drvdata), GFP_KERNEL);
-	if (drvdata == NULL) {
-		dev_err(&client->dev, "unable to allocate driver data\n");
+	if (!drvdata)
 		return -ENOMEM;
-	}
 
 	i2c_set_clientdata(client, drvdata);
 	drvdata->client = client;
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/8] clk: si5351: Adjust a null pointer check in si5351_dt_parse()
  2017-04-20  8:20 [PATCH 0/8] clk: Fine-tuning for ten function implementations SF Markus Elfring
  2017-04-20  8:22 ` [PATCH 1/8] clk: si5351: Use devm_kcalloc() in si5351_i2c_probe() SF Markus Elfring
  2017-04-20  8:23 ` [PATCH 2/8] clk: si5351: Delete an error message for a failed memory allocation " SF Markus Elfring
@ 2017-04-20  8:26 ` SF Markus Elfring
  2017-04-20  8:27 ` [PATCH 4/8] clk: Replace four seq_printf() calls by seq_putc() SF Markus Elfring
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: SF Markus Elfring @ 2017-04-20  8:26 UTC (permalink / raw)
  To: linux-clk, Michael Turquette, Stephen Boyd; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 20 Apr 2017 07:47:04 +0200

The script "checkpatch.pl" pointed information out like the following.

Comparison to NULL could be written "!np".

Thus adjust this expression.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/clk/clk-si5351.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c
index 2492442eea77..a0acea67b571 100644
--- a/drivers/clk/clk-si5351.c
+++ b/drivers/clk/clk-si5351.c
@@ -1140,7 +1140,7 @@ static int si5351_dt_parse(struct i2c_client *client,
 	int num = 0;
 	u32 val;
 
-	if (np == NULL)
+	if (!np)
 		return 0;
 
 	pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/8] clk: Replace four seq_printf() calls by seq_putc()
  2017-04-20  8:20 [PATCH 0/8] clk: Fine-tuning for ten function implementations SF Markus Elfring
                   ` (2 preceding siblings ...)
  2017-04-20  8:26 ` [PATCH 3/8] clk: si5351: Adjust a null pointer check in si5351_dt_parse() SF Markus Elfring
@ 2017-04-20  8:27 ` SF Markus Elfring
  2017-04-22  2:46   ` Stephen Boyd
  2017-04-20  8:28 ` [PATCH 5/8] clk: Combine two seq_puts() calls into one call in clk_summary_show() SF Markus Elfring
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: SF Markus Elfring @ 2017-04-20  8:27 UTC (permalink / raw)
  To: linux-clk, Michael Turquette, Stephen Boyd; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 20 Apr 2017 08:45:43 +0200

Four single characters should be put into a sequence.
Thus use the corresponding function "seq_putc".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/clk/clk.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 67201f67a14a..4c72a10a9a33 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2081,11 +2081,11 @@ static void clk_dump_subtree(struct seq_file *s, struct clk_core *c, int level)
 	clk_dump_one(s, c, level);
 
 	hlist_for_each_entry(child, &c->children, child_node) {
-		seq_printf(s, ",");
+		seq_putc(s, ',');
 		clk_dump_subtree(s, child, level + 1);
 	}
 
-	seq_printf(s, "}");
+	seq_putc(s, '}');
 }
 
 static int clk_dump(struct seq_file *s, void *data)
@@ -2094,14 +2094,13 @@ static int clk_dump(struct seq_file *s, void *data)
 	bool first_node = true;
 	struct hlist_head **lists = (struct hlist_head **)s->private;
 
-	seq_printf(s, "{");
-
+	seq_putc(s, '{');
 	clk_prepare_lock();
 
 	for (; *lists; lists++) {
 		hlist_for_each_entry(c, *lists, child_node) {
 			if (!first_node)
-				seq_puts(s, ",");
+				seq_putc(s, ',');
 			first_node = false;
 			clk_dump_subtree(s, c, 0);
 		}
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 5/8] clk: Combine two seq_puts() calls into one call in clk_summary_show()
  2017-04-20  8:20 [PATCH 0/8] clk: Fine-tuning for ten function implementations SF Markus Elfring
                   ` (3 preceding siblings ...)
  2017-04-20  8:27 ` [PATCH 4/8] clk: Replace four seq_printf() calls by seq_putc() SF Markus Elfring
@ 2017-04-20  8:28 ` SF Markus Elfring
  2017-04-20  8:29 ` [PATCH 6/8] clk: Improve a size determination in two functions SF Markus Elfring
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: SF Markus Elfring @ 2017-04-20  8:28 UTC (permalink / raw)
  To: linux-clk, Michael Turquette, Stephen Boyd; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 20 Apr 2017 09:12:35 +0200

Some text was put into a sequence by two separate function calls.
Print the same data by a single function call instead.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/clk/clk.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 4c72a10a9a33..684642ab4212 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2030,9 +2030,9 @@ static int clk_summary_show(struct seq_file *s, void *data)
 	struct clk_core *c;
 	struct hlist_head **lists = (struct hlist_head **)s->private;
 
-	seq_puts(s, "   clock                         enable_cnt  prepare_cnt        rate   accuracy   phase\n");
-	seq_puts(s, "----------------------------------------------------------------------------------------\n");
-
+	seq_puts(s,
+		 "   clock                         enable_cnt  prepare_cnt        rate   accuracy   phase\n"
+		 "----------------------------------------------------------------------------------------\n");
 	clk_prepare_lock();
 
 	for (; *lists; lists++)
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 6/8] clk: Improve a size determination in two functions
  2017-04-20  8:20 [PATCH 0/8] clk: Fine-tuning for ten function implementations SF Markus Elfring
                   ` (4 preceding siblings ...)
  2017-04-20  8:28 ` [PATCH 5/8] clk: Combine two seq_puts() calls into one call in clk_summary_show() SF Markus Elfring
@ 2017-04-20  8:29 ` SF Markus Elfring
  2017-04-22  2:47   ` Stephen Boyd
  2017-04-20  8:30 ` [PATCH 7/8] clk: nomadik: Use seq_puts() in nomadik_src_clk_show() SF Markus Elfring
  2017-04-20  8:32 ` [PATCH 8/8] clk: nomadik: Delete error messages for a failed memory allocation in two functions SF Markus Elfring
  7 siblings, 1 reply; 15+ messages in thread
From: SF Markus Elfring @ 2017-04-20  8:29 UTC (permalink / raw)
  To: linux-clk, Michael Turquette, Stephen Boyd; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 20 Apr 2017 09:30:52 +0200

Replace the specification of two data structures by pointer dereferences
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/clk/clk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 684642ab4212..3f2ee0469d3e 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2939,7 +2939,7 @@ int clk_notifier_register(struct clk *clk, struct notifier_block *nb)
 
 	/* if clk wasn't in the notifier list, allocate new clk_notifier */
 	if (cn->clk != clk) {
-		cn = kzalloc(sizeof(struct clk_notifier), GFP_KERNEL);
+		cn = kzalloc(sizeof(*cn), GFP_KERNEL);
 		if (!cn)
 			goto out;
 
@@ -3087,7 +3087,7 @@ int of_clk_add_provider(struct device_node *np,
 	struct of_clk_provider *cp;
 	int ret;
 
-	cp = kzalloc(sizeof(struct of_clk_provider), GFP_KERNEL);
+	cp = kzalloc(sizeof(*cp), GFP_KERNEL);
 	if (!cp)
 		return -ENOMEM;
 
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 7/8] clk: nomadik: Use seq_puts() in nomadik_src_clk_show()
  2017-04-20  8:20 [PATCH 0/8] clk: Fine-tuning for ten function implementations SF Markus Elfring
                   ` (5 preceding siblings ...)
  2017-04-20  8:29 ` [PATCH 6/8] clk: Improve a size determination in two functions SF Markus Elfring
@ 2017-04-20  8:30 ` SF Markus Elfring
  2017-04-22  2:48   ` Stephen Boyd
  2017-04-20  8:32 ` [PATCH 8/8] clk: nomadik: Delete error messages for a failed memory allocation in two functions SF Markus Elfring
  7 siblings, 1 reply; 15+ messages in thread
From: SF Markus Elfring @ 2017-04-20  8:30 UTC (permalink / raw)
  To: linux-clk, Michael Turquette, Stephen Boyd; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 20 Apr 2017 09:45:04 +0200

A string which did not contain a data format specification should be put
into a sequence. Thus use the corresponding function "seq_puts".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/clk/clk-nomadik.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
index 71677eb12565..8d57ab8d6ed8 100644
--- a/drivers/clk/clk-nomadik.c
+++ b/drivers/clk/clk-nomadik.c
@@ -467,7 +467,7 @@ static int nomadik_src_clk_show(struct seq_file *s, void *what)
 	u32 src_pckensr0 = readl(src_base + SRC_PCKENSR0);
 	u32 src_pckensr1 = readl(src_base + SRC_PCKENSR1);
 
-	seq_printf(s, "Clock:      Boot:   Now:    Request: ASKED:\n");
+	seq_puts(s, "Clock:      Boot:   Now:    Request: ASKED:\n");
 	for (i = 0; i < ARRAY_SIZE(src_clk_names); i++) {
 		u32 pcksrb = (i < 0x20) ? src_pcksr0_boot : src_pcksr1_boot;
 		u32 pcksr = (i < 0x20) ? src_pcksr0 : src_pcksr1;
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 8/8] clk: nomadik: Delete error messages for a failed memory allocation in two functions
  2017-04-20  8:20 [PATCH 0/8] clk: Fine-tuning for ten function implementations SF Markus Elfring
                   ` (6 preceding siblings ...)
  2017-04-20  8:30 ` [PATCH 7/8] clk: nomadik: Use seq_puts() in nomadik_src_clk_show() SF Markus Elfring
@ 2017-04-20  8:32 ` SF Markus Elfring
  2017-04-22  2:48   ` Stephen Boyd
  7 siblings, 1 reply; 15+ messages in thread
From: SF Markus Elfring @ 2017-04-20  8:32 UTC (permalink / raw)
  To: linux-clk, Michael Turquette, Stephen Boyd
  Cc: LKML, kernel-janitors, Wolfram Sang

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 20 Apr 2017 10:04:00 +0200

The script "checkpatch.pl" pointed information out like the following.

WARNING: Possible unnecessary 'out of memory' message

Thus remove such statements here.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/clk/clk-nomadik.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
index 8d57ab8d6ed8..13ad6d1e5090 100644
--- a/drivers/clk/clk-nomadik.c
+++ b/drivers/clk/clk-nomadik.c
@@ -267,10 +267,8 @@ pll_clk_register(struct device *dev, const char *name,
 	}
 
 	pll = kzalloc(sizeof(*pll), GFP_KERNEL);
-	if (!pll) {
-		pr_err("%s: could not allocate PLL clk\n", __func__);
+	if (!pll)
 		return ERR_PTR(-ENOMEM);
-	}
 
 	init.name = name;
 	init.ops = &pll_clk_ops;
@@ -356,11 +354,9 @@ src_clk_register(struct device *dev, const char *name,
 	struct clk_init_data init;
 
 	sclk = kzalloc(sizeof(*sclk), GFP_KERNEL);
-	if (!sclk) {
-		pr_err("could not allocate SRC clock %s\n",
-			name);
+	if (!sclk)
 		return ERR_PTR(-ENOMEM);
-	}
+
 	init.name = name;
 	init.ops = &src_clk_ops;
 	/* Do not force-disable the static SDRAM controller */
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/8] clk: si5351: Use devm_kcalloc() in si5351_i2c_probe()
  2017-04-20  8:22 ` [PATCH 1/8] clk: si5351: Use devm_kcalloc() in si5351_i2c_probe() SF Markus Elfring
@ 2017-04-22  2:44   ` Stephen Boyd
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2017-04-22  2:44 UTC (permalink / raw)
  To: SF Markus Elfring; +Cc: linux-clk, Michael Turquette, LKML, kernel-janitors

On 04/20, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 19 Apr 2017 22:37:30 +0200
> 
> Multiplications for the size determination of memory allocations
> indicated that array data structures should be processed.
> Thus use the corresponding function "devm_kcalloc".
> 
> 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] 15+ messages in thread

* Re: [PATCH 2/8] clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe()
  2017-04-20  8:23 ` [PATCH 2/8] clk: si5351: Delete an error message for a failed memory allocation " SF Markus Elfring
@ 2017-04-22  2:45   ` Stephen Boyd
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2017-04-22  2:45 UTC (permalink / raw)
  To: SF Markus Elfring; +Cc: linux-clk, Michael Turquette, LKML, kernel-janitors

On 04/20, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 20 Apr 2017 07:34:54 +0200
> 
> The script "checkpatch.pl" pointed information out like the following.
> 
> * CHECK: Comparison to NULL could be written "!drvdata"
> 
>   Thus adjust this expression.
> 
> 
> * WARNING: Possible unnecessary 'out of memory' message
> 
>   Thus remove such a statement here.
> 
>   Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> 
> 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] 15+ messages in thread

* Re: [PATCH 4/8] clk: Replace four seq_printf() calls by seq_putc()
  2017-04-20  8:27 ` [PATCH 4/8] clk: Replace four seq_printf() calls by seq_putc() SF Markus Elfring
@ 2017-04-22  2:46   ` Stephen Boyd
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2017-04-22  2:46 UTC (permalink / raw)
  To: SF Markus Elfring; +Cc: linux-clk, Michael Turquette, LKML, kernel-janitors

On 04/20, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 20 Apr 2017 08:45:43 +0200
> 
> Four single characters should be put into a sequence.
> Thus use the corresponding function "seq_putc".
> 
> 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] 15+ messages in thread

* Re: [PATCH 6/8] clk: Improve a size determination in two functions
  2017-04-20  8:29 ` [PATCH 6/8] clk: Improve a size determination in two functions SF Markus Elfring
@ 2017-04-22  2:47   ` Stephen Boyd
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2017-04-22  2:47 UTC (permalink / raw)
  To: SF Markus Elfring; +Cc: linux-clk, Michael Turquette, LKML, kernel-janitors

On 04/20, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 20 Apr 2017 09:30:52 +0200
> 
> Replace the specification of two data structures by pointer dereferences
> 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>
> ---

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] 15+ messages in thread

* Re: [PATCH 8/8] clk: nomadik: Delete error messages for a failed memory allocation in two functions
  2017-04-20  8:32 ` [PATCH 8/8] clk: nomadik: Delete error messages for a failed memory allocation in two functions SF Markus Elfring
@ 2017-04-22  2:48   ` Stephen Boyd
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2017-04-22  2:48 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-clk, Michael Turquette, LKML, kernel-janitors, Wolfram Sang

On 04/20, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 20 Apr 2017 10:04:00 +0200
> 
> The script "checkpatch.pl" pointed information out like the following.
> 
> WARNING: Possible unnecessary 'out of memory' message
> 
> Thus remove such statements here.
> 
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> 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] 15+ messages in thread

* Re: [PATCH 7/8] clk: nomadik: Use seq_puts() in nomadik_src_clk_show()
  2017-04-20  8:30 ` [PATCH 7/8] clk: nomadik: Use seq_puts() in nomadik_src_clk_show() SF Markus Elfring
@ 2017-04-22  2:48   ` Stephen Boyd
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2017-04-22  2:48 UTC (permalink / raw)
  To: SF Markus Elfring; +Cc: linux-clk, Michael Turquette, LKML, kernel-janitors

On 04/20, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 20 Apr 2017 09:45:04 +0200
> 
> A string which did not contain a data format specification should be put
> into a sequence. Thus use the corresponding function "seq_puts".
> 
> 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] 15+ messages in thread

end of thread, other threads:[~2017-04-22  2:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20  8:20 [PATCH 0/8] clk: Fine-tuning for ten function implementations SF Markus Elfring
2017-04-20  8:22 ` [PATCH 1/8] clk: si5351: Use devm_kcalloc() in si5351_i2c_probe() SF Markus Elfring
2017-04-22  2:44   ` Stephen Boyd
2017-04-20  8:23 ` [PATCH 2/8] clk: si5351: Delete an error message for a failed memory allocation " SF Markus Elfring
2017-04-22  2:45   ` Stephen Boyd
2017-04-20  8:26 ` [PATCH 3/8] clk: si5351: Adjust a null pointer check in si5351_dt_parse() SF Markus Elfring
2017-04-20  8:27 ` [PATCH 4/8] clk: Replace four seq_printf() calls by seq_putc() SF Markus Elfring
2017-04-22  2:46   ` Stephen Boyd
2017-04-20  8:28 ` [PATCH 5/8] clk: Combine two seq_puts() calls into one call in clk_summary_show() SF Markus Elfring
2017-04-20  8:29 ` [PATCH 6/8] clk: Improve a size determination in two functions SF Markus Elfring
2017-04-22  2:47   ` Stephen Boyd
2017-04-20  8:30 ` [PATCH 7/8] clk: nomadik: Use seq_puts() in nomadik_src_clk_show() SF Markus Elfring
2017-04-22  2:48   ` Stephen Boyd
2017-04-20  8:32 ` [PATCH 8/8] clk: nomadik: Delete error messages for a failed memory allocation in two functions SF Markus Elfring
2017-04-22  2:48   ` 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).