All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Blackfin: Adjustments for two function implementations
@ 2017-05-24 18:02 ` SF Markus Elfring
  0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-24 18:02 UTC (permalink / raw)
  To: adi-buildroot-devel, Ingo Molnar, Steven Miao; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 May 2017 20:00:02 +0200

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 bfin_pm_suspend_mem_enter()
  Delete an error message for a failed memory allocation in isram_test_init()

 arch/blackfin/mach-common/pm.c  | 4 +---
 arch/blackfin/mm/isram-driver.c | 1 -
 2 files changed, 1 insertion(+), 4 deletions(-)

-- 
2.13.0

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

* [PATCH 0/2] Blackfin: Adjustments for two function implementations
@ 2017-05-24 18:02 ` SF Markus Elfring
  0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-24 18:02 UTC (permalink / raw)
  To: adi-buildroot-devel, Ingo Molnar, Steven Miao; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 May 2017 20:00:02 +0200

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 bfin_pm_suspend_mem_enter()
  Delete an error message for a failed memory allocation in isram_test_init()

 arch/blackfin/mach-common/pm.c  | 4 +---
 arch/blackfin/mm/isram-driver.c | 1 -
 2 files changed, 1 insertion(+), 4 deletions(-)

-- 
2.13.0


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

* [PATCH 1/2] blackfin: Delete an error message for a failed memory allocation in bfin_pm_suspend_mem_enter()
  2017-05-24 18:02 ` SF Markus Elfring
@ 2017-05-24 18:03   ` SF Markus Elfring
  -1 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-24 18:03 UTC (permalink / raw)
  To: adi-buildroot-devel, Ingo Molnar, Steven Miao; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 May 2017 19:29:25 +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/blackfin/mach-common/pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c
index 5ece38a5b758..f4d442b7a1a1 100644
--- a/arch/blackfin/mach-common/pm.c
+++ b/arch/blackfin/mach-common/pm.c
@@ -151,10 +151,8 @@ int bfin_pm_suspend_mem_enter(void)
 					 + L1_DATA_B_LENGTH + L1_SCRATCH_LENGTH,
 					  GFP_ATOMIC);
 
-	if (memptr == NULL) {
-		panic("bf53x_suspend_l1_mem malloc failed");
+	if (!memptr)
 		return -ENOMEM;
-	}
 
 #ifndef CONFIG_BF60x
 	wakeup = bfin_read_VR_CTL() & ~FREQ;
-- 
2.13.0

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

* [PATCH 1/2] blackfin: Delete an error message for a failed memory allocation in bfin_pm_suspend_mem_
@ 2017-05-24 18:03   ` SF Markus Elfring
  0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-24 18:03 UTC (permalink / raw)
  To: adi-buildroot-devel, Ingo Molnar, Steven Miao; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 May 2017 19:29:25 +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/blackfin/mach-common/pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c
index 5ece38a5b758..f4d442b7a1a1 100644
--- a/arch/blackfin/mach-common/pm.c
+++ b/arch/blackfin/mach-common/pm.c
@@ -151,10 +151,8 @@ int bfin_pm_suspend_mem_enter(void)
 					 + L1_DATA_B_LENGTH + L1_SCRATCH_LENGTH,
 					  GFP_ATOMIC);
 
-	if (memptr = NULL) {
-		panic("bf53x_suspend_l1_mem malloc failed");
+	if (!memptr)
 		return -ENOMEM;
-	}
 
 #ifndef CONFIG_BF60x
 	wakeup = bfin_read_VR_CTL() & ~FREQ;
-- 
2.13.0


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

* [PATCH 2/2] blackfin: Delete an error message for a failed memory allocation in isram_test_init()
  2017-05-24 18:02 ` SF Markus Elfring
@ 2017-05-24 18:04   ` SF Markus Elfring
  -1 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-24 18:04 UTC (permalink / raw)
  To: adi-buildroot-devel, Ingo Molnar, Steven Miao; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 May 2017 19:39:32 +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/blackfin/mm/isram-driver.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/blackfin/mm/isram-driver.c b/arch/blackfin/mm/isram-driver.c
index aaa1e64b753b..4221b07a61dc 100644
--- a/arch/blackfin/mm/isram-driver.c
+++ b/arch/blackfin/mm/isram-driver.c
@@ -374,6 +374,5 @@ static __init int isram_test_init(void)
 	if (!sdram) {
 		sram_free(l1inst);
-		pr_warning("SKIP: could not allocate sdram\n");
 		return 0;
 	}
 
-- 
2.13.0

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

* [PATCH 2/2] blackfin: Delete an error message for a failed memory allocation in isram_test_init()
@ 2017-05-24 18:04   ` SF Markus Elfring
  0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-24 18:04 UTC (permalink / raw)
  To: adi-buildroot-devel, Ingo Molnar, Steven Miao; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 May 2017 19:39:32 +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/blackfin/mm/isram-driver.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/blackfin/mm/isram-driver.c b/arch/blackfin/mm/isram-driver.c
index aaa1e64b753b..4221b07a61dc 100644
--- a/arch/blackfin/mm/isram-driver.c
+++ b/arch/blackfin/mm/isram-driver.c
@@ -374,6 +374,5 @@ static __init int isram_test_init(void)
 	if (!sdram) {
 		sram_free(l1inst);
-		pr_warning("SKIP: could not allocate sdram\n");
 		return 0;
 	}
 
-- 
2.13.0


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

* Re: [PATCH 1/2] blackfin: Delete an error message for a failed memory allocation in bfin_pm_suspend_mem_enter()
  2017-05-24 18:03   ` [PATCH 1/2] blackfin: Delete an error message for a failed memory allocation in bfin_pm_suspend_mem_ SF Markus Elfring
@ 2017-05-27 18:43     ` Al Viro
  -1 siblings, 0 replies; 8+ messages in thread
From: Al Viro @ 2017-05-27 18:43 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: adi-buildroot-devel, Ingo Molnar, Steven Miao, LKML, kernel-janitors

On Wed, May 24, 2017 at 08:03:45PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 24 May 2017 19:29:25 +0200
> 
> Omit an extra message for a memory allocation failure in this function.

That's no extra message, that's "won't continue past that point if it happens".

> This issue was detected by using the Coccinelle software.

... which absolves you of any need to think, presumably.

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

* Re: [PATCH 1/2] blackfin: Delete an error message for a failed memory allocation in bfin_pm_suspend_
@ 2017-05-27 18:43     ` Al Viro
  0 siblings, 0 replies; 8+ messages in thread
From: Al Viro @ 2017-05-27 18:43 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: adi-buildroot-devel, Ingo Molnar, Steven Miao, LKML, kernel-janitors

On Wed, May 24, 2017 at 08:03:45PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 24 May 2017 19:29:25 +0200
> 
> Omit an extra message for a memory allocation failure in this function.

That's no extra message, that's "won't continue past that point if it happens".

> This issue was detected by using the Coccinelle software.

... which absolves you of any need to think, presumably.

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

end of thread, other threads:[~2017-05-27 18:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24 18:02 [PATCH 0/2] Blackfin: Adjustments for two function implementations SF Markus Elfring
2017-05-24 18:02 ` SF Markus Elfring
2017-05-24 18:03 ` [PATCH 1/2] blackfin: Delete an error message for a failed memory allocation in bfin_pm_suspend_mem_enter() SF Markus Elfring
2017-05-24 18:03   ` [PATCH 1/2] blackfin: Delete an error message for a failed memory allocation in bfin_pm_suspend_mem_ SF Markus Elfring
2017-05-27 18:43   ` [PATCH 1/2] blackfin: Delete an error message for a failed memory allocation in bfin_pm_suspend_mem_enter() Al Viro
2017-05-27 18:43     ` [PATCH 1/2] blackfin: Delete an error message for a failed memory allocation in bfin_pm_suspend_ Al Viro
2017-05-24 18:04 ` [PATCH 2/2] blackfin: Delete an error message for a failed memory allocation in isram_test_init() SF Markus Elfring
2017-05-24 18:04   ` SF Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.