Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1743246 > unrolled thread

[PATCH 0/6] ARM-S3C24xx: Adjustments for four function implementations

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-10-02 22:50 +0200
Last post2017-10-02 22:50 +0200
Articles 5 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/6] ARM-S3C24xx: Adjustments for four function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-10-02 22:50 +0200
    [PATCH 3/6] ARM: s3c2410: Fix a typo in a comment line SF Markus Elfring <elfring@users.sourceforge.net> - 2017-10-02 22:50 +0200
    [PATCH 5/6] ARM: s3c24xx: Improve a size determination in  s3c2412_iotiming_get() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-10-02 22:50 +0200
    [PATCH 2/6] ARM: s3c24xx: Improve a size determination in  s3c2410_iotiming_get() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-10-02 22:50 +0200
    [PATCH 1/6] ARM: s3c24xx: Delete an error message for a failed memory  allocation in s3c2410_iotiming_get() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-10-02 22:50 +0200

#1743246 — [PATCH 0/6] ARM-S3C24xx: Adjustments for four function implementations

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-10-02 22:50 +0200
Subject[PATCH 0/6] ARM-S3C24xx: Adjustments for four function implementations
Message-ID<uwfP5-ur-37@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 2 Oct 2017 19:50:05 +0200

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

Markus Elfring (6):
  Delete an error message for a failed memory allocation in s3c2410_iotiming_get()
  Improve a size determination in s3c2410_iotiming_get()
  s3c2410: Fix a typo in a comment line
  Delete an error message for a failed memory allocation in s3c2412_iotiming_get()
  Improve a size determination in s3c2412_iotiming_get()
  s3c2412: Fix a typo in a comment line

 arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 8 +++-----
 arch/arm/mach-s3c24xx/iotiming-s3c2412.c | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

-- 
2.14.2

[toc] | [next] | [standalone]


#1743279 — [PATCH 3/6] ARM: s3c2410: Fix a typo in a comment line

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-10-02 22:50 +0200
Subject[PATCH 3/6] ARM: s3c2410: Fix a typo in a comment line
Message-ID<uwfPb-ur-163@gated-at.bofh.it>
In reply to#1743246
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 2 Oct 2017 19:34:36 +0200

Adjust a word in this function description.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
index c18769b5f15a..d5f1f06e4811 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
@@ -206,7 +206,7 @@ static int calc_tacc(unsigned int cyc, int nwait_en,
 }
 
 /**
- * s3c2410_calc_bank - calculate bank timing infromation
+ * s3c2410_calc_bank - calculate bank timing information
  * @cfg: The configuration we need to calculate for.
  * @bt: The bank timing information.
  *
-- 
2.14.2

[toc] | [prev] | [next] | [standalone]


#1743297 — [PATCH 5/6] ARM: s3c24xx: Improve a size determination in s3c2412_iotiming_get()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-10-02 22:50 +0200
Subject[PATCH 5/6] ARM: s3c24xx: Improve a size determination in s3c2412_iotiming_get()
Message-ID<uwfPe-ur-221@gated-at.bofh.it>
In reply to#1743246
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 2 Oct 2017 19:38:42 +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>
---
 arch/arm/mach-s3c24xx/iotiming-s3c2412.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
index f09d5d5ea7ed..01bcd7d5dac7 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
@@ -242,7 +242,7 @@ int s3c2412_iotiming_get(struct s3c_cpufreq_config *cfg,
 		if (!bank_is_io(bank, bankcfg))
 			continue;
 
-		bt = kzalloc(sizeof(struct s3c2412_iobank_timing), GFP_KERNEL);
+		bt = kzalloc(sizeof(*bt), GFP_KERNEL);
 		if (!bt)
 			return -ENOMEM;
 
-- 
2.14.2

[toc] | [prev] | [next] | [standalone]


#1743299 — [PATCH 2/6] ARM: s3c24xx: Improve a size determination in s3c2410_iotiming_get()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-10-02 22:50 +0200
Subject[PATCH 2/6] ARM: s3c24xx: Improve a size determination in s3c2410_iotiming_get()
Message-ID<uwfPf-ur-227@gated-at.bofh.it>
In reply to#1743246
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 2 Oct 2017 19:16:58 +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>
---
 arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
index f587c78fba33..c18769b5f15a 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
@@ -453,7 +453,7 @@ int s3c2410_iotiming_get(struct s3c_cpufreq_config *cfg,
 		s3c_freq_iodbg("%s: bank %d: con %08lx\n",
 			       __func__, bank, bankcon);
 
-		bt = kzalloc(sizeof(struct s3c2410_iobank_timing), GFP_KERNEL);
+		bt = kzalloc(sizeof(*bt), GFP_KERNEL);
 		if (!bt)
 			return -ENOMEM;
 
-- 
2.14.2

[toc] | [prev] | [next] | [standalone]


#1743317 — [PATCH 1/6] ARM: s3c24xx: Delete an error message for a failed memory allocation in s3c2410_iotiming_get()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-10-02 22:50 +0200
Subject[PATCH 1/6] ARM: s3c24xx: Delete an error message for a failed memory allocation in s3c2410_iotiming_get()
Message-ID<uwfPj-ur-279@gated-at.bofh.it>
In reply to#1743246
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 2 Oct 2017 19:14:20 +0200

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>
---
 arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
index b7970f1fa3d5..f587c78fba33 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
@@ -454,10 +454,8 @@ int s3c2410_iotiming_get(struct s3c_cpufreq_config *cfg,
 			       __func__, bank, bankcon);
 
 		bt = kzalloc(sizeof(struct s3c2410_iobank_timing), GFP_KERNEL);
-		if (!bt) {
-			printk(KERN_ERR "%s: no memory for bank\n", __func__);
+		if (!bt)
 			return -ENOMEM;
-		}
 
 		/* find out in nWait is enabled for bank. */
 
-- 
2.14.2

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web