* [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations
@ 2017-06-01 20:46 SF Markus Elfring
2017-06-01 20:48 ` [PATCH 1/5] ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init() SF Markus Elfring
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: SF Markus Elfring @ 2017-06-01 20:46 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, Aaro Koskinen, Russell King, Tony Lindgren
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 1 Jun 2017 22:40:04 +0200
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (5):
Improve a size determination in omap1_system_dma_init()
Delete an error message for a failed memory allocation in omap1_system_dma_init()
Delete an unnecessary return statement in omap1_show_dma_caps()
Delete an error message for a failed memory allocation in omap1_dm_timer_init()
Fix a typo in a comment line
arch/arm/mach-omap1/dma.c | 5 +----
arch/arm/mach-omap1/timer.c | 4 +---
2 files changed, 2 insertions(+), 7 deletions(-)
--
2.13.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init()
2017-06-01 20:46 [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations SF Markus Elfring
@ 2017-06-01 20:48 ` SF Markus Elfring
2017-06-01 20:49 ` [PATCH 2/5] ARM: OMAP1: DMA: Delete an error message for a failed memory allocation " SF Markus Elfring
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: SF Markus Elfring @ 2017-06-01 20:48 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, Aaro Koskinen, Russell King, Tony Lindgren
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 1 Jun 2017 21:48:11 +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.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
arch/arm/mach-omap1/dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index c821c1d5610e..823dba3dc033 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -339,5 +339,5 @@ static int __init omap1_system_dma_init(void)
goto exit_iounmap;
}
- d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL);
+ d = kzalloc(sizeof(*d), GFP_KERNEL);
if (!d) {
--
2.13.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] ARM: OMAP1: DMA: Delete an error message for a failed memory allocation in omap1_system_dma_init()
2017-06-01 20:46 [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations SF Markus Elfring
2017-06-01 20:48 ` [PATCH 1/5] ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init() SF Markus Elfring
@ 2017-06-01 20:49 ` SF Markus Elfring
2017-06-01 20:50 ` [PATCH 3/5] ARM: OMAP1: DMA: Delete an unnecessary return statement in omap1_show_dma_caps() SF Markus Elfring
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: SF Markus Elfring @ 2017-06-01 20:49 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, Aaro Koskinen, Russell King, Tony Lindgren
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 1 Jun 2017 21:54:36 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
arch/arm/mach-omap1/dma.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index 823dba3dc033..c545b4e01d53 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -343,6 +343,4 @@ static int __init omap1_system_dma_init(void)
if (!d) {
- dev_err(&pdev->dev, "%s: Unable to allocate 'd' for %s\n",
- __func__, pdev->name);
ret = -ENOMEM;
goto exit_iounmap;
}
--
2.13.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] ARM: OMAP1: DMA: Delete an unnecessary return statement in omap1_show_dma_caps()
2017-06-01 20:46 [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations SF Markus Elfring
2017-06-01 20:48 ` [PATCH 1/5] ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init() SF Markus Elfring
2017-06-01 20:49 ` [PATCH 2/5] ARM: OMAP1: DMA: Delete an error message for a failed memory allocation " SF Markus Elfring
@ 2017-06-01 20:50 ` SF Markus Elfring
2017-06-01 20:51 ` [PATCH 4/5] ARM: OMAP1: Delete an error message for a failed memory allocation in omap1_dm_timer_init() SF Markus Elfring
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: SF Markus Elfring @ 2017-06-01 20:50 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, Aaro Koskinen, Russell King, Tony Lindgren
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 1 Jun 2017 22:00:21 +0200
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>
---
arch/arm/mach-omap1/dma.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index c545b4e01d53..52d7eda1adec 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -240,7 +240,6 @@ static void omap1_show_dma_caps(void)
w |= 1 << 3;
dma_write(w, GSCR, 0);
}
- return;
}
static unsigned configure_dma_errata(void)
--
2.13.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] ARM: OMAP1: Delete an error message for a failed memory allocation in omap1_dm_timer_init()
2017-06-01 20:46 [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations SF Markus Elfring
` (2 preceding siblings ...)
2017-06-01 20:50 ` [PATCH 3/5] ARM: OMAP1: DMA: Delete an unnecessary return statement in omap1_show_dma_caps() SF Markus Elfring
@ 2017-06-01 20:51 ` SF Markus Elfring
2017-06-01 20:52 ` [PATCH 5/5] ARM: OMAP1: Fix a typo in a comment line SF Markus Elfring
2017-06-07 7:02 ` [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations Tony Lindgren
5 siblings, 0 replies; 7+ messages in thread
From: SF Markus Elfring @ 2017-06-01 20:51 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, Aaro Koskinen, Russell King, Tony Lindgren
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 1 Jun 2017 22:04:29 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
arch/arm/mach-omap1/timer.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
index 06c5ba7574a5..637f8c9d9f10 100644
--- a/arch/arm/mach-omap1/timer.c
+++ b/arch/arm/mach-omap1/timer.c
@@ -136,6 +136,4 @@ static int __init omap1_dm_timer_init(void)
if (!pdata) {
- dev_err(&pdev->dev, "%s: Failed to allocate pdata.\n",
- __func__);
ret = -ENOMEM;
goto err_free_pdata;
}
--
2.13.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] ARM: OMAP1: Fix a typo in a comment line
2017-06-01 20:46 [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations SF Markus Elfring
` (3 preceding siblings ...)
2017-06-01 20:51 ` [PATCH 4/5] ARM: OMAP1: Delete an error message for a failed memory allocation in omap1_dm_timer_init() SF Markus Elfring
@ 2017-06-01 20:52 ` SF Markus Elfring
2017-06-07 7:02 ` [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations Tony Lindgren
5 siblings, 0 replies; 7+ messages in thread
From: SF Markus Elfring @ 2017-06-01 20:52 UTC (permalink / raw)
To: linux-omap, linux-arm-kernel, Aaro Koskinen, Russell King, Tony Lindgren
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 1 Jun 2017 22:17:03 +0200
Adjust a line in this description for the software module.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
arch/arm/mach-omap1/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
index 637f8c9d9f10..8fb1ec6fa999 100644
--- a/arch/arm/mach-omap1/timer.c
+++ b/arch/arm/mach-omap1/timer.c
@@ -3,7 +3,7 @@
*
* Contains first level initialization routines which internally
* generates timer device information and registers with linux
- * device model. It also has low level function to chnage the timer
+ * device model. It also has a low level function to change the timer
* input clock source.
*
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
--
2.13.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations
2017-06-01 20:46 [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations SF Markus Elfring
` (4 preceding siblings ...)
2017-06-01 20:52 ` [PATCH 5/5] ARM: OMAP1: Fix a typo in a comment line SF Markus Elfring
@ 2017-06-07 7:02 ` Tony Lindgren
5 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2017-06-07 7:02 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-omap, linux-arm-kernel, Aaro Koskinen, Russell King, LKML,
kernel-janitors
* SF Markus Elfring <elfring@users.sourceforge.net> [170601 13:50]:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 1 Jun 2017 22:40:04 +0200
>
> A few update suggestions were taken into account
> from static source code analysis.
>
> Markus Elfring (5):
> Improve a size determination in omap1_system_dma_init()
> Delete an error message for a failed memory allocation in omap1_system_dma_init()
> Delete an unnecessary return statement in omap1_show_dma_caps()
> Delete an error message for a failed memory allocation in omap1_dm_timer_init()
> Fix a typo in a comment line
>
> arch/arm/mach-omap1/dma.c | 5 +----
> arch/arm/mach-omap1/timer.c | 4 +---
> 2 files changed, 2 insertions(+), 7 deletions(-)
Thanks applying all into omap-for-v4.13/omap1.
Tony
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-06-07 7:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01 20:46 [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations SF Markus Elfring
2017-06-01 20:48 ` [PATCH 1/5] ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init() SF Markus Elfring
2017-06-01 20:49 ` [PATCH 2/5] ARM: OMAP1: DMA: Delete an error message for a failed memory allocation " SF Markus Elfring
2017-06-01 20:50 ` [PATCH 3/5] ARM: OMAP1: DMA: Delete an unnecessary return statement in omap1_show_dma_caps() SF Markus Elfring
2017-06-01 20:51 ` [PATCH 4/5] ARM: OMAP1: Delete an error message for a failed memory allocation in omap1_dm_timer_init() SF Markus Elfring
2017-06-01 20:52 ` [PATCH 5/5] ARM: OMAP1: Fix a typo in a comment line SF Markus Elfring
2017-06-07 7:02 ` [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations Tony Lindgren
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).